org.springframework.context.ApplicationContextException: Application context initializition for 'djo.bug.sample-1-djo.bug.sample.consumer' has timed out

SpringSource Issue Tracker | Jawher Moussa | 8 years ago
  1. 0

    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.

    SpringSource Issue Tracker | 8 years ago | Jawher Moussa
    org.springframework.context.ApplicationContextException: Application context initializition for 'djo.bug.sample-1-djo.bug.sample.consumer' has timed out
  2. 0

    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.

    SpringSource Issue Tracker | 8 years ago | Jawher Moussa
    org.springframework.context.ApplicationContextException: Application context initializition for 'djo.bug.sample-1-djo.bug.sample.consumer' has timed out
  3. 0

    Servicemix 5.4 waiting for unsatisfied dependencies [[&transactionManager, &userTransaction]

    Stack Overflow | 1 year ago | mapek
    org.springframework.context.ApplicationContextException: Application context initialization for '*******' has timed out
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [FE-3916] Plugins not loading when upgrading from Java 6 to Java 7 - Atlassian JIRA

    atlassian.com | 1 year ago
    org.springframework.context.ApplicationContextException: Application context initialization for 'com.atlassian.streams.fisheye-plugin' has timed out
  6. 0

    Problem with installing Reporting/Scaffolding plugin in Confluence | ServiceRocket Community

    servicerocket.com | 9 months ago
    org.springframework.context.ApplicationContextException: Application context initialization for 'net.customware.confluence.plugin.reporting' has timed out

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. 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()
    2. org.springframework.osgi
      DependencyWaiterApplicationContextExecutor$WatchDogTask.run
      1. org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.timeout(DependencyWaiterApplicationContextExecutor.java:427)
      2. org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.access$000(DependencyWaiterApplicationContextExecutor.java:51)
      3. org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$WatchDogTask.run(DependencyWaiterApplicationContextExecutor.java:114)
      3 frames
    3. Java RT
      TimerThread.run
      1. java.util.TimerThread.mainLoop(Timer.java:534)
      2. java.util.TimerThread.run(Timer.java:484)
      2 frames