Hello,
i´ve got two plugins: The first one is some kind of ‘tool plugin’, a collection of common classes/methods which might be useful in other plugins.
The second plugin should simply call those ‘tools’.
The problem: When calling any method of the lotus.domino.Session class in the ‘other’ plugin, a java.lang.LinkageError: JVMJ9VM069 will be thrown.
To analyze this problem, i reduced the tool plugin to export this class only:
package test;
import lotus.domino.NotesException;
import lotus.domino.Session;
public class NotesTest {
public static void test(Session session){
try {
System.out.println("Plugin A: Server: "+session.getServerName());
} catch (NotesException e) {
e.printStackTrace();
}
}
}
So this simple class/method gets an session object and prints the server name.
Another plugin might ‘consume’ this method like this:
…
NotesThread.sinitThread();
try {
Session session=NotesFactory.createSession();
System.out.println("Plugin B: Server: "+session.getServerName());
NotesTest.test(session);
}catch (NotesException e){
e.printStackTrace();
}finally{
NotesThread.stermThread();
}
…
The first print (Plugin B…) works, the second print (Plugin A) throws the error mentioned before.
Using NotesSessionJob instead of NotesThread/NotesFactory doesnt help.
Those two plugins have different class loaders, i thought maybe Notes doesnt like this.
So i removed the session parameter and created an own session in the tool plugin.
Again, i tries both NotesThread/NotesFactory and NotesSessionJob.
Surprise, i got another error:
java.lang.UnsatisfiedLinkError: nlsxbe (Library is already loaded in another ClassLoader)
When moving the ‘tools class’ from plugin A to plugin B, everything is fine.
In the original version of this tool plugin, the tool class was not exported/imported but supplied as an osgi service. Which means, a service doesnt help, too.
Is this a known limitation of Notes or do i miss something?
I´m using Notes 8.5.1 FP1, due to some reason it´s not possible to try FP2 yet.
Thanks in advance for any help.
Thomas