axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ancoron Luciferis (JIRA)" <>
Subject [jira] Created: (AXIS2-4847) IllegalStateException: Can only register services while bundle is active or activating.
Date Mon, 11 Oct 2010 17:05:37 GMT
IllegalStateException: Can only register services while bundle is active or activating.

                 Key: AXIS2-4847
             Project: Axis2
          Issue Type: Bug
    Affects Versions: 1.5.1
         Environment: Apache Felix Framework 3.0.2
            Reporter: Ancoron Luciferis

I'm trying to run the axis2 OSGi version 1.5.1 inside a GlassFish 3.1 (promoted build 23 currently)
and facing the following problem:

*ERROR* [, id=68, bundle=280]: Unexpected problem updating
java.lang.IllegalStateException: Can only register services while bundle is active or activating.
	at org.apache.felix.framework.Felix.registerService(
	at org.apache.felix.framework.BundleContextImpl.registerService(
	at org.apache.felix.framework.BundleContextImpl.registerService(
	at org.apache.axis2.osgi.deployment.OSGiConfigurationContextFactory.updated(

And because of that I then get:

org.osgi.framework.BundleException: Activator start error in bundle org.apache.axis2.osgi
	at org.apache.felix.framework.Felix.activateBundle(
	at org.apache.felix.framework.Felix.startBundle(
	at org.apache.felix.framework.BundleImpl.start(
	at org.apache.felix.framework.BundleImpl.start(
	at com.profitbricks.osgi.test.FelixTest.testModules(
Caused by: java.lang.NullPointerException: Specified service reference cannot be null.
	at org.apache.felix.framework.BundleContextImpl.getService(
	at org.apache.axis2.osgi.internal.Activator$HttpServiceTracker.addingService(
	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(
	at org.osgi.util.tracker.AbstractTracked.trackAdding(
	at org.osgi.util.tracker.AbstractTracked.trackInitial(
	at org.apache.axis2.osgi.internal.Activator.start(
	at org.apache.felix.framework.util.SecureAction.startActivator(
	at org.apache.felix.framework.Felix.activateBundle(
	... 33 more

When I read the code I don't really understand why the implementor chose "ManagedService"
for the "OSGiConfigurationContextFactory" as it really should be a "ManagedServiceFactory".
Additionally manually invoking the "updated" method within the activator code is counter-productive,
as it is called automatically (and must be called asynchronously) by the OSGi Config-Admin.

See sections 104.15.9 and 104.15.10 of the OSGi Compendium spec v4.2.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message