I am using a lib which communicates with another application through some native connection.
I have no sourcecode whatsoever of this lib, so i cant really specify how the application actually communicates.
Anyway, it works pretty well and i can communicate to the application. With this lib i can listen for events that happen in the other application. I can register for events and a listener is called with a special event-class.
Using OSGi, this event-class fails to load with the java.lang.NoClassDefFoundError
exception. Every Event is triggered in its own new thread. The package is imported correctly, and i can use the class throughout my code.
The Library i use is the HACL library by IBM.
Is this a problem of the API? or is it because of how native Events are handled? Can i somehow make the OSGi Classloader known to those new Threads?
Thanks.
The full stack trace is:
Exception in thread "Thread-20" java.lang.NoClassDefFoundError: com/ibm/eNetwork/ECL/event/ECLPSEvent
Caused by: java.lang.ClassNotFoundException: com.ibm.eNetwork.ECL.event.ECLPSEvent
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)