我正在org.openntf.domino
一个个人 XPage 项目中使用 API,我遇到了一个我自己似乎无法解决的问题。我有以下代码:
public class SeasonService implements Serializable {
private Vector<?> seasons = new Vector();
public Vector<Season> getSeasons(){
System.out.println("Retrieve all season entries");
Database db = DominoUtil.getCurrentDatabase();
View vw = db.getView(".AllDocuments");
ViewEntryCollection coll = vw.getAllEntriesByKey("Season");
Iterator<ViewEntry> it = coll.iterator();
Vector<Season> l = new Vector();
while(it.hasNext()){
ViewEntry entry = it.next();
l.add(fromEntry(entry));
}
return l;
}
private static final Season fromEntry(ViewEntry entry){
ViewEntryEx vex = new ViewEntryEx(entry);
System.out.println("Retrieve season from entry");
//try {
Season s = new Season();
s.setDescription("Test");
s.setKey("0000");
//s.setDescription((String) vex.getColumnValue("Description"));
//s.setKey((String) vex.getColumnValue("Key"));
return s;
//} catch (ColumnNameNotFoundException e) {
// TODO Auto-generated catch block
// e.printStackTrace();
//}
//return null;
}
}
domino Util 类如下所示:
public static final Database getCurrentDatabase(){
Session s = Factory.fromLotus(ExtLibUtil.getCurrentSession(), org.openntf.domino.Session.class, null);
return s.getCurrentDatabase();
}
由于某种原因,一旦我尝试启动 View 对象,代码就会返回 Stackoverflow 错误。任何人都知道原因是什么?