1 Reply Latest reply on Feb 17, 2013 6:06 PM by Sham HC

    java.lang.IllegalStateException when starting CQ5 quickstart

    u005078 Level 1

      During CQ5-Start (with the quickstart/bin/start-script) I get every now and then the stack-trace:

       

      RAWProcessor succesfully installed

      java.lang.IllegalStateException: Can only register services while bundle is active or activating.

              at org.apache.felix.framework.Felix.registerService(Felix.java:2824)

              at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:251)

              at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:229)

              at org.apache.sling.bundleresource.impl.BundleResourceProvider.registerService(BundleResourc eProvider.java:81)

              at org.apache.sling.bundleresource.impl.Activator.addBundleResourceProvider(Activator.java:1 18)

              at org.apache.sling.bundleresource.impl.Activator.bundleChanged(Activator.java:95)

              at org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatc her.java:807)

              at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java :729)

              at org.apache.felix.framework.util.EventDispatcher.run(EventDispatcher.java:949)

              at org.apache.felix.framework.util.EventDispatcher.access$000(EventDispatcher.java:54)

              at org.apache.felix.framework.util.EventDispatcher$1.run(EventDispatcher.java:106)

              at java.lang.Thread.run(Thread.java:722)

       

      The stdout.log displays:

      ERROR: [Thread[FelixDispatchQueue,5,main]] Waited too long to acquire lock for bundle org.apache.sling.bundleresource.impl [95] owned by null (lockcount=0); giving up.

      ERROR: Bundle org.apache.sling.bundleresource.impl [95]: EventDispatcher: Error during dispatch. (java.lang.IllegalStateException: Can only register services while bundle is active or activating.)

       

      I verified the Bundle via the OSGi-console, it's active.My interpretation is, that we see a timing problem - something is not ready in the expected time frame but at last it is fixed then automatically.

       

      I would love to know what happened here, what I can  do to prevent this message and what I can do to track this error myself. Any hint is appreciated.

       

      Ulrich

        • 1. Re: java.lang.IllegalStateException when starting CQ5 quickstart
          Sham HC Level 7

          Hi Ulrich,

           

             I am seen this issue once & carefully analysing logs found that CQ already loaded the bundle but was trying to load it again.

             Hence the error & Should be ok in my case. Please check your logs again after one more restart to see if you are still seeing this error.

             If you are encountering every time please file a daycare ticket with all the logs.

            

          Thanks,

          Sham