Tomcat错误运行war文件

时间:2012-09-17 10:17:22

标签: java tomcat tomcat7

当我尝试运行Web应用程序com tomcat时出现此错误: 失败 - 遇到异常javax.management.RuntimeOperationsException:异常调用方法检查

我已将war文件放在webapps文件夹中,然后当我点击“开始”按钮时,我收到错误“FAIL - 应用程序在上下文路径/Black.ArtespPAP无法启动”。

所以我尝试在部署中手动部署应用程序(设置上下文,xml文件和war路径),然后我得到上面的javax异常。

有人可以帮助我吗?

catalina.out日志:

org.springframework.beans.factory.BeanInitializationException: Could not load properties; nested exception is java.io.FileNotFoundException: /home/ubuntu/tomcat/conf/pap.properties (No such file or directory)
        at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:78)
        at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:663)
        at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:638)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:407)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1255)
        at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:714)
        at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:219)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:186)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
        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: java.io.FileNotFoundException: /home/ubuntu/tomcat/conf/pap.properties (No such file or directory)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:138)
        at java.io.FileInputStream.<init>(FileInputStream.java:97)
        at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
        at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
        at org.springframework.core.io.UrlResource.getInputStream(UrlResource.java:124)
        at org.springframework.core.io.support.PropertiesLoaderSupport.loadProperties(PropertiesLoaderSupport.java:181)
        at org.springframework.core.io.support.PropertiesLoaderSupport.mergeProperties(PropertiesLoaderSupport.java:161)
        at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:69)
        ... 36 more
Sep 17, 2012 10:14:53 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Sep 17, 2012 10:14:53 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/Black.ArtespPAP] startup failed due to previous errors

感谢。

2 个答案:

答案 0 :(得分:1)

从日志中可以清楚地看到文件/home/ubuntu/tomcat/conf/pap.properties丢失了。它看起来像是Spring框架使用的配置文件(基于堆栈跟踪)。 Afaik它不是标准文件,而是特定于应用程序的文件,因此您必须深入了解应用程序代码或文档,以确定它的用途和应包含的内容。

答案 1 :(得分:0)

你检查过tomcat日志(tomcat / logs / catalina.out和/或你的应用程序日志)吗?有堆栈跟踪...如何手动部署?通常,对于tomcat,要部署app,它足以将.war文件复制到tomcat / webapps文件夹中。