问题描述
你好,我现在使用virgoTomcatserver部署war文件。结果出现了以下问题这是什么原因?这个war文件是一个标准的war文件。在Tomcat上能运行,现在把他部署到virgoTomcatServer中,却出现以下错误!!![2012-07-2009:51:07.890]start-signalling-4<DE0006E>Startfailedforbundle'formtags-war-3.0.0'version'0.0.0'.org.eclipse.virgo.kernel.deployer.core.DeploymentException:Webapplicationfailedtostartatorg.eclipse.virgo.web.core.internal.WebBundleLifecycleListener.onStarted(WebBundleLifecycleListener.java:132)atorg.eclipse.virgo.kernel.install.artifact.internal.StandardArtifactStateMonitor.onStarted(StandardArtifactStateMonitor.java:247)atorg.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact.asyncStartSucceeded(AbstractInstallArtifact.java:294)atorg.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact.access$0(AbstractInstallArtifact.java:291)atorg.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact$StateMonitorSignal.signalSuccessfulCompletion(AbstractInstallArtifact.java:229)atorg.eclipse.virgo.kernel.core.internal.BundleStartTracker$1.run(BundleStartTracker.java:143)atjava.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)atjava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)atjava.lang.Thread.run(Thread.java:619)Causedby:org.eclipse.gemini.web.core.WebApplicationStartFailedException:org.eclipse.gemini.web.core.spi.ServletContainerException:Webapplicationat'/formtags-war-3.0.0.RELEASE'failedtostart.Checkthelogsformoredetails.atorg.eclipse.gemini.web.internal.StandardWebApplication.start(StandardWebApplication.java:108)atorg.eclipse.virgo.web.core.internal.WebBundleLifecycleListener.onStarted(WebBundleLifecycleListener.java:122)...8commonframesomittedCausedby:org.eclipse.gemini.web.core.spi.ServletContainerException:Webapplicationat'/formtags-war-3.0.0.RELEASE'failedtostart.Checkthelogsformoredetails.atorg.eclipse.gemini.web.tomcat.internal.TomcatServletContainer.startWebApplication(TomcatServletContainer.java:125)atorg.eclipse.gemini.web.internal.StandardWebApplication.start(StandardWebApplication.java:91)
求解答!
解决方案
解决方案二:
额。块一个月了,结果竟然搜到自己的帖子,而且关键的是一个回复也没有!
解决方案三:
因为国内对这方面了解的人太少,而且一般公司很少有注意到virgo的。这个问题我也遇到了,应该说是VTS开发中非常常见的一个问题。我现在见到的解释是:因为war包的web.xml中含有<listener><listener-class>org.springframework.web.context.ContextLoaderListener</listener-class></listener>而这个ContextLoaderListener类实际在war包启动时是无法找到该类的(其实这个类是被web-inf/lib下spring的包,包括Virgo的ext目录都有)。解决的方法,我看到的一种是直接修改war包的meta-inf,然后import-package缺少的类(相当于将一个单纯的war改造为一个sharedlibrarieswar).如果是不含spring单纯的war项目(只有jsp和servlet)是没有这个问题,可以直接被VTS装载,只有springwebapp会出现这个问题。我也很奇怪,按照VTS的usermanual来说,应该标准war直接可以应用啊。另外告诉你一个小知识,你需要把configuration下的serviceability.xml中的logback的日志级别提升到trace(默认是INF),这样你可以在logs/log文件看到大量的输出跟踪信息。我觉得VTS的日志这点做的有问题,这种启动异常错误居然不能默认显示出来,实在让人很无语
解决方案四:
该回复于2012-08-22 11:18:34被版主删除
解决方案五:
eferences[2012-09-1709:42:58.440]TRACEstart-signalling-3org.springframework.beans.TypeConverterDelegateNoStringconstructorfoundontype[org.springframework.osgi.service.importer.support.ImportContextClassLoader]java.lang.NoSuchMethodException:org.springframework.osgi.service.importer.support.ImportContextClassLoader.<init>(java.lang.String)atjava.lang.Class.getConstructor0(Class.java:2706)atjava.lang.Class.getConstructor(Class.java:1657)atorg.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:191)atorg.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.java:447)atorg.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:499)atorg.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:493)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1371)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1330)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1086)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)atorg.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)atorg.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)atorg.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)atorg.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:563)atorg.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)atorg.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)atorg.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$301(AbstractDelegatedExecutionApplicationContext.java:69)atorg.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$1.run(AbstractDelegatedExecutionApplicationContext.java:186)atorg.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)atorg.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.normalRefresh(AbstractDelegatedExecutionApplicationContext.java:182)atorg.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$NoDependenciesWaitRefreshExecutor.refresh(AbstractDelegatedExecutionApplicationContext.java:89)atorg.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:175)atorg.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)atorg.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)atorg.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)atorg.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4779)atorg.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5273)atorg.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)atorg.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)atorg.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)atorg.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)atorg.eclipse.gemini.web.tomcat.internal.TomcatServletContainer.startWebApplication(TomcatServletContainer.java:122)atorg.eclipse.gemini.web.internal.StandardWebApplication.start(StandardWebApplication.java:91)atorg.eclipse.virgo.web.core.internal.WebBundleLifecycleListener.onStarted(WebBundleLifecycleListener.java:122)atorg.eclipse.virgo.kernel.install.artifact.internal.StandardArtifactStateMonitor.onStarted(StandardArtifactStateMonitor.java:247)atorg.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact.asyncStartSucceeded(AbstractInstallArtifact.java:294)atorg.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact.access$0(AbstractInstallArtifact.java:291)atorg.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact$StateMonitorSignal.signalSuccessfulCompletion(AbstractInstallArtifact.java:229)atorg.eclipse.virgo.kernel.core.internal.BundleStartTracker$1.run(BundleStartTracker.java:143)atjava.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)atjava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)atjava.lang.Thread.run(Thread.java:662)[2012-09-1709:42:58.440]TRACEstart-signalling-3org.springframework.beans.TypeConverterDelegateConvertingStringto[class[Ljava.lang.Class;]usingpropertyeditor[org.springframework.beans.propertyeditors.ClassArrayEditor@64c182ee]@
解决方案六:
这个需要修改virgo的配置文件,我们到virgo的安装目录的repositoryext下,找到配置文件org.eclipse.virgo.web.properties原来里边设定的值是WABHeaders=strict试下这个。
解决方案七:
改成WABHeaders=defaulted
解决方案八:
<rootlevel="TRACE"><appender-refref="SIFTED_LOG_FILE"/><appender-refref="LOG_FILE"/></root>变成TRACE,然后你就能看到:LoadingXMLbeandefinitionsfromServletContextresource[/WEB-INF/applicationContext.xml]就是要有applicationContext.xml]当然,我现在还没有确认能不能换成其他的文件名