org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tokenStore_osgiService': Initialization of bean failed; nested exception is java.lang.IllegalStateException: Can only register services while bundle is active or activating.

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Atlassian JIRA by Anton Mazkovoi [Atlassian], 1 year ago
Error creating bean with name 'tokenStore_osgiService': Initialization of bean failed; nested exception is java.lang.IllegalStateException: Can only register services while bundle is active or activating.
via Atlassian JIRA by Anton Mazkovoi [Atlassian], 1 year ago
Error creating bean with name 'tokenStore_osgiService': Initialization of bean failed; nested exception is java.lang.IllegalStateException: Can only register services while bundle is active or activating.
via atlassian.com by Unknown author, 2 years ago
Error creating bean with name 'tokenStore_osgiService': Initialization of bean failed; nested exception is java.lang.IllegalStateException: Can only register services while bundle is active or activating.
via gliffy.com by Unknown author, 2 years ago
Error creating bean with name 'gliffyLicenseManager_osgiService': Initialization of bean failed; nested exception is java.lang.IllegalStateException: Invalid BundleContext.
via atlassian.com by Unknown author, 1 year ago
Error creating bean with name 'handler' defined in URL [bundle://26.0:0/META-INF/spring/web-context.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/servlet/ServletContext
via nabble.com by Unknown author, 2 years ago
Error creating bean with name 'handler' defined in URL [bundle://24.0:0/META-INF/spring/web-context.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoun dError: javax/servlet/ServletContext
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tokenStore_osgiService': Initialization of bean failed; nested exception is java.lang.IllegalStateException: Can only register services while bundle is active or activating.
at org.apache.felix.framework.Felix.registerService(Felix.java:2676)
at org.springframework.osgi.service.exporter.support.OsgiServiceFactoryBean.registerService(OsgiServiceFactoryBean.java:310)
at org.springframework.osgi.service.exporter.support.OsgiServiceFactoryBean.registerService(OsgiServiceFactoryBean.java:279)
at org.springframework.osgi.service.exporter.support.OsgiServiceFactoryBean$Executor.registerService(OsgiServiceFactoryBean.java:95)
at org.springframework.osgi.service.exporter.support.internal.controller.ExporterController.registerService(ExporterController.java:40)
at org.springframework.osgi.service.dependency.internal.DefaultMandatoryDependencyManager.startExporter(DefaultMandatoryDependencyManager.java:325)
at org.springframework.osgi.service.dependency.internal.DefaultMandatoryDependencyManager.checkIfExporterShouldStart(DefaultMandatoryDependencyManager.java:267)
at org.springframework.osgi.service.dependency.internal.DefaultMandatoryDependencyManager.discoverDependentImporterFor(DefaultMandatoryDependencyManager.java:260)
at org.springframework.osgi.service.dependency.internal.DefaultMandatoryDependencyManager.addServiceExporter(DefaultMandatoryDependencyManager.java:191)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:361)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1344)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)
at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:136)
at java.lang.Thread.run(Thread.java:637)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 2 years ago
40 times, 1 year ago

Know the solutions? Share your knowledge to help other developers to debug faster.