You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2014/05/15 01:10:33 UTC

[jira] [Commented] (AXIS2-4847) IllegalStateException: Can only register services while bundle is active or activating.

    [ https://issues.apache.org/jira/browse/AXIS2-4847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13998244#comment-13998244 ] 

Hudson commented on AXIS2-4847:
-------------------------------

FAILURE: Integrated in axis2-1.6 #339 (See [https://builds.apache.org/job/axis2-1.6/339/])
Merged the changes for AXIS2-4847 / AXIS2-5329 to the 1.6 branch. (veithen: rev 1594748)
* /axis/axis2/java/core/branches/1_6
* /axis/axis2/java/core/branches/1_6/modules/osgi-tests
* /axis/axis2/java/core/branches/1_6/modules/osgi-tests/pom.xml
* /axis/axis2/java/core/branches/1_6/modules/osgi-tests/src/test/java/OSGiTest.java
* /axis/axis2/java/core/branches/1_6/modules/osgi-tests/src/test/java/org
* /axis/axis2/java/core/branches/1_6/modules/osgi-tests/src/test/java/org/apache/axis2/osgi/module
* /axis/axis2/java/core/branches/1_6/modules/osgi-tests/src/test/resources
* /axis/axis2/java/core/branches/1_6/modules/osgi-tests/src/test/resources/META-INF/module.xml
* /axis/axis2/java/core/branches/1_6/modules/osgi/src/org/apache/axis2/osgi/OSGiAxisServlet.java
* /axis/axis2/java/core/branches/1_6/modules/osgi/src/org/apache/axis2/osgi/deployment/OSGiServerConfigurator.java
* /axis/axis2/java/core/branches/1_6/modules/osgi/src/org/apache/axis2/osgi/internal/Activator.java
* /axis/axis2/java/core/branches/1_6/pom.xml


> IllegalStateException: Can only register services while bundle is active or activating.
> ---------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4847
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4847
>             Project: Axis2
>          Issue Type: Bug
>    Affects Versions: 1.5.1
>         Environment: Apache Felix Framework 3.0.2
>            Reporter: Ancoron Luciferis
>         Attachments: AXIS2-4847.patch
>
>
> 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* [org.osgi.service.cm.ManagedService, id=68, bundle=280]: Unexpected problem updating null
> java.lang.IllegalStateException: Can only register services while bundle is active or activating.
> 	at org.apache.felix.framework.Felix.registerService(Felix.java:2817)
> 	at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:251)
> 	at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:229)
> 	at org.apache.axis2.osgi.deployment.OSGiConfigurationContextFactory.updated(OSGiConfigurationContextFactory.java:107)
> 	at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1112)
> 	at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:88)
> And because of that I then get:
> org.osgi.framework.BundleException: Activator start error in bundle org.apache.axis2.osgi [280].
> 	at org.apache.felix.framework.Felix.activateBundle(Felix.java:1864)
> 	at org.apache.felix.framework.Felix.startBundle(Felix.java:1734)
> 	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:905)
> 	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:892)
> 	at com.profitbricks.osgi.test.FelixTest.testModules(FelixTest.java:241)
> Caused by: java.lang.NullPointerException: Specified service reference cannot be null.
> 	at org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:319)
> 	at org.apache.axis2.osgi.internal.Activator$HttpServiceTracker.addingService(Activator.java:79)
> 	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:896)
> 	at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:261)
> 	at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:184)
> 	at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:339)
> 	at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:273)
> 	at org.apache.axis2.osgi.internal.Activator.start(Activator.java:50)
> 	at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:633)
> 	at org.apache.felix.framework.Felix.activateBundle(Felix.java:1817)
> 	... 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 was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org