Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » NPE in AbstractBundleContainer with Eclipse 3.6
NPE in AbstractBundleContainer with Eclipse 3.6 [message #605866] Thu, 27 May 2010 07:59 Go to next message
Aurélien Pupier is currently offline Aurélien PupierFriend
Messages: 637
Registered: July 2009
Location: Grenoble, FRANCE
Senior Member

Hi,

I'm trying to move an RCP application from 3.5 to 3.6

With 3.6, a NPE occured at startup:
!ENTRY org.eclipse.core.resources 4 2 2010-05-27 09:44:18.768
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".
!STACK 0
java.lang.NullPointerException
at org.eclipse.pde.internal.core.target.AbstractBundleContainer .getVMArguments(AbstractBundleContainer.java:525)
at org.eclipse.pde.internal.core.target.TargetPlatformService.n ewDefaultTargetDefinition(TargetPlatformService.java:525)
at org.eclipse.pde.internal.core.PluginModelManager.initDefault TargetPlatformDefinition(PluginModelManager.java:574)
at org.eclipse.pde.internal.core.PluginModelManager.initializeT able(PluginModelManager.java:527)
at org.eclipse.pde.internal.core.PluginModelManager.findModel(P luginModelManager.java:869)
at org.eclipse.pde.core.plugin.PluginRegistry.findModel(PluginR egistry.java:105)
at org.eclipse.pde.internal.core.builders.BundleErrorReporter.v alidateContent(BundleErrorReporter.java:50)
at org.eclipse.pde.internal.core.builders.ManifestConsistencyCh ecker.validateManifestFile(ManifestConsistencyChecker.java:2 69)
at org.eclipse.pde.internal.core.builders.ManifestConsistencyCh ecker.validateProject(ManifestConsistencyChecker.java:227)
at org.eclipse.pde.internal.core.builders.ManifestConsistencyCh ecker.build(ManifestConsistencyChecker.java:157)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildMan ager.java:629)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(Bui ldManager.java:172)
at org.eclipse.core.internal.events.BuildManager.basicBuild(Bui ldManager.java:203)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildMan ager.java:255)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(Bui ldManager.java:258)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop (BuildManager.java:311)
at org.eclipse.core.internal.events.BuildManager.build(BuildMan ager.java:343)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBu ildJob.java:144)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJ ob.java:242)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

I set a breakpoint in 3.5 and so I notice that the method getVMArguments is not called.

Any idea why this happened?

Regards,

--
Aurelien Pupier - BonitaSoft S.A.
"http://scratsh.wordpress.com/"


