Hello,I am developing a plug-in which is to access notes data in databases both on local machine and on servers.
When running the plug-in on a database replica on local machine I am able to access the data. No problem here…
When I try to access data in a replica of the same database on a server I don’t get access. Has anyone encountered a similar problem and found a workaround?
I’m opening the database using the Database.openByReplicaID method…
Subject: Seems like this is an access issue of some sort…
I’ve narrowed this issue down to being an access related issue. It seems the server does not accept the password for some reason. Now I receive the follwing exception:NotesException: Notes error: Wrong Password. (Passwords are case sensitive - be sure to use correct upper and lower case.)
This is not a server-only issue however. I also encounter the same problem on one local database. On the other hand, I am able to access two other local databases using the same code without any problems. I have manager access on all databases both locally and on server.
I call session.resolve() with an URL on the following format:
Notes:///dbrepid/viewid/docunid?replicaID=dbrepid
This format is returned from method getDocumentSelection() of class com.ibm.lotuslabs.context.service.document.DocumentContextService. I found this code in the following developerWorks example:
“Leveraging user context in the IBM Lotus Notes V8 sidebar and toolbar”
The session.resolve() method is able to connect and successfully return document data from two local databases I have tested. The third (and off-course most important) database returns the following notes exception stack trace:
NotesException: Password or other security violation for database dbname.nsf
at lotus.domino.local.Session.Nresolve(Native Method)
at lotus.domino.local.Session.resolve(Unknown Source)
at no.us.notes.util.DatabaseUtil.getDatabase(DatabaseUtil.java:98)
at no.us.customer.util.CustomerDatabaseUtil.executeCustomerDB(CustomerDatabaseUtil.java:82)
at no.us.customer.util.CustomerApplications$1.runInNotesThread(CustomerApplications.java:72)
at com.ibm.notes.java.api.util.NotesJob$1.run(NotesJob.java:50)
at com.ibm.notes.java.api.util.NotesSynchronizer$RunnableLock.run(NotesSynchronizer.java:141)
at com.ibm.notes.java.api.util.NotesSynchronizer.runSyncMessages(NotesSynchronizer.java:114)
at com.ibm.notes.java.api.util.NotesPlatform.readAndDispatch(NotesPlatform.java:65)
at com.ibm.notes.java.api.util.NotesPlatform.access$100(NotesPlatform.java:29)
at com.ibm.notes.java.api.util.NotesPlatform$1.run(NotesPlatform.java:51)
I have now found the cause of the problem. It turns out that the code in different open events causes the opening of the document to fail. When I emptied the events and removed script library imports from the form, it opened without problem from the plug-in.
But off-course, the code is there for a reason:) So it must be made to coexist with the plug-in somehow.
Is there a way to open the document without running the open events and scriptlibraries?
Can this be done by providing a parameter in the URL that is resolved maybe?