Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse Communications Framework (ECF) » Problems with Class Loading: NullPointerException in ch.ethz.iks.r_osgi.impl.RemoteOSGiServiceImpl(ch.ethz.iks.r_osgi.impl.RemoteOSGiServiceImpl.getBundlesForPackages(...) throws a NullPointerException when framework classes/packages are used in remotely transferred objects.)
Problems with Class Loading: NullPointerException in ch.ethz.iks.r_osgi.impl.RemoteOSGiServiceImpl [message #895045] Wed, 11 July 2012 14:07
Timo Rohrberg is currently offline Timo RohrbergFriend
Messages: 69
Registered: September 2011
Location: Karlsruhe
Member
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
Previous Topic:Eclipse hangs after installing egit -- error=ecf
Next Topic:Problem understand - "Discovery of Remote Services
Goto Forum:
  


Current Time: Fri Apr 19 10:40:04 GMT 2024

Powered by FUDForum. Page generated in 0.01743 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top