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.sling.bundleresource.impl.BundleResourceProvider.registerService(BundleResourc eProvider.java:81)
at org.apache.sling.bundleresource.impl.Activator.addBundleResourceProvider(Activator.java:1 18)
at org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatc her.java:807)
at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java :729)
The stdout.log displays:
ERROR: [Thread[FelixDispatchQueue,5,main]] Waited too long to acquire lock for bundle org.apache.sling.bundleresource.impl  owned by null (lockcount=0); giving up.
ERROR: Bundle org.apache.sling.bundleresource.impl : 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.
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.