javawareclipse-virgodeploying

Deploying a WAR to virgo-tomcat server


I have been stuck for the last couple of days deploying a standard WAR to Virgo-tomcat server (version 3.0.2). The standard WAR file exported from eclipse works perfectly fine on tomcat, but not when deploying to Virgo-tomcat. I have read the users-guide and the programmers guide, and as far as I'm aware - it should be a case of deploying the WAR to the VIRGO_HOME/pickup directory (or alternatively using the application manager). I have tried both methods, yet nothing works.

Here are the results from the logs.

[2012-06-22 12:00:43.545] ERROR start-signalling-1           o.a.c.c.C.[Catalina].[localhost].[/spring-social-statusnet-tssg]  Error configuring application listener of class org.springframework.web.context.ContextLoaderListener java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
at org.eclipse.gemini.web.tomcat.internal.loading.BundleWebappClassLoader.loadClass(BundleWebappClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:525)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:507)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:124)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4715)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5273)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
at org.eclipse.gemini.web.tomcat.internal.TomcatServletContainer.startWebApplication(TomcatServletContainer.java:122)
at org.eclipse.gemini.web.internal.StandardWebApplication.start(StandardWebApplication.java:91)
at org.eclipse.virgo.web.core.internal.WebBundleLifecycleListener.onStarted(WebBundleLifecycleListener.java:122)
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.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

[2012-06-22 12:00:43.546] ERROR start-signalling-1           o.a.c.c.C.[Catalina].[localhost].[/spring-social-statusnet-tssg]  Skipped installing application listeners due to previous error(s) 

[2012-06-22 12:00:43.547] ERROR start-signalling-1           org.apache.catalina.core.StandardContext                          Error listenerStart 
[2012-06-22 12:00:43.547] ERROR start-signalling-1           org.apache.catalina.core.StandardContext                          Context [/spring-social-statusnet-tssg] startup failed due to previous errors 
[2012-06-22 12:00:43.702] ERROR start-signalling-1           org.eclipse.gemini.web.internal.StandardWebApplication            Failed to start web application at bundleContext path '/spring-social-statusnet-tssg' org.eclipse.gemini.web.core.spi.ServletContainerException: Web application at '/spring-social-statusnet-tssg' 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)
    at org.eclipse.virgo.web.core.internal.WebBundleLifecycleListener.onStarted(WebBundleLifecycleListener.java:122)
    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.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)

[2012-06-22 12:00:43.708] ERROR start-signalling-1           org.eclipse.virgo.medic.eventlog.default                         WE0005E Failed to start web bundle 'spring-social-statusnet-tssg' version '0.0.0': consult serviceability/logs/log.log for further details. 
[2012-06-22 12:00:43.709] INFO  start-signalling-1           o.e.v.k.i.artifact.internal.bundle.BundleThreadContextManager     Thread context class loader 'KernelBundleClassLoader: [bundle=spring-social-statusnet-tssg_0.0.0]' popped and set to 'BundleDelegatingClassLoader for [spring-osgi-extender (org.springframework.osgi.extender)]' 
[2012-06-22 12:00:43.709] INFO  start-signalling-1           o.e.v.k.i.artifact.internal.bundle.BundleThreadContextManager     Thread context class loader 'BundleDelegatingClassLoader for [spring-osgi-extender (org.springframework.osgi.extender)]' pushed and set to 'KernelBundleClassLoader: [bundle=spring-social-statusnet-tssg_0.0.0]' 
[2012-06-22 12:00:43.709] INFO  start-signalling-1           o.e.v.k.i.a.internal.AtomicInstallArtifactLifecycleListener       No atomic parent of bundle 'spring-social-statusnet-tssg' version '0.0.0' in scope 'null' to propagate start failed (stop) event to 
[2012-06-22 12:00:43.715] ERROR start-signalling-1           org.eclipse.virgo.medic.eventlog.default                         DE0006E Start failed for bundle 'spring-social-statusnet-tssg' version '0.0.0'. 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.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)
Caused by: org.eclipse.gemini.web.core.WebApplicationStartFailedException: org.eclipse.gemini.web.core.spi.ServletContainerException: Web application at '/spring-social-statusnet-tssg' 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 '/spring-social-statusnet-tssg' 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

Solution

  • Ok, so after testing a couple of test applications, I managed to get some sample WARs to run on Virgo without any modification.

    To fix the problem at hand, I added the following line to the MANIFEST.MF file of my web app.

    Import-Package: org.springframework.web.context