3

当我尝试运行 Web 应用程序 com tomcat 时出现此错误: FAIL - Encountered exception javax.management.RuntimeOperationsException: Exception invoking method check

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

所以我尝试在部署中手动部署应用程序(设置上下文、xml 文件和战争路径),我得到了上面的 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

谢谢。

4

2 回答 2

1

您检查过tomcat 日志(tomcat/logs/catalina.out 和/或您的应用程序日志)吗?堆栈跟踪在那里......你如何手动部署它?一般来说,对于tomcat,要部署应用程序,只需将.war 文件复制到tomcat/webapps 文件夹中即可。

于 2012-09-17T10:22:44.480 回答
1

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

于 2012-09-17T17:33:02.803 回答