*ERROR* [OsgiInstallerImpl] Cannot register Component (java.lang.IllegalStateException: Invalid BundleContext.)
Hello experts,
The following error occur transiently while I start up my AEM author instance (or when I rebuild and reinstall my bundles):
21.07.2014 13:14:31.849 *INFO* [OsgiInstallerImpl] org.apache.sling.audit.osgi.installer Updated bundle com.tcm.core-bundle [324] from resource TaskResource(url=jcrinstall:/apps/training/install/core-bundle-1.0-SNAPSHOT.jar, entity=bundle:com.tcm.core-bundle, state=INSTALL, attributes=[org.apache.sling.installer.api.tasks.ResourceTransformer=:77:16:, Bundle-SymbolicName=com.tcm.core-bundle, Bundle-Version=1.0.0.SNAPSHOT], digest=1405962870933)
21.07.2014 13:14:31.849 *INFO* [OsgiInstallerImpl] org.apache.sling.audit.osgi.installer Refreshing 1 bundles: [com.tcm.core-bundle [324]]
21.07.2014 13:14:31.849 *INFO* [OsgiInstallerImpl] org.apache.sling.audit.osgi.installer Waiting up to 90 seconds for bundles refresh
21.07.2014 13:14:31.858 *INFO* [FelixDispatchQueue] org.apache.felix.framework FrameworkEvent PACKAGES REFRESHED
21.07.2014 13:14:31.860 *INFO* [OsgiInstallerImpl] org.apache.sling.audit.osgi.installer Done refreshing 1 bundles
21.07.2014 13:14:31.861 *INFO* [FelixDispatchQueue] org.apache.felix.framework FrameworkEvent PACKAGES REFRESHED
21.07.2014 13:14:31.864 *INFO* [OsgiInstallerImpl] com.tcm.core-bundle BundleEvent RESOLVED
21.07.2014 13:14:31.864 *INFO* [OsgiInstallerImpl] com.tcm.core-bundle BundleEvent STARTING
21.07.2014 13:14:31.873 *ERROR* [OsgiInstallerImpl] com.tcm.core-bundle [com.tcm.core.servlets.SearchServlet] Cannot register Component (java.lang.IllegalStateException: Invalid BundleContext.) java.lang.IllegalStateException: Invalid BundleContext.
at org.apache.felix.framework.BundleContextImpl.checkValidity(BundleContextImpl.java:514)
at org.apache.felix.framework.BundleContextImpl.getBundle(BundleContextImpl.java:112)
at org.apache.felix.scr.impl.ComponentRegistry.checkComponentName(ComponentRegistry.java:355)
at org.apache.felix.scr.impl.BundleComponentActivator.loadDescriptor(BundleComponentActivator.java:240)
at org.apache.felix.scr.impl.BundleComponentActivator.initialize(BundleComponentActivator.java:149)
at org.apache.felix.scr.impl.BundleComponentActivator.<init>(BundleComponentActivator.java:113)
at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:261)
at org.apache.felix.scr.impl.Activator.bundleChanged(Activator.java:179)
at org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:868)
at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:789)
at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:514)
at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4385)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2080)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:955)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:942)
at org.apache.sling.installer.core.impl.tasks.BundleStartTask.execute(BundleStartTask.java:93)
at org.apache.sling.installer.core.impl.OsgiInstallerImpl.executeTasks(OsgiInstallerImpl.java:733)
at org.apache.sling.installer.core.impl.OsgiInstallerImpl.run(OsgiInstallerImpl.java:247)
at java.lang.Thread.run(Unknown Source)
21.07.2014 13:14:31.873 *INFO* [OsgiInstallerImpl] com.tcm.core-bundle BundleEvent STARTED
21.07.2014 13:14:31.873 *INFO* [OsgiInstallerImpl] org.apache.sling.audit.osgi.installer Started bundle com.tcm.core-bundle [324]
The problem looks "global" in nature since the same stacktrace is across multiple components of the same bundle:
21.07.2014 13:14:31.870 *ERROR* [OsgiInstallerImpl] com.tcm.core-bundle [com.tcm.core.ReplicationLogger] Cannot register Component (java.lang.IllegalStateException: Invalid BundleContext.) java.lang.IllegalStateException: Invalid BundleContext.
21.07.2014 13:14:31.870 *ERROR* [OsgiInstallerImpl] com.tcm.core-bundle [com.tcm.core.StockDataImporter] Cannot register Component (java.lang.IllegalStateException: Invalid BundleContext.) java.lang.IllegalStateException: Invalid BundleContext.
21.07.2014 13:14:31.870 *ERROR* [OsgiInstallerImpl] com.tcm.core-bundle [com.tcm.core.components.ModifyPermissions] Cannot register Component (java.lang.IllegalStateException: Invalid BundleContext.) java.lang.IllegalStateException: Invalid BundleContext.
21.07.2014 13:14:31.870 *ERROR* [OsgiInstallerImpl] com.tcm.core-bundle [com.tcm.core.components.StockAlertProcess] Cannot register Component (java.lang.IllegalStateException: Invalid BundleContext.) java.lang.IllegalStateException: Invalid BundleContext.
I am still able to see my bundle under:
http://localhost:4502/system/console/bundles
I am an AEM newbie. Your help on the cause and resolution of the error above is much appreciated.