用 java怎么从name.nsf视图中取值?

williw 2003-08-30 06:47:22
用 java怎么从name.nsf视图中取值?
...全文
49 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
williw 2003-09-24
  • 打赏
  • 举报
回复
在本地好办,可在服务器上总是出错:
代码(环境jb9):
package test;

import lotus.domino.NotesThread;
import lotus.domino.*;
import java.util.*;
import java.io.*;

public class Test extends NotesThread {
private final String host="mail";
private final String user="admin";
private final String pwd="admin";

public Test() {
}
public void runNotes() {
try {
// protected lotus.domino.Session s;
// s = NotesFactory.createSessionWithIOR(IOR,user,pwd);
Session s = NotesFactory.createSession(host,user,pwd); //这是第19行
//Database db = s.getDatabase("Mail", "names");
DbDirectory dir = s.getDbDirectory(null);
Database db = dir.openDatabase("names.nsf");
View view = db.getView("People");
Document doc = view.getFirstDocument();
while(doc!=null){
String mailname=doc.getItemValueString("fullname");
System.out.println(mailname);
doc = view.getNextDocument(doc);
}

}
catch (NotesException e) {
e.printStackTrace();
return;
}
}
public static void main(String argv[])
{
Test t = new Test();
t.start();
}
}

错误:
java.lang.NoClassDefFoundError: lotus/domino/cso/Session

at lotus.domino.NotesFactory.createSession(Unknown Source)

at lotus.domino.NotesFactory.createSession(Unknown Source)

at test.Test.runNotes(Test.java:19)

at lotus.domino.NotesThread.run(NotesThread.java:208)

chenyg2000 2003-09-01
  • 打赏
  • 举报
回复
可以利用domino提供的java类实现
lingliang 2003-08-31
  • 打赏
  • 举报
回复
把NAMES。NSF看成一般数据库不就得了?
klbt 2003-08-30
  • 打赏
  • 举报
回复
支持。

535

社区成员

发帖
与我相关
我的任务
社区描述
企业开发 Exchange Server
社区管理员
  • 消息协作社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