org.glassfish.embeddable.GlassFishException: org.osgi.framework.BundleException: Bundle org.apache.felix.framework [0] cannot be stopped since it is already stopping.

Oracle Community | oversteer | 5 years ago
  1. 0

    Glassfish 3.1.1 unable to deploy web application

    Oracle Community | 5 years ago | oversteer
    org.glassfish.embeddable.GlassFishException: org.osgi.framework.BundleException: Bundle org.apache.felix.framework [0] cannot be stopped since it is already stopping.
  2. 0

    [FelixDispatchQueue] DEBUG com.springsource.net.sf.cglib - BundleEvent RESOLVED [FelixDispatchQueue] DEBUG org.springframework.aop - BundleEvent RESOLVED [FelixDispatchQueue] DEBUG com.springsource.edu.emory.mathcs.backport - BundleEvent RESOLVED [FelixStartLevel] DEBUG org.ops4j.pax.swissbox.extender.BundleWatcher - Scanning bundle [org.springframework.beans] [FelixDispatchQueue] DEBUG org.springframework.aop - BundleEvent STARTED [FelixDispatchQueue] DEBUG org.springframework.beans - BundleEvent STARTED [FelixStartLevel] DEBUG org.ops4j.pax.swissbox.extender.BundleWatcher - Scanning bundle [org.springframework.context] [FelixDispatchQueue] DEBUG org.springframework.context - BundleEvent RESOLVED [FelixDispatchQueue] DEBUG org.springframework.context - BundleEvent STARTED [FelixStartLevel] DEBUG org.ops4j.pax.swissbox.extender.BundleWatcher - Scanning bundle [org.springframework.context.support] [FelixStartLevel] DEBUG org.ops4j.pax.swissbox.extender.BundleWatcher - Scanning bundle [org.springframework.core] [FelixDispatchQueue] DEBUG org.springframework.context.support - BundleEvent RESOLVED [FelixDispatchQueue] DEBUG org.springframework.context.support - BundleEvent STARTED [FelixDispatchQueue] DEBUG org.springframework.core - BundleEvent STARTED [FelixStartLevel] DEBUG org.ops4j.pax.swissbox.extender.BundleWatcher - Scanning bundle [com.springsource.org.objectweb.asm] [FelixDispatchQueue] DEBUG com.springsource.org.objectweb.asm - BundleEvent RESOLVED [FelixDispatchQueue] DEBUG com.springsource.org.objectweb.asm - BundleEvent STARTED [FelixStartLevel] DEBUG org.ops4j.pax.swissbox.extender.BundleWatcher - Scanning bundle [com.springsource.edu.emory.mathcs.backport] [FelixDispatchQueue] DEBUG com.springsource.edu.emory.mathcs.backport - BundleEvent STARTED [FelixStartLevel] DEBUG org.ops4j.pax.swissbox.extender.BundleWatcher - Scanning bundle [com.springsource.net.sf.cglib] [FelixDispatchQueue] DEBUG com.springsource.net.sf.cglib - BundleEvent STARTED [FelixStartLevel] DEBUG org.ops4j.pax.swissbox.extender.BundleWatcher - Scanning bundle [org.springframework.osgi.extensions.annotations] [FelixStartLevel] DEBUG org.ops4j.pax.swissbox.extender.BundleWatcher - Scanning bundle [org.springframework.osgi.core] [FelixDispatchQueue] DEBUG org.springframework.osgi.core - BundleEvent RESOLVED [FelixDispatchQueue] DEBUG org.springframework.osgi.io - BundleEvent RESOLVED [FelixDispatchQueue] DEBUG org.springframework.osgi.extender - BundleEvent RESOLVED [FelixDispatchQueue] DEBUG org.springframework.osgi.extensions.annotations - BundleEvent RESOLVED [FelixDispatchQueue] DEBUG org.springframework.osgi.extensions.annotations - BundleEvent STARTED [FelixDispatchQueue] DEBUG org.springframework.osgi.core - BundleEvent STARTED [FelixDispatchQueue] DEBUG pax-exam-probe - BundleEvent INSTALLED [RMI TCP Connection(1)-192.168.1.35] DEBUG org.ops4j.pax.swissbox.extender.BundleWatcher - Scanning bundle [pax-exam-probe] [FelixDispatchQueue] DEBUG pax-exam-probe - BundleEvent RESOLVED [RMI TCP Connection(1)-192.168.1.35] DEBUG org.ops4j.pax.swissbox.extender.BundleWatcher - Found resources [ManifestEntry{ key=PaxExam-TestMethodName, value=testConfig }, ManifestEntry{ key=PaxExam-TestClassName, value=org.ops4j.pax.exam.it.ProfilesRepositoryTest }] [RMI TCP Connection(1)-192.168.1.35] INFO org.ops4j.pax.exam.junit.extender.impl.internal.TestBundleObserver - Found test: org.ops4j.pax.exam.it.ProfilesRepositoryTest.testConfig [RMI TCP Connection(1)-192.168.1.35] DEBUG pax-exam-probe - ServiceEvent REGISTERED [RMI TCP Connection(1)-192.168.1.35] INFO org.ops4j.pax.exam.junit.extender.impl.internal.TestBundleObserver - Registered testcase [org.ops4j.pax.exam.it.ProfilesRepositoryTest.testConfig] [FelixDispatchQueue] DEBUG pax-exam-probe - BundleEvent STARTED [FelixStartLevel] INFO org.springframework.osgi.extender.internal.activator.ContextLoaderListener - Starting [org.springframework.osgi.extender] bundle v.[1.2.0.rc1] [RMI TCP Connection(1)-192.168.1.35] INFO org.ops4j.pax.exam.rbc.internal.RemoteBundleContextImpl - Remote call of [org.ops4j.pax.exam.junit.extender.CallableTestMethod.call] [RMI TCP Connection(1)-192.168.1.35] INFO org.ops4j.pax.exam.rbc.internal.RemoteBundleContextImpl - Look up service [org.ops4j.pax.exam.junit.extender.CallableTestMethod], timeout in 0 millis Checking bundle states.. [ PaxRunnerTestContainer] - Shutting down the test container (Pax Runner) [FelixStartLevel] DEBUG org.springframework.osgi.extender.internal.support.NamespaceManager - Adding namespace handler resolver for Spring AOP (org.springframework.aop) [FelixStartLevel] DEBUG org.springframework.osgi.extender.internal.support.NamespacePlugins - Adding as handler Spring AOP (org.springframework.aop) org.ops4j.pax.exam.spi.container.TestContainerException: System bundle cannot be stopped at org.ops4j.pax.exam.rbc.client.RemoteBundleContextClient.stop(RemoteBundleContextClient.java:209) at org.ops4j.pax.exam.container.def.internal.PaxRunnerTestContainer.stop(PaxRunnerTestContainer.java:158) at org.ops4j.pax.exam.junit.internal.JUnit4TestMethod.invoke(JUnit4TestMethod.java:121) at org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98) at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79) at org.ops4j.pax.exam.junit.internal.JUnit4MethodRoadie.runBeforesThenTestThenAfters(JUnit4MethodRoadie.java:60) at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77) at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42) at org.ops4j.pax.exam.junit.JUnit4TestRunner.invokeTestMethod(JUnit4TestRunner.java:221) at org.ops4j.pax.exam.junit.JUnit4TestRunner.runMethods(JUnit4TestRunner.java:171) at org.ops4j.pax.exam.junit.JUnit4TestRunner$1.run(JUnit4TestRunner.java:161) at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27) at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37) at org.ops4j.pax.exam.junit.JUnit4TestRunner.run(JUnit4TestRunner.java:157) at com.intellij.rt.junit4.Junit4ClassSuite.run(Junit4ClassSuite.java:99) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40) Caused by: org.osgi.framework.BundleException: Stopping a bundle that is starting or stopping is currently not supported. at org.apache.felix.framework.Felix._stopBundle(Felix.java:2069) at org.apache.felix.framework.Felix.stopBundle(Felix.java:2034) at org.apache.felix.framework.Felix.stop(Felix.java:964) at org.ops4j.pax.exam.rbc.internal.RemoteBundleContextImpl.stopBundle(RemoteBundleContextImpl.java:135) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294) at sun.rmi.transport.Transport$1.run(Transport.java:153) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:149) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707) at java.lang.Thread.run(Thread.java:613) at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247) at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126) at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:179) at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:132) at $Proxy8.stopBundle(Unknown Source) at org.ops4j.pax.exam.rbc.client.RemoteBundleContextClient.stop(RemoteBundleContextClient.java:201) ... 20 more

    JIRA | 8 years ago | Toni Menzel
    org.ops4j.pax.exam.spi.container.TestContainerException: System bundle cannot be stopped
  3. 0

    Sometimes (not always reproducible) I got an the following exception with Felix: "Stopping a bundle that is starting or stopping is currently not supported." (see stack trace bellow) This happens (I suppose) due to the fact that the RBC is called before the framework has been fully started. To avoid this situation when calling RBC it should verify is the framework is already in a started state and if not wait (maybe with a timeout) for the framework to start and only then stop the frameowork. Here is an example failing test: {code} org.ops4j.pax.exam.it.MultiFrameworkOptionsTest All versions are up and running [felix/1.2.0] org.ops4j.pax.exam.spi.container.TestContainerException: System bundle cannot be stopped at org.ops4j.pax.exam.rbc.client.RemoteBundleContextClient.stop(RemoteBundleContextClient.java:209) at org.ops4j.pax.exam.container.def.internal.PaxRunnerTestContainer.stop(PaxRunnerTestContainer.java:160) at org.ops4j.pax.exam.junit.internal.JUnit4TestMethod.invoke(JUnit4TestMethod.java:120) at org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98) at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79) at org.ops4j.pax.exam.junit.internal.JUnit4MethodRoadie.runBeforesThenTestThenAfters(JUnit4MethodRoadie.java:60) at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77) at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42) at org.ops4j.pax.exam.junit.JUnit4TestRunner.invokeTestMethod(JUnit4TestRunner.java:245) at org.ops4j.pax.exam.junit.JUnit4TestRunner.runMethods(JUnit4TestRunner.java:195) at org.ops4j.pax.exam.junit.JUnit4TestRunner$2.run(JUnit4TestRunner.java:185) at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27) at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37) at org.ops4j.pax.exam.junit.JUnit4TestRunner.run(JUnit4TestRunner.java:181) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127) at org.apache.maven.surefire.Surefire.run(Surefire.java:177) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997) Caused by: org.osgi.framework.BundleException: Stopping a bundle that is starting or stopping is currently not supported. at org.apache.felix.framework.Felix._stopBundle(Felix.java:2000) at org.apache.felix.framework.Felix.stopBundle(Felix.java:1972) at org.apache.felix.framework.Felix.stop(Felix.java:915) at org.ops4j.pax.exam.rbc.internal.RemoteBundleContextImpl.stopBundle(RemoteBundleContextImpl.java:135) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294) at sun.rmi.transport.Transport$1.run(Transport.java:153) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:149) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707) at java.lang.Thread.run(Thread.java:595) at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247) at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126) at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:179) at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:132) at $Proxy13.stopBundle(Unknown Source) at org.ops4j.pax.exam.rbc.client.RemoteBundleContextClient.stop(RemoteBundleContextClient.java:201) ... 23 more {code}

    JIRA | 8 years ago | Alin Dreghiciu
    org.ops4j.pax.exam.spi.container.TestContainerException: System bundle cannot be stopped
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    I've configured a cluster of two instances, both supporting web/ejb. cmi, discovery, ha, are built on tcp stack. The following error occurs when stopping the servers. 2009-11-16 11:33:31,364 : BaseWebContainerService.unRegisterWar : War jonas-admin-5.1.1-SNAPSHOT.war no longer available 2009-11-16 11:33:31,364 : Http11Protocol.pause : Pausing Coyote HTTP/1.1 on http-9200 Connected on service:jmx:rmi:///jndi/rmi://localhost:2002/jrmpconnector_node1 Trying to stop server named node1 2009-11-16 11:33:31,536 : BaseModelMBean.invoke : Exception invoking method halt org.osgi.framework.BundleException: Bundle org.apache.felix.framework [0] cannot be stopped, since it is either starting or stopping. at org.apache.felix.framework.Felix.stopBundle(Felix.java:1784) at org.apache.felix.framework.Felix.stop(Felix.java:752) at org.ow2.jonas.services.bootstrap.JOnASConfiguration.__haltServer(JOnASConfiguration.java:133) at org.ow2.jonas.services.bootstrap.JOnASConfiguration.haltServer(JOnASConfiguration.java) at org.ow2.jonas.lib.jmbeans.J2EEServer.__halt(J2EEServer.java:467) at org.ow2.jonas.lib.jmbeans.J2EEServer.halt(J2EEServer.java) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:458) at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213) at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784) at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1410) at javax.management.remote.rmi.RMIConnectionImpl.access$100(RMIConnectionImpl.java:81) at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1247) at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1343) at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:784) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294) at sun.rmi.transport.Transport$1.run(Transport.java:153) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:149) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707) at java.lang.Thread.run(Thread.java:595) [ERROR] Can't stop server node1 using MBean sampleClusterDomain:j2eeType=J2EEServer,name=node1. [ERROR] Cause: [BundleException] Bundle org.apache.felix.framework [0] cannot be stopped, since it is either starting or stopping.

    JIRA | 7 years ago | stephane zeng
    org.osgi.framework.BundleException: Bundle org.apache.felix.framework [0] cannot be stopped, since it is either starting or stopping.
  6. 0

    Status of the bundle is starting

    GitHub | 3 years ago | cmoulliard
    org.osgi.framework.BundleException: Bundle simple-kie-ci [102] cannot be update, since it is either starting or stopping.

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.osgi.framework.BundleException

      Bundle org.apache.felix.framework [0] cannot be stopped since it is already stopping.

      at org.apache.felix.framework.Felix.stopBundle()
    2. Apache Felix Framework
      Felix.stop
      1. org.apache.felix.framework.Felix.stopBundle(Felix.java:2139)
      2. org.apache.felix.framework.Felix.stop(Felix.java:869)
      2 frames
    3. Appserver Core
      GlassFishMain$Launcher$1.run
      1. com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishRuntime.shutdown(OSGiGlassFishRuntime.java:76)
      2. com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher$1.run(GlassFishMain.java:203)
      2 frames