Can not create session by java application

Hello,

I am using a java application to create session on a remote domino server, but it creates an exception on the line:

s= NotesFactory.createSession(host, username, password);

I tried host as remote domino server name or server ip address, but no way.

although the same line works if I am using host as null, to create session on another domino server on the same machine.

so, I guess it is concerned with the createsession host parameter.

Thanks for your help,

Hagar

Subject: problem solved

Hello,

I found the problem which was that the http port of the remote domino server is “8000” not “80”, I had to write the port name.

So it works now!

Thanks for help,

Hagar

Subject: Can not create session by java application

It doesn’t matter what’s in your createSession parameters if DIIOP isn’t running on the target machine.

What exceptions are being thrown?

Subject: RE: Can not create session by java application

Hi Stan,

The DIIOP task is running on the Domino Server.

When I use the servername “CIBDev/Alex” as a hoststring I get the following exception:

java.net.UnknownHostException: CIBDev

at java.net.InetAddress.getAllByName0(InetAddress.java:604)

at java.net.InetAddress.getAllByName0(InetAddress.java:560)

at java.net.InetAddress.getByName(InetAddress.java:514)

at java.net.Socket.(Socket.java:122)

at com.ibm.websphere.workflow.sample.controller.CIBTest.main(CIBTest.java:28)

And when I use the IP Address as a hoststring I get the following exception:

lotus.domino.NotesException

at com.ibm.websphere.workflow.sample.controller.DM.getDocumentsByItem(DM.java:56)

at com.ibm.websphere.workflow.sample.controller.CIBTest.main(CIBTest.java:28)

at com.ibm.websphere.workflow.sample.controller.CIBTest.main(CIBTest.java:36)

Thanks for your help,

Hagar

Subject: Can not create session by java application

Are you handling exceptions in your code? If so, what is the NotesException returned? That can tell you quite a lot – for example, whether DIIOP’s running at all, whether you’re using the correct host name, and so forth. There are some DIIOP-related error codes which aren’t properly documented in Designer Help, and I’ve detailed them here:

Subject: RE: Can not create session by java application

Dear Benpoole,The DIIOP task is running on the Domino Server.

When I use the servername “CIBDev/Alex” as a hoststring I get the following exception:

java.net.UnknownHostException: CIBDev

at java.net.InetAddress.getAllByName0(InetAddress.java:604)

at java.net.InetAddress.getAllByName0(InetAddress.java:560)

at java.net.InetAddress.getByName(InetAddress.java:514)

at java.net.Socket.<init>(Socket.java:122)

at com.ibm.websphere.workflow.sample.controller.CIBTest.main(CIBTest.java:28)

And when I use the IP Address as a hoststring I get the following exception:

lotus.domino.NotesException

at com.ibm.websphere.workflow.sample.controller.DM.getDocumentsByItem(DM.java:56)

at com.ibm.websphere.workflow.sample.controller.CIBTest.main(CIBTest.java:28)

at com.ibm.websphere.workflow.sample.controller.CIBTest.main(CIBTest.java:36)

Thanks for your help,

Hagar