NotesException when creating Lotus Notes session via Java

Hi,I am trying to connect to a Domino Server via a standalone Java application, my aim is to use Lotus Notes to send a mail via this application.

I receive an exception caused by this line of code:

Session s = NotesFactory.createSession(host, user, pwd);

the text of exception is:

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 platform6.run(platform6.java:22)

at java.lang.Thread.run(Thread.java:570)

Caused by: org.omg.CORBA.COMM_FAILURE: java.net.UnknownHostException: pico6 Host: pico6 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(Unknown Source)

at lotus.priv.CORBA.iiop.Generic.locate(Unknown Source)

at lotus.priv.CORBA.iiop.RepImpl.invokePreamble(Unknown Source)

at lotus.priv.CORBA.iiop.RepImpl.invoke(Unknown Source)

at lotus.priv.CORBA.portable.ObjectImpl._invoke(Unknown Source)

at lotus.domino.corba._IObjectServerStub.createSession(Unknown Source)

... 7 more

Caused by: java.net.UnknownHostException: pico6

at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)

at java.net.Socket.connect(Socket.java:478)

at java.net.Socket.connect(Socket.java:428)

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

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

at lotus.priv.CORBA.iiop.Connection.newSocket(Unknown Source)

... 15 more

Any help…

Thanks

Subject: NotesException when creating Lotus Notes session via Java

You’ve got an java.net.UnknownHostException - check that your host pico6 resolves to an ip address (try pinging it or use nslookup) - Your notes client might be “resolving” the host via it’s own mechanisms, not DNS - but these aren’t available via a standalone program.

-ross

Subject: RE: NotesException when creating Lotus Notes session via Java

Thanks, I solve the problem, in fact iiop was not set up and that’s the source of error that caused the exception, after doing it my application run well :slight_smile:

Subject: RE: NotesException when creating Lotus Notes session via Java

Thanks, I solve the problem, in fact iiop was not set up and that’s the source of error that caused the exception, after doing it my application run well :slight_smile: