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