Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » FrameworkAdmin Service is not started as expected
FrameworkAdmin Service is not started as expected [message #1383788] Mon, 26 May 2014 14:44 Go to next message
Christoph Keimel is currently offline Christoph Keimel
Messages: 367
Registered: December 2010
Location: Germany
Senior Member
Hello

I am currently upgrading our applications to the current plug-ins shipped with luna RC1 and I ran into trouble with services not beeing started as expected.

For instance: We use the p2 GarbageCollector to clean up after updates. Using the updated target, we run into following exception:

!ENTRY org.eclipse.equinox.p2.garbagecollector 4 2 2014-05-26 15:42:31.714
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.equinox.p2.garbagecollector".
!STACK 0
java.lang.NullPointerException
	at org.eclipse.equinox.internal.p2.touchpoint.eclipse.WhatIsRunning.getBundlesBeingRun(WhatIsRunning.java:17)
	at org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseMarkSetProvider.addRunningBundles(EclipseMarkSetProvider.java:101)
	at org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseMarkSetProvider.getMarkSets(EclipseMarkSetProvider.java:46)
	at org.eclipse.equinox.internal.p2.garbagecollector.GarbageCollector$ParameterizedSafeRunnable.run(GarbageCollector.java:69)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.equinox.internal.p2.garbagecollector.GarbageCollector.contributeMarkSets(GarbageCollector.java:97)
	at org.eclipse.equinox.internal.p2.garbagecollector.GarbageCollector.traverseMainProfile(GarbageCollector.java:202)
	at org.eclipse.equinox.internal.p2.garbagecollector.GarbageCollector.runGC(GarbageCollector.java:159)
	at de.emsw.gosa.p2.GarbageCollectionAction.execute(GarbageCollectionAction.java:38)
	...

Debugging the code the reason for the error ist that LazyManipulator.getFrameworkAdmin() now returns null. I'm not sure what change is responsible for this, since this code hasn't changed (as far I as I can see). This used to return an instance of org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxFwAdminImpl (a dynamic service implementing FrameworkAdmin started by org.eclipse.equinox.frameworkadmin.equinox).

Using the console I noticed that the state of the bundle org.eclipse.equinox.frameworkadmin.equinox is STARTING. Before it would be ACTIVE.

Before:
154	ACTIVE      org.eclipse.equinox.frameworkadmin_2.0.100.v20130327-2119
155	ACTIVE      org.eclipse.equinox.frameworkadmin.equinox_1.0.500.v20131211-1531

Now:
154	ACTIVE      org.eclipse.equinox.frameworkadmin_2.0.100.v20131209-2144
155	STARTING    org.eclipse.equinox.frameworkadmin.equinox_1.0.500.v20131211-1531

Checking for the service in the console I used to see:
{org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdmin}={org.eclipse.equinox.frameworkhandler.launcher.version=3.2, component.name=org.eclipse.equinox.frameworkadmin.equinox, component.id=33, org.eclipse.equinox.frameworkhandler.framework.name=Equinox, org.eclipse.equinox.frameworkhandler.launcher.name=Eclipse.exe, org.eclipse.equinox.frameworkhandler.framework.version=3.3, service.id=80}
  "Registered by bundle:" org.eclipse.equinox.frameworkadmin.equinox_1.0.500.v20131211-1531 [155]
  "No bundles using service."
Now the service is missing.

What can I do? Any pointers are very welcome.

Thanks!
Christoph

[Updated on: Mon, 26 May 2014 16:53]

Report message to a moderator

Re: FrameworkAdmin Service is not started as expected [message #1383885 is a reply to message #1383788] Mon, 26 May 2014 16:51 Go to previous messageGo to next message
Christoph Keimel is currently offline Christoph Keimel
Messages: 367
Registered: December 2010
Location: Germany
Senior Member
Addition: I tried to create a dummy component to "force" the FrameworkAdmin service to start

<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="de.emsw.gosa.p2.dummy">
   <implementation class="de.emsw.gosa.p2.internal.P2Component"/>
   <reference cardinality="1..1" interface="org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdmin" name="FrameworkAdmin" policy="static"/>
</scr:component>

This did not help. As soon as I add the service reference, the component is not activated.

This makes sense, since the interface is not visible to other plugins.

[Updated on: Tue, 27 May 2014 13:12]

Report message to a moderator

Re: FrameworkAdmin Service is not started as expected [message #1383974 is a reply to message #1383885] Tue, 27 May 2014 15:19 Go to previous message
Christoph Keimel is currently offline Christoph Keimel
Messages: 367
Registered: December 2010
Location: Germany
Senior Member
I built a test project to reproduce the problem and filed a bug report:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=435938
Previous Topic:Trying to debug someone else's use of p2
Next Topic:How to run Java Applet in Kura OSGI framework?
Goto Forum:
  


Current Time: Tue Oct 21 15:30:45 GMT 2014

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

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