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
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 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(
at ch.ethz.iks.r_osgi.impl.ChannelEndpointImpl.handleMessage(
at ch.ethz.iks.r_osgi.impl.ChannelEndpointImpl$
at ch.ethz.iks.r_osgi.impl.ChannelEndpointImpl$

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
Previous Topic:Eclipse hangs after installing egit -- error=ecf
Next Topic:Problem understand - "Discovery of Remote Services
Goto Forum:

Current Time: Sun Jun 04 23:17:59 GMT 2023

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

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

Back to the top