Aurélien Pupier - Red Hat
Senior Software Engineer in Fuse Tooling team
Re: NPE in AbstractBundleContainer with Eclipse 3.6 [message #605868 is a reply to message #605866] Thu, 27 May 2010 14:52 Go to previous messageGo to next message
Curtis Windatt is currently offline Curtis WindattFriend
Messages: 166
Registered: July 2009
Senior Member
What version of Eclipse 3.6 are you using? With the most recent code, line 525 is where we first access FrameworkAdmin. If we are unable to get the framework admin service we would fail with an NPE in this case, but I expect there would be many other problems with the target as we use framework admin when managing targets and launching.
Re: NPE in AbstractBundleContainer with Eclipse 3.6 [message #605871 is a reply to message #605866] Thu, 27 May 2010 15:01 Go to previous messageGo to next message
Aurélien Pupier is currently offline Aurélien PupierFriend
Messages: 637
Registered: July 2009
Location: Grenoble, FRANCE
Senior Member

Ouch I forgot to mention the version of Eclipse 3.6 :s so it is the RC1, build ID: 20100520-1308
The plugin where the NPE occured is: org.eclipse.pde.core_3.6.0.v20100512.jar

I notice that the same error is happening when I try to setRawClassPath on a java project.

Do you have any idea why the FrameworkAdmin service will not be available? What can I check?


--
Aurelien Pupier - BonitaSoft S.A.
"http://scratsh.wordpress.com/"


Aurélien Pupier - Red Hat
Senior Software Engineer in Fuse Tooling team
Re: NPE in AbstractBundleContainer with Eclipse 3.6 [message #605873 is a reply to message #605866] Thu, 27 May 2010 15:12 Go to previous messageGo to next message
Aurélien Pupier is currently offline Aurélien PupierFriend
Messages: 637
Registered: July 2009
Location: Grenoble, FRANCE
Senior Member

I debug a little.
In serviceRegistry, l.887: there is nothing register for the class " org.eclipse.equinox.internal.provisional.frameworkadmin.Fram eworkAdmin " in the map "publishedServicesByClass"

This is the keyset of the map:
publishedServicesByClass.keySet();
(java.util.HashMap$KeySet) [org.eclipse.core.runtime.IBundleGroupProvider, org.eclipse.osgi.framework.console.ConsoleSession, org.eclipse.equinox.p2.core.IProvisioningAgent, org.eclipse.core.internal.preferences.exchange.IProductPrefe rencesService, org.eclipse.osgi.service.urlconversion.URLConverter, org.eclipse.core.runtime.IExtensionRegistry, javax.xml.parsers.DocumentBuilderFactory, org.eclipse.core.runtime.preferences.IPreferencesService, org.eclipse.osgi.service.runnable.StartupMonitor, org.eclipse.osgi.service.pluginconversion.PluginConverter, org.eclipse.core.internal.preferences.exchange.ILegacyPrefer ences, org.eclipse.osgi.service.runnable.ApplicationLauncher, org.eclipse.osgi.framework.log.FrameworkLog, org.eclipse.core.runtime.content.IContentTypeManager, org.eclipse.osgi.service.localization.BundleLocalization, javax.xml.parsers.SAXParserFactory, org.eclipse.core.runtime.IAdapterManager, org.eclipse.osgi.service.debug.DebugOptions, org.eclipse.equinox.p2.core.IAgentLocation, org.eclipse.osgi.service.resolver.PlatformAdmin, org.eclipse.pde.internal.core.target.provisional.ITargetPlat formService, org.eclipse.core.runtime.jobs.IJobManager, org.osgi.service.framework.CompositeBundleFactory, org.eclipse.equinox.internal.provisional.configurator.Config urator, org.eclipse.osgi.service.environment.EnvironmentInfo, org.eclipse.update.configurator.IPlatformConfigurationFactor y, org.eclipse.osgi.service.datalocation.Location, org.osgi.service.packageadmin.PackageAdmin, org.osgi.service.startlevel.StartLevel, java.lang.ClassLoader, org.eclipse.equinox.app.IApplicationContext, org.eclipse.osgi.internal.provisional.verifier.CertificateVe rifierFactory, org.osgi.service.prefs.PreferencesService, org.eclipse.osgi.service.security.TrustEngine, org.osgi.service.permissionadmin.PermissionAdmin, org.eclipse.osgi.signedcontent.SignedContentFactory, org.osgi.service.application.ApplicationDescriptor, org.osgi.service.url.URLStreamHandlerService, org.eclipse.osgi.framework.console.CommandProvider, org.eclipse.core.resources.IWorkspace, org.eclipse.pde.core.project.IBundleProjectService, org.osgi.service.application.ApplicationHandle, org.osgi.service.condpermadmin.ConditionalPermissionAdmin]


Do you know who is responsible to register service for class org.eclipse.equinox.internal.provisional.frameworkadmin.Fram eworkAdmin?
--
Aurelien Pupier - BonitaSoft S.A.
"http://scratsh.wordpress.com/"


Aurélien Pupier - Red Hat
Senior Software Engineer in Fuse Tooling team
Re: NPE in AbstractBundleContainer with Eclipse 3.6 [message #605875 is a reply to message #605866] Thu, 27 May 2010 16:49 Go to previous messageGo to next message
Aurélien Pupier is currently offline Aurélien PupierFriend
Messages: 637
Registered: July 2009
Location: Grenoble, FRANCE
Senior Member

me again.

I find who was registering the FrameworkAdmin service in 3.5. It was in the start of the bundle /org.eclipse.equinox.frameworkadmin.equinox

But with the new version there is no more Activator and so on no launch of this service on start.
--
Aurelien Pupier - BonitaSoft S.A.
"http://scratsh.wordpress.com/"


Aurélien Pupier - Red Hat
Senior Software Engineer in Fuse Tooling team
Re: NPE in AbstractBundleContainer with Eclipse 3.6 [message #605878 is a reply to message #605866] Thu, 27 May 2010 17:49 Go to previous messageGo to next message
Aurélien Pupier is currently offline Aurélien PupierFriend
Messages: 637
Registered: July 2009
Location: Grenoble, FRANCE
Senior Member

ok problem solved!!

After ask on equinox forum ( http://www.eclipse.org/forums/index.php?t=msg&goto=53634 5&#msg_num_1)

now the service is launched using Declarative Service and so on: the plugin org.eclipse.equinox.ds is required

So org.eclipse.pde.core required org.eclipse.equinox.ds.
Do I need to open a bug for that?

Regards,
--
Aurelien Pupier - BonitaSoft S.A.
"http://scratsh.wordpress.com/"


Aurélien Pupier - Red Hat
Senior Software Engineer in Fuse Tooling team
Re: NPE in AbstractBundleContainer with Eclipse 3.6 [message #605882 is a reply to message #605866] Thu, 27 May 2010 18:55 Go to previous messageGo to next message
Aurélien Pupier is currently offline Aurélien PupierFriend
Messages: 637
Registered: July 2009
Location: Grenoble, FRANCE
Senior Member

Ok, so it is just needed to avoid the NPE if the service is not here, isn't it?
--
Aurelien Pupier - BonitaSoft S.A.
"http://scratsh.wordpress.com/"


Aurélien Pupier - Red Hat
Senior Software Engineer in Fuse Tooling team
Re: NPE in AbstractBundleContainer with Eclipse 3.6 [message #605883 is a reply to message #605866] Thu, 27 May 2010 20:29 Go to previous message
Curtis Windatt is currently offline Curtis WindattFriend
Messages: 166
Registered: July 2009
Senior Member
If the framework admin service is unavailable you are going to encounter other problems working with the target, but I suppose a core exception saying the service can't be found is better than an npe.

If you file a bug against PDE UI I will look at it for 3.7.
Previous Topic:NPE in AbstractBundleContainer with Eclipse 3.6
Next Topic:Problem PDE + CVS
Goto Forum:
  


Current Time: Tue Apr 23 06:12:42 GMT 2024

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

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

Back to the top