Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » OSGi - NullPointerException in ContextFinder
OSGi - NullPointerException in ContextFinder [message #507968] Fri, 15 January 2010 06:35 Go to next message
Vidya  is currently offline Vidya
Messages: 1
Registered: January 2010
Junior Member
Hi,

I am using following version of OSGi:
org.eclipse.osgi_3.5.1.R35x_v20090827.jar

I am getting the following error when I am executing my file. Please suggest what could be the root cause for this error.

Also, to help me debug the error, I need the latest source file " org.eclipse.core.runtime.internal.adaptor.ContextFinder.java ". I am unable to find the file in the eclipse source. Please help.

Caused by: java.lang.NullPointerException
at org.eclipse.core.runtime.internal.adaptor.ContextFinder.star tLoading(ContextFinder.java:99)
at org.eclipse.core.runtime.internal.adaptor.ContextFinder.load Class(ContextFinder.java:117)

Regards,
Vidya

[Updated on: Fri, 15 January 2010 06:36]

Report message to a moderator

Re: OSGi - NullPointerException in ContextFinder [message #508692 is a reply to message #507968] Tue, 19 January 2010 16:23 Go to previous message
Thomas Watson is currently offline Thomas Watson
Messages: 419
Registered: July 2009
Senior Member
The source can be found in CVS for the eclipse RT project. View on line at

http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.equinox /framework/bundles/org.eclipse.osgi/eclipseAdaptor/src/org/e clipse/core/runtime/internal/adaptor/?root=RT_Project

The source for org.eclipse.osgi should be included in the Eclipse SDK as well.

line 99 on Context finder is accessing a static variable that should have been set to a ThreadLocal at <clinit> Given that fact I am not sure how the following line of code is getting an NPE.

Set classesAndResources = (Set) cycleDetector.get();

cycleDetector should never be null at this point. We could make cycleDetector a final field but I'm still at a loss as to why it is null for you.
Previous Topic:Do I have to remove BundleListeners when Bundles are uninstalled?
Next Topic:How to Start a bundle programatically
Goto Forum:
  


Current Time: Tue Jul 22 21:43:13 EDT 2014

Powered by FUDForum. Page generated in 0.02019 seconds