将WAR部署到virgo-tomcat服务器

时间:2012-06-22 11:18:29

标签: java war eclipse-virgo deploying

最近几天我一直在为Virgo-tomcat服务器(版本3.0.2)部署标准WAR。从eclipse导出的标准WAR文件在tomcat上运行得非常好,但在部署到Virgo-tomcat时则不行。 我已经阅读了用户指南和程序员指南,据我所知 - 应该是将WAR部署到VIRGO_HOME / pickup目录(或者使用应用程序管理器)的情况。我尝试了两种方法,但没有任何效果。

以下是日志的结果。

[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

1 个答案:

答案 0 :(得分:2)

好的,所以在测试了几个测试应用程序之后,我设法在Virgo上运行了一些示例WAR而没有任何修改。

为了解决手头的问题,我将以下行添加到我的网络应用程序的MANIFEST.MF文件中。

Import-Package: org.springframework.web.context