Hi,I’m trying to connect to Domino through a Java application which runs on the same machine of the Domino Server. I would like to use “local” connection (without using DIIOP) because of stability and performance.
Using the following code I can succesfully connect to Domino:
The method Session.getUsername returns the name of the server so I guess I’m connecting as the server itself.
The problems begins if I want to connect with a specified user. The documentatio says you have to use this method
…
s = NotesFactory.createSession(“”,“myuser”,“mypassword”);
…
But in this case I always get
NotesException: Invalid user name/password
at lotus.domino.local.Session.NCreateWebSession(Native Method)
at lotus.domino.local.Session.createSession(Session.java:142)
at lotus.domino.NotesFactory.createSessionUP(Unknown Source)
at lotus.domino.NotesFactory.createSession(Unknown Source)
at testdomino.localTest.<init>(localTest.java:13)
at testdomino.localTest.start(localTest.java:109)
at testdomino.localTest.main(localTest.java:102)
The username and password are correct, in fact if I load the diiop task and use a “remote” connection
…
s = NotesFactory.createSession(“servername”,“myuser”,“mypassword”);
…
everything works fine.
Why can’t I use the local connection with a user?
Alternatively is there a way “to switch” to a user session after connecting as the server?
Subject: Problem Creating Session with Java external program
Update: another user having the same problem…
“I worked through a Lotus Technical Support call on the issue and they couldn’t get local session initiation to happen for me though they said it should work. Instead, I had to run DIIOP on the Domino server and switch to making remote session calls in my servlet, even though WebSphere and Domino were running on the same box.”
Another question now is mandatory… Lotus does some tests before releasing the code?
Subject: RE: Problem Creating Session with Java external program
hi hello it seems like we do have same problem on java application connecting without the DIIOP. have you got better alternatives for this after a call from tech support from lotus, did you come up with an answer for this. hope you can share a your knowledge to me. Somebody had told me to used JDBC but i guess i still refer to get the database doc rather than doing a sql statement, hope you can answer me on this thanks
When I run this code when server is null, the following happens:
Caused by: NotesException: Invalid user name/password
at lotus.domino.local.Session.NCreateWebSession(Native Method)
at lotus.domino.local.Session.createSession(Session.java:140)
at lotus.domino.NotesFactory.createSessionUP(Unknown Source)
at lotus.domino.NotesFactory.createSession(Unknown Source)
at com.vaultus.vms.domino.driver.NotesSession.create(NotesSession.java:81)
When I replace the value of server with the server name,
and I take Notes.jar out of my classpath and use NCSO.jar,
it works fine. So, I don’t believe it is a username/password issue as the error message suggests.
Finally, I am able to login locally with the server account;
but, that will not be a long term solution for our application.