Problems with Class Loading: NullPointerException in ch.ethz.iks.r_osgi.impl.RemoteOSGiServiceImpl [message #895045] |
Wed, 11 July 2012 10:07 |
Eclipse User |
|
|
|
Hello everybody,
I do have some problems in setting up a r-OSGi connection in my Eclipse Equinox/RCP/RAP based software project. To identify the actual problem, I used the org.eclipse.ecf.examples.remoteservices.hello.consumer.rs project from the ECF GIT repository. The example project using r-OSGi runs without any problems out of the box...
To simulate the problem I have in my own project, I now added the following line in the constructor of the org.eclipse.ecf.examples.remoteservices.hello.HelloMessage class in the org.eclipse.ecf.examples.remoteservices.hello bundle:
NLS.bind("Demo message with param1 = {0} and param2 = {1}.", new String[] { "PARAM1", "PARAM2" });
(Attached you can find the adapted HelloMessage class. All other classes remainded the same.)
I know that this line does not make any sense at all, but it leads to the same problem I have in my own project and thus seems an appropriate way to track down the issue.
What happens now is the following: Once I run the example project again (host, and then consumer), it fails with the following NullPointerException:
Exception in thread "r-OSGi ChannelWorkerThread0" java.lang.NullPointerException
at ch.ethz.iks.r_osgi.impl.RemoteOSGiServiceImpl.getBundlesForPackages(RemoteOSGiServiceImpl.java:1183)
at ch.ethz.iks.r_osgi.impl.ChannelEndpointImpl.handleMessage(ChannelEndpointImpl.java:1284)
at ch.ethz.iks.r_osgi.impl.ChannelEndpointImpl$2.run(ChannelEndpointImpl.java:288)
at ch.ethz.iks.r_osgi.impl.ChannelEndpointImpl$1.run(ChannelEndpointImpl.java:253)
I digged into the source code a little, and somehow it seems that the OSGi environment does have a problem with finding the packages containing the NLS class. But that seems weired to me since I had to add the org.eclipse.osgi bundle to the Require-Bundle list of the org.eclipse.ecf.examples.remoteservices.hello project.
When searching the internet, I found several issues related to the same or a similar exception within the ChannelEndpointImpl, and the RemoteOSGiServiceImpl class respectively. But none of them actually helped me solving the issue. After a full day of digging, testing, etc. I am giving up now and hope that you guys have any hint for me...
Thank you so much in advance.
Best regards
Timo
|
|
|
Powered by
FUDForum. Page generated in 0.05186 seconds