| Web app fails to start when including ContextLoaderListener in web.xml [message #721407] |
Thu, 01 September 2011 12:48  |
pinkfloyd_360 Messages: 15 Registered: August 2011 |
Junior Member |
|
|
Hi,
I'm building a web application as a demo for all the virgo OSGi bundles and services that I created. I'm having a problem with the web application. I based my code on the virgo splash and admin web bundles.
I have a splash page (working fine with no problems) and within it I have two links: one to the admin console (working fine) and the other to a "demo" link, which points to my 'demo' web application (based on the virgo 'admin' application').
I build a PAR file, which includes those two web apps, in addition to at least 20 other modules. All are working correctly with the following exception:
1. if I include the following in the demo web.xml file, the entire PAR file doesn't deploy:
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
Here's the fail message:
[2011-09-01 09:36:40.960] start-signalling-12 <DE0006E> Start failed for bundle 'framework-0.0.1-com.sample.web.demo' version '0.0.1'. org.eclipse.virgo.kernel.deployer.core.DeploymentException: Web application failed to start
at org.eclipse.virgo.web.core.internal.WebBundleLifecycleListener.onStarted(WebBundleLifecycleListener.java:132)
at org.eclipse.virgo.kernel.install.artifact.internal.StandardArtifactStateMonitor.onStarted(StandardArtifactStateMonitor.java:247)
at org.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact.asyncStartSucceeded(AbstractInstallArtifact.java:294)
at org.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact.access$0(AbstractInstallArtifact.java:291)
at org.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact$StateMonitorSignal.signalSuccessfulCompletion(AbstractInstallArtifact.java:229)
at org.eclipse.virgo.kernel.core.internal.BundleStartTracker$1.run(BundleStartTracker.java:143)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Caused by: org.eclipse.gemini.web.core.WebApplicationStartFailedException: org.eclipse.gemini.web.core.spi.ServletContainerException: Web application at '/demo' failed to start. Check the logs for more details.
at org.eclipse.gemini.web.internal.StandardWebApplication.start(StandardWebApplication.java:108)
at org.eclipse.virgo.web.core.internal.WebBundleLifecycleListener.onStarted(WebBundleLifecycleListener.java:122)
... 8 common frames omitted
Caused by: org.eclipse.gemini.web.core.spi.ServletContainerException: Web application at '/demo' failed to start. Check the logs for more details.
at org.eclipse.gemini.web.tomcat.internal.TomcatServletContainer.startWebApplication(TomcatServletContainer.java:125)
at org.eclipse.gemini.web.internal.StandardWebApplication.start(StandardWebApplication.java:91)
... 9 common frames omitted
2. If I remove or comment the above code from web.xml file, everything loads correctly. I'm able to access the splash page and then when I try to connect to the 'demo' page I get a 404 HTTP Error. I suspect I have incorrect url-mapping for that one.
In the next few posts, I'll attach copies of my current files.
(I'm running virgo 3.0.0.RELEASE)
[Updated on: Thu, 01 September 2011 13:01] Report message to a moderator
|
|
|