java.lang.IllegalArgumentException: bundle context should be set before refreshing the application context

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

Samebug tips

,
Expert tip

If you're unit testing, you should instantiate only the service and mock the dependencies. If you're testing integration, you should add all the mocking to the configurations file.

Solutions on the web

via Google Groups by Pavel Kuzin, 10 months ago
bundle context should be set before refreshing the application context
via Stack Overflow by user3243494
, 2 years ago
The class <strong>xbu.gbcp.bean.session.UserSession is annotated with an invalid scope</strong>
via Stack Overflow by Khush
, 2 years ago
The archive [jar:file:/var/lib/tomcat6/webapps/afghlcustomer.war!/] is malformed and will be ignored: an entry contains an illegal path [/]
java.lang.IllegalArgumentException: bundle context should be set before refreshing the application context
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.normalRefresh(AbstractDelegatedExecutionApplicationContext.java:163)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$NoDependenciesWaitRefreshExecutor.refresh(AbstractDelegatedExecutionApplicationContext.java:80)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:270)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4664)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:5289)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:928)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:912)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1831)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1515)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:126)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:219)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:308)
at org.glassfish.web.osgi.JavaEEDeploymentRequest.deploy(JavaEEDeploymentRequest.java:167)
at org.glassfish.web.osgi.JavaEEDeploymentRequest.execute(JavaEEDeploymentRequest.java:119)
at org.glassfish.web.osgi.OSGiWebContainer.deployJavaEEArtifacts(OSGiWebContainer.java:141)
at org.glassfish.web.osgi.OSGiWebContainer.deploy(OSGiWebContainer.java:106)
at org.glassfish.web.osgi.WebExtender.deploy(WebExtender.java:158)
at org.glassfish.web.osgi.WebExtender.bundleChanged(WebExtender.java:110)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEventPrivileged(Framework.java:1350)
at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEvent(Framework.java:1301)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:338)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.updateWorker(AbstractBundle.java:625)
at org.apache.felix.fileinstall.DirectoryWatcher.update(DirectoryWatcher.java:786)
at org.apache.felix.fileinstall.DirectoryWatcher.update(DirectoryWatcher.java:679)
at org.apache.felix.fileinstall.DirectoryWatcher.doInstalled(DirectoryWatcher.java:380)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 2 years ago
2 times, 6 months ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
196 more bugmates

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