还是连不上(java)!

jrwx 2003-10-20 04:38:24
我在本机安装有Domono Server与Lotus Notes,Lotus Notes通过配置可以连上Domono Server,但我用代码:
Session s = NotesFactory.createSession("rhb", "ren", "12345678");
Database db = s.getDatabase(s.getServerName(), "Archive.nsf");
时,出现错误:
lotus.domino.NotesException
at lotus.domino.NotesExceptionHelper.read(NotesExceptionHelper.java)
at lotus.domino.NotesExceptionHolder._read(NotesExceptionHolder.java)
at com.ibm.CORBA.iiop.RepImpl.invoke(RepImpl.java:325)
at com.ibm.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:36)
at lotus.domino.corba._IObjectServerStub.createSession(_IObjectServerStub.java)
at lotus.domino.cso.Session.OREFtoSession(Session.java:813)
at lotus.domino.cso.Session.<init>(Session.java:67)
at lotus.domino.cso.Session.createSession(Session.java:40)
at lotus.domino.NotesFactory.createSession(NotesFactory.java:67)
at dmneduce.IntroCorbaApp.run(IntroCorbaApp.java:40)
at lotus.domino.NotesThread.run(NotesThread.java:201)
我的Domino Server启动信息为:

Lotus Domino TM Server, Release 5.0.6a , January 17, 2001
Copyright - 1985-2001, Lotus Development Corporation, All Rights Reserved

2003-10-20 16:14:20 Server started on physical node RHB
2003-10-20 16:14:20 Informational: The registry value
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\PriorityControl\Win32Priorit
ySeparation
is currently set to 2. For better server performance, change the setting to 0
2003-10-20 16:14:24 Router: Unable to obtain Internet host and domain names
2003-10-20 16:14:24 Mail Router started for domain TCPIP
2003-10-20 16:14:24 Router: Internet SMTP host rhb in domain
2003-10-20 16:14:29 Database Replicator started
2003-10-20 16:14:34 Index update process started
2003-10-20 16:14:39 Agent Manager started
2003-10-20 16:14:40 AMgr: Executive '1' started
2003-10-20 16:14:44 rhb/yunguo 是 Domino 目录的管理员服务器。
2003-10-20 16:14:44 Administration Process started
2003-10-20 16:14:49 Calendar Connector started
2003-10-20 16:14:54 Event Monitor started
2003-10-20 16:14:59 Schedule Manager started
2003-10-20 16:14:59 SchedMgr: Validating Schedule Database
2003-10-20 16:14:59 SchedMgr: Done validating Schedule Database
2003-10-20 16:15:04 Stats agent started
2003-10-20 16:15:11 JVM: Java Virtual Machine initialized.

2003-10-20 16:15:12 Domino Off-Line Services HTTP extension (Release 1.02) load
ed.
2003-10-20 16:15:13 HTTP Web Server started
2003-10-20 16:15:16 DIIOP Server started on rhb
2003-10-20 16:15:20 Maps Extractor started
2003-10-20 16:15:25 Maps Extractor: Building Maps profile
2003-10-20 16:15:25 Maps Extractor: Maps profile built OK
2003-10-20 16:15:26 Database Server started
2003-10-20 16:20:32 Searching Administration Requests database.
>请高手指点我什么地方出现了问题?谢谢!
...全文
102 15 打赏 收藏 转发到动态 举报
写回复
用AI写文章
15 条回复
切换为时间正序
请发表友善的回复…
发表回复
gjd111686 2003-11-24
  • 打赏
  • 举报
回复
如果你是Servlet来访问Domino:
ClassPath:
C:\Program Files\Sybase\Shared\Sun\jdk118\lib\classes.zip;C:\App\J2SDK141\lib\servlet.jar;C:\Lotus\Domino\Notes.jar;C:\Lotus\Domino\Data\domino\java\NCSO.jar;
gjd111686 2003-11-24
  • 打赏
  • 举报
回复
如果没有NCSO.jar可能就是版本问题.[我测试Servlet编译环境必须是JDK1.1.8以下才可以在Domino5.06上运行,不知Application有无影响.]
gjd111686 2003-11-24
  • 打赏
  • 举报
回复
如果是Application跟上贴一样.两个包[Notes.jar,NCSO.jar]拷贝到你的ClassPath就可以
figaro 2003-11-20
  • 打赏
  • 举报
回复
up
jrwx 2003-11-20
  • 打赏
  • 举报
回复
再顶
netnest 2003-11-17
  • 打赏
  • 举报
回复
@gjd111686(数字金刚) : 如果要引入其他的包,比如java.io.×等等,应该把包放到什么文件夹路径啊?
rwxzqd 2003-11-17
  • 打赏
  • 举报
回复
关注
jrwx 2003-10-26
  • 打赏
  • 举报
回复
up
jrwx 2003-10-23
  • 打赏
  • 举报
回复
up
jrwx 2003-10-22
  • 打赏
  • 举报
回复
up
亓锋 2003-10-21
  • 打赏
  • 举报
回复

Session s = NotesFactory.createSession("rhb", "ren", "12345678");


Session s = NotesFactory.createSession("11.11.11.11", "ren", "12345678");

写IP
NickSam 2003-10-21
  • 打赏
  • 举报
回复
错了错了,你是在Notes中的代理中使用的吧,建议你看看帮助里面的例子,并copy,很不错的。
import lotus.domino.*;
public class JavaAgent extends AgentBase {
public void NotesMain() {
try {
Session session = getSession();
AgentContext agentContext =
session.getAgentContext();
// (Your code goes here)
Agent agent = agentContext.getCurrentAgent();
DbDirectory dir = session.getDbDirectory(null);
Database db = dir.openDatabase(agent.getComment());
if (db == null) System.out.println(
"Database open failed");
else System.out.println("Title:\t\t" +
db.getTitle());
} catch(NotesException e) {
if (e.id + NotesError.NOTES_MIN_ERROR_CODE ==
NotesError.NOTES_ERR_NOTAFILE)
System.out.println("No such database");
else {
System.out.println(e.id + " " + e.text);
e.printStackTrace(); }
} catch(Exception e) {
e.printStackTrace();
}
}
}
NickSam 2003-10-21
  • 打赏
  • 举报
回复
Notes.ini要做相应的修改,使得Notes能支持被JAVA调用,具体看看designer的Help。
jrwx 2003-10-21
  • 打赏
  • 举报
回复
编译通过
gjd111686 2003-10-20
  • 打赏
  • 举报
回复
引入包lotus.domino.*的路径是否在你JDK的环境变量中设置

535

社区成员

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

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