当我尝试从我的 java 应用程序连接到 domino 服务器时,出现如下异常:
NotesException: Could not open Notes session
at lotus.domino.cso.Session.initSession(Unknown Source)
at lotus.domino.cso.Session.<init>(Unknown Source)
at lotus.domino.cso.Session.createSession(Unknown Source)
at lotus.domino.NotesFactory.createSessionUP(Unknown Source)
at lotus.domino.NotesFactory.createSession(Unknown Source)
at lotus.domino.NotesFactory.createSession(Unknown Source)
at com.nseit.email.ReadEmailRemotely.run(ReadEmailRem otely.java:23)
at java.lang.Thread.run(Unknown Source)
Caused by: org.omg.CORBA.COMM_FAILURE: java.net.ConnectException: Connection refused: connect Host: **127.0.0.1 Port: 63148** vmcid: 0x0 minor code: 1 completed: No
at lotus.priv.CORBA.iiop.ConnectionTable.get(Unknown Source)
at lotus.priv.CORBA.iiop.ConnectionTable.get(Unknown Source)
at lotus.priv.CORBA.iiop.Generic.getConnection(Unknow n Source)
at lotus.priv.CORBA.iiop.Generic.locate(Unknown Source)
at lotus.priv.CORBA.iiop.RepImpl.invokePreamble(Unkno wn Source)
at lotus.priv.CORBA.iiop.RepImpl.invoke(Unknown Source)
at lotus.priv.CORBA.portable.ObjectImpl._invoke(Unkno wn Source)
at lotus.domino.corba._IObjectServerStub.createSessio n(Unknown Source)
... 8 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at lotus.priv.CORBA.iiop.Connection.newSocket(Unknown Source)
... 16 more
这是我的java代码:
import lotus.domino.*;
public static void main(String argv[])
{
ReadEmailRemotely t = new ReadEmailRemotely();
Thread nt = new Thread((Runnable)t);
nt.start();
}
public void run()
{
try
{
String host = "xxx.xxx.xxx.xx:63148";
Session s = NotesFactory.createSession(host);
}
catch(Exception e)
{
e.printStackTrace();
}
}
我正在使用NCSO.jar并且我已经验证了 DIIOP 连接的所有设置都是正确的。
既然我提供了HARDCODE IP 地址,为什么我的 JAVA 应用程序试图连接本地主机 IP (127.0.0.1)
对此的任何建议都会有很大帮助。
在 DOMINO 服务器上执行以下命令 tell diiop show config时,控制台输出显示几个参数,其中 2 个参数显示为
主机地址:127.0.0.1 公共主机名/地址:127.0.0.1
这是上述异常的原因吗?