org.springframework.context.ApplicationContextException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Crucible fails to start up - Atlassian Answers
    via by Unknown author,
  • On a brand new installation or upgraded instance, the plugin Atlassian OAuth Service Provider Plugin ({{com.atlassian.oauth.atlassian-oauth-service-provider-plugin}}) fail to start with the following stacktrace: {noformat}2014-01-28 13:13:30,705 WARN [Timer-4] [internal.dependencies.startup.DependencyWaiterApplicationContextExecutor] timeout Timeout occurred before finding service dependencies for [NonValidatingOsgiBundleXmlApplicationContext(bundle=com.atlassian.oauth.atlassian-oauth-service-provider-plugin, config=osgibundle:/META-INF/spring/*.xml)] 2014-01-28 13:13:30,708 ERROR [Timer-4] [internal.dependencies.startup.DependencyWaiterApplicationContextExecutor] fail Unable to create application context for [com.atlassian.oauth.atlassian-oauth-service-provider-plugin], unsatisfied dependencies: Dependency on [(objectClass=com.atlassian.sal.api.auth.OAuthRequestVerifierFactory)] (from bean [&oAuthRequestVerifierFactory]) org.springframework.context.ApplicationContextException: Application context initialization for 'com.atlassian.oauth.atlassian-oauth-service-provider-plugin' has timed out at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.timeout(DependencyWaiterApplicationContextExecutor.java:454) at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.access$000(DependencyWaiterApplicationContextExecutor.java:50) at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$WatchDogTask.run(DependencyWaiterApplicationContextExecutor.java:105) at java.util.TimerThread.mainLoop(Unknown Source) at java.util.TimerThread.run(Unknown Source) 2014-01-28 13:13:30,709 ERROR [Timer-4] [plugin.osgi.factory.OsgiPlugin] logAndClearOustandingDependencies Never resolved service '&oAuthRequestVerifierFactory' for plugin 'com.atlassian.oauth.serviceprovider' with filter (objectClass=com.atlassian.sal.api.auth.OAuthRequestVerifierFactory) 2014-01-28 13:13:30,710 ERROR [Timer-4] [plugin.osgi.factory.OsgiPlugin] onPluginContainerFailed Unable to start the plugin container for plugin com.atlassian.oauth.serviceprovider org.springframework.context.ApplicationContextException: Application context initialization for 'com.atlassian.oauth.atlassian-oauth-service-provider-plugin' has timed out at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.timeout(DependencyWaiterApplicationContextExecutor.java:454) at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.access$000(DependencyWaiterApplicationContextExecutor.java:50) at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$WatchDogTask.run(DependencyWaiterApplicationContextExecutor.java:105) at java.util.TimerThread.mainLoop(Unknown Source) at java.util.TimerThread.run(Unknown Source) {noformat} As a consequence, OAuth authentication does not work in the application links. This has been reproduced with the timeout set to 5 minutes ({{-Datlassian.plugins.enable.wait=300}})
    via by Alex Conde [Atlassian],
  • On a brand new installation or upgraded instance, the plugin Atlassian OAuth Service Provider Plugin ({{com.atlassian.oauth.atlassian-oauth-service-provider-plugin}}) fail to start with the following stacktrace: {noformat}2014-01-28 13:13:30,705 WARN [Timer-4] [internal.dependencies.startup.DependencyWaiterApplicationContextExecutor] timeout Timeout occurred before finding service dependencies for [NonValidatingOsgiBundleXmlApplicationContext(bundle=com.atlassian.oauth.atlassian-oauth-service-provider-plugin, config=osgibundle:/META-INF/spring/*.xml)] 2014-01-28 13:13:30,708 ERROR [Timer-4] [internal.dependencies.startup.DependencyWaiterApplicationContextExecutor] fail Unable to create application context for [com.atlassian.oauth.atlassian-oauth-service-provider-plugin], unsatisfied dependencies: Dependency on [(objectClass=com.atlassian.sal.api.auth.OAuthRequestVerifierFactory)] (from bean [&oAuthRequestVerifierFactory]) org.springframework.context.ApplicationContextException: Application context initialization for 'com.atlassian.oauth.atlassian-oauth-service-provider-plugin' has timed out at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.timeout(DependencyWaiterApplicationContextExecutor.java:454) at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.access$000(DependencyWaiterApplicationContextExecutor.java:50) at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$WatchDogTask.run(DependencyWaiterApplicationContextExecutor.java:105) at java.util.TimerThread.mainLoop(Unknown Source) at java.util.TimerThread.run(Unknown Source) 2014-01-28 13:13:30,709 ERROR [Timer-4] [plugin.osgi.factory.OsgiPlugin] logAndClearOustandingDependencies Never resolved service '&oAuthRequestVerifierFactory' for plugin 'com.atlassian.oauth.serviceprovider' with filter (objectClass=com.atlassian.sal.api.auth.OAuthRequestVerifierFactory) 2014-01-28 13:13:30,710 ERROR [Timer-4] [plugin.osgi.factory.OsgiPlugin] onPluginContainerFailed Unable to start the plugin container for plugin com.atlassian.oauth.serviceprovider org.springframework.context.ApplicationContextException: Application context initialization for 'com.atlassian.oauth.atlassian-oauth-service-provider-plugin' has timed out at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.timeout(DependencyWaiterApplicationContextExecutor.java:454) at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.access$000(DependencyWaiterApplicationContextExecutor.java:50) at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$WatchDogTask.run(DependencyWaiterApplicationContextExecutor.java:105) at java.util.TimerThread.mainLoop(Unknown Source) at java.util.TimerThread.run(Unknown Source) {noformat} As a consequence, OAuth authentication does not work in the application links. This has been reproduced with the timeout set to 5 minutes ({{-Datlassian.plugins.enable.wait=300}})
    via by Alejandro Conde Carrillo,
  • Atlassian Blogs
    via by Unknown author,
  • Create a bundle projet A where applicationContext.xml declares : - component auto scan on a package X - a dataSource (for a MySQL DB for example) In the package X, I create a class Dummy annotated by @Repository having a dependency on a DataSource (via @Resource). In the manifest, I import the Spring library and the mySQL Driver package, but *not* the javax.sql package. I also export the Dummy class as an OSGi service. I then create a second bundle B with a web personality and a controller where the Dummy service is injected into a controller (to force the publishing of the service). When trying to deploy the par file composed of A and B bundles, I get the following S2AP startup log: [2008-07-03 01:26:03.491] main <SPKB0001I> Platform starting. [2008-07-03 01:26:05.914] main <SPKE0000I> Boot subsystems installed. [2008-07-03 01:26:06.511] main <SPKE0001I> Base subsystems installed. [2008-07-03 01:26:07.169] platform-dm-1 <SPPM0000I> Installing profile 'web'. [2008-07-03 01:26:07.568] platform-dm-7 <SPSC0001I> Creating HTTP/1.1 connector with scheme http on port 7070. [2008-07-03 01:26:07.611] platform-dm-7 <SPSC0001I> Creating HTTP/1.1 connector with scheme https on port 7443. [2008-07-03 01:26:07.616] platform-dm-7 <SPSC0001I> Creating AJP/1.3 connector with scheme http on port 7009. [2008-07-03 01:26:07.691] platform-dm-7 <SPSC0000I> Starting ServletContainer. [2008-07-03 01:26:07.713] platform-dm-1 <SPPM0001I> Installed profile 'web'. [2008-07-03 01:26:08.174] platform-dm-14 <SPPM0002I> Platform open for business with profile 'web'. [2008-07-03 01:26:08.356] Deployer Recovery <SPSC1000I> Creating web application '/'. [2008-07-03 01:26:08.442] async-delivery-thread-1 <SPSC1001I> Starting web application '/'. [2008-07-03 01:26:08.675] Deployer Recovery <SPDE0010I> Deployment of 'platform.admin.splash-1.0.0.beta8.war' version '0' completed. [2008-07-03 01:26:09.030] Deployer Recovery <SPSC1000I> Creating web application '/admin'. [2008-07-03 01:26:09.101] async-delivery-thread-1 <SPSC1001I> Starting web application '/admin'. [2008-07-03 01:26:09.503] Deployer Recovery <SPDE0010I> Deployment of 'platform.admin.web-1.0.0.beta8.war' version '0' completed. [2008-07-03 01:26:10.284] Deployer Recovery <SPSC1000I> Creating web application '/services'. [2008-07-03 01:26:10.598] async-delivery-thread-1 <SPSC1001I> Starting web application '/services'. [2008-07-03 01:26:10.760] Deployer Recovery <SPDE0010I> Deployment of 'djo.q2.proto' version '1' completed. [2008-07-03 01:26:10.766] fs-watcher <SPDE0048I> Processing 'INITIAL' event for file 'platform.admin.splash-1.0.0.beta8.war'. [2008-07-03 01:26:10.770] fs-watcher <SPDE0048I> Processing 'INITIAL' event for file 'platform.admin.web-1.0.0.beta8.war'. [2008-07-03 01:26:32.650] platform-tomcat-thread-1 <SPSC1000I> Creating web application '/dummy'. [2008-07-03 01:26:33.858] service-monitor-thread-1 <SPCC0001W> Mandatory reference '&dummy' waiting for service with filter '(&(objectClass=djo.bug.sample.producer.api.IDummy)(com.springsource.platform.app.name=djo.bug.sample-1))'. [2008-07-03 01:26:35.852] service-monitor-thread-1 <SPCC0001W> Mandatory reference '&dummy' waiting for service with filter '(&(objectClass=djo.bug.sample.producer.api.IDummy)(com.springsource.platform.app.name=djo.bug.sample-1))'. [2008-07-03 01:26:39.853] service-monitor-thread-1 <SPCC0001W> Mandatory reference '&dummy' waiting for service with filter '(&(objectClass=djo.bug.sample.producer.api.IDummy)(com.springsource.platform.app.name=djo.bug.sample-1))'. [2008-07-03 01:26:47.853] service-monitor-thread-1 <SPCC0001W> Mandatory reference '&dummy' waiting for service with filter '(&(objectClass=djo.bug.sample.producer.api.IDummy)(com.springsource.platform.app.name=djo.bug.sample-1))'. [2008-07-03 01:27:02.714] async-delivery-thread-1 <SPWE1001E> Failed to create web application '/dummy': the associated web bundle 'djo.bug.sample-1-djo.bug.sample.consumer' failed to publish its ApplicationContext within 30 seconds. [2008-07-03 01:27:02.723] platform-tomcat-thread-1 <SPDE0040E> Deployment of module 'file [/home/djo/java/servers/springsource-ap-1.0.0.beta8/work/com.springsource.platform.deployer/Module/djo.bug.sample-1/djo.bug.sample.producer-1.0.0.jar]' took too long and timed out. [2008-07-03 01:27:02.848] platform-tomcat-thread-1 <SPDE0011E> Deployment failed. [2008-07-03 01:27:03.853] service-monitor-thread-1 <SPCC0001W> Mandatory reference '&dummy' waiting for service with filter '(&(objectClass=djo.bug.sample.producer.api.IDummy)(com.springsource.platform.app.name=djo.bug.sample-1))'. [2008-07-03 01:27:35.853] service-monitor-thread-1 <SPCC0001W> Mandatory reference '&dummy' waiting for service with filter '(&(objectClass=djo.bug.sample.producer.api.IDummy)(com.springsource.platform.app.name=djo.bug.sample-1))'. [2008-07-03 01:28:35.853] service-monitor-thread-1 <SPCC0001W> Mandatory reference '&dummy' waiting for service with filter '(&(objectClass=djo.bug.sample.producer.api.IDummy)(com.springsource.platform.app.name=djo.bug.sample-1))'. [2008-07-03 01:29:35.853] service-monitor-thread-1 <SPCC0001W> Mandatory reference '&dummy' waiting for service with filter '(&(objectClass=djo.bug.sample.producer.api.IDummy)(com.springsource.platform.app.name=djo.bug.sample-1))'. [2008-07-03 01:30:35.853] service-monitor-thread-1 <SPCC0001W> Mandatory reference '&dummy' waiting for service with filter '(&(objectClass=djo.bug.sample.producer.api.IDummy)(com.springsource.platform.app.name=djo.bug.sample-1))'. [2008-07-03 01:31:32.862] Timer-0 <SPDE0020E> Application context creation failure for bundle 'djo.bug.sample-1-djo.bug.sample.consumer'. org.springframework.context.ApplicationContextException: Application context initializition for 'djo.bug.sample-1-djo.bug.sample.consumer' has timed out at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.timeout(DependencyWaiterApplicationContextExecutor.java:427) at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.access$000(DependencyWaiterApplicationContextExecutor.java:51) at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$WatchDogTask.run(DependencyWaiterApplicationContextExecutor.java:114) at java.util.TimerThread.mainLoop(Timer.java:534) at java.util.TimerThread.run(Timer.java:484) [2008-07-03 01:31:35.854] service-monitor-thread-1 <SPCC0001W> Mandatory reference '&dummy' waiting for service with filter '(&(objectClass=djo.bug.sample.producer.api.IDummy)(com.springsource.platform.app.name=djo.bug.sample-1))'. [2008-07-03 01:32:35.854] service-monitor-thread-1 <SPCC0001W> Mandatory reference '&dummy' waiting for service with filter '(&(objectClass=djo.bug.sample.producer.api.IDummy)(com.springsource.platform.app.name=djo.bug.sample-1))'. [2008-07-03 01:33:35.854] service-monitor-thread-1 <SPCC0001W> Mandatory reference '&dummy' waiting for service with filter '(&(objectClass=djo.bug.sample.producer.api.IDummy)(com.springsource.platform.app.name=djo.bug.sample-1))'. [2008-07-03 01:34:35.854] service-monitor-thread-1 <SPCC0001W> Mandatory reference '&dummy' waiting for service with filter '(&(objectClass=djo.bug.sample.producer.api.IDummy)(com.springsource.platform.app.name=djo.bug.sample-1))'. No mention anywhere to a missing package import :( But when I disable component auto scan and proceed via full XML instead, I get a much better NCDFE : Caused by: java.lang.NoClassDefFoundError: javax/sql/DataSource at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2444) Anyway, I'll attach a sample project to reproduce this.
    via by Jawher Moussa,
    • org.springframework.context.ApplicationContextException: Application context initialization for 'com.atlassian.oauth.atlassian-oauth-service-provider-plugin' has timed out at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.timeout(DependencyWaiterApplicationContextExecutor.java:454) at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.access$000(DependencyWaiterApplicationContextExecutor.java:50) at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$WatchDogTask.run(DependencyWaiterApplicationContextExecutor.java:105) at java.util.TimerThread.mainLoop(Unknown Source) at java.util.TimerThread.run(Unknown Source)
    No Bugmate found.