Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » NPE in eclipse osgi GroupingChecker/ResolverImpl
NPE in eclipse osgi GroupingChecker/ResolverImpl [message #513538] Wed, 10 February 2010 14:21 Go to next message
Niels Bech Nielsen is currently offline Niels Bech NielsenFriend
Messages: 16
Registered: July 2009
Junior Member
When I run a headless PDE build on my project using a 3.4.2 installation, I have some non-deterministic errors like the stacktrace below..

It occur approx 40% of the time, the build trace is always different which suggests that some reordering may produce the error.

It is not a problem when I build with 3.5.1, but obviously, we need to identify the problem (because there must be one)

This not so much a PDE problem, but an OSGi problem apparently from the very deterministic stack trace.

Any hints? clues? help?

Regards
/Niels

java.lang.NullPointerException
at org.eclipse.osgi.internal.module.GroupingChecker$PackageRoot s.subSet(GroupingChecker.java:337)
at org.eclipse.osgi.internal.module.GroupingChecker$PackageRoot s.superSet(GroupingChecker.java:352)
at org.eclipse.osgi.internal.module.GroupingChecker.createPacka geRoots(GroupingChecker.java:185)
at org.eclipse.osgi.internal.module.GroupingChecker.getPackageR oots(GroupingChecker.java:129)
at org.eclipse.osgi.internal.module.GroupingChecker$PackageRoot s.isConsistentClassSpace(GroupingChecker.java:285)
at org.eclipse.osgi.internal.module.GroupingChecker.isConsisten tInternal(GroupingChecker.java:103)
at org.eclipse.osgi.internal.module.GroupingChecker.isConsisten tInternal(GroupingChecker.java:67)
at org.eclipse.osgi.internal.module.GroupingChecker.isConsisten tInternal(GroupingChecker.java:75)
at org.eclipse.osgi.internal.module.GroupingChecker.isConsisten t(GroupingChecker.java:52)
at org.eclipse.osgi.internal.module.ResolverImpl.addConflicts(R esolverImpl.java:720)
at org.eclipse.osgi.internal.module.ResolverImpl.getConflicts(R esolverImpl.java:711)
at org.eclipse.osgi.internal.module.ResolverImpl.findBestCombin ation(ResolverImpl.java:585)
at org.eclipse.osgi.internal.module.ResolverImpl.checkUsesConst raints(ResolverImpl.java:539)
at org.eclipse.osgi.internal.module.ResolverImpl.resolveBundles 0(ResolverImpl.java:535)
at org.eclipse.osgi.internal.module.ResolverImpl.resolveBundles (ResolverImpl.java:501)
at org.eclipse.osgi.internal.module.ResolverImpl.resolve(Resolv erImpl.java:388)
at org.eclipse.osgi.internal.resolver.StateImpl.resolve(StateIm pl.java:428)
at org.eclipse.osgi.internal.resolver.StateImpl.resolve(StateIm pl.java:488)
at org.eclipse.pde.internal.build.site.BuildTimeSite.getRegistr y(BuildTimeSite.java:140)
at org.eclipse.pde.internal.build.BuildScriptGenerator.generate Features(BuildScriptGenerator.java:237)
at org.eclipse.pde.internal.build.BuildScriptGenerator.generate (BuildScriptGenerator.java:102)
at org.eclipse.pde.internal.build.tasks.BuildScriptGeneratorTas k.run(BuildScriptGeneratorTask.java:91)
at org.eclipse.pde.internal.build.tasks.BuildScriptGeneratorTas k.execute(BuildScriptGeneratorTask.java:79)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.j ava:288)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(Dispatch Utils.java:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.ja va:1329)
Re: NPE in eclipse osgi GroupingChecker/ResolverImpl [message #513594 is a reply to message #513538] Wed, 10 February 2010 16:29 Go to previous messageGo to next message
Thomas Watson is currently offline Thomas WatsonFriend
Messages: 437
Registered: July 2009
Senior Member
I don't see anything that has changed in that area since 3.4 that would fix the NPE. You should open a bug report and hopefully give some steps to reproduce.

Thanks
Tom.
Re: NPE in eclipse osgi GroupingChecker/ResolverImpl [message #513770 is a reply to message #513594] Thu, 11 February 2010 08:30 Go to previous messageGo to next message
Niels Bech Nielsen is currently offline Niels Bech NielsenFriend
Messages: 16
Registered: July 2009
Junior Member
I think that is my exact problem Smile

I do not know what causes it, but suspect it to be in the dependencies area. Given the non-deterministic nature of the problem, something is probably wrong in the conflict resolution with an obscure package tree, but I cannot easily identify it.

Ah well, will try to see if I can attach remote debugging onto it.
Re: NPE in eclipse osgi GroupingChecker/ResolverImpl [message #513857 is a reply to message #513770] Thu, 11 February 2010 14:15 Go to previous messageGo to next message
Thomas Watson is currently offline Thomas WatsonFriend
Messages: 437
Registered: July 2009
Senior Member
Please open a bug report with the stack trace to at least get it recorded. It may help if we could get the contents of your bundle manifests that cause the sporadic issue.

Thanks
Tom.
Re: NPE in eclipse osgi GroupingChecker/ResolverImpl [message #513924 is a reply to message #513857] Thu, 11 February 2010 17:02 Go to previous message
Niels Bech Nielsen is currently offline Niels Bech NielsenFriend
Messages: 16
Registered: July 2009
Junior Member
Off course, Thomas.

Have opened bug https://bugs.eclipse.org/302601, where I also provide the result from my remote debugging.

apparently, two plugins exported the exact same package name, and have a combination of require bundle and uses package which, when resolving, resolves to either one or the other plugin.

So in the end it was my own problem, but it provoked a NPE in the resolver. Have described this as good as I could.
Previous Topic:DynamicImport-Package creates bundle leak?
Next Topic:Secure Storage and Password Recovery
Goto Forum:
  


Current Time: Sat Dec 20 04:34:35 GMT 2014

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

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