2013-03-02 3 views
1

내가 tomcat6에 웹 애플리케이션을 배포하는 것을 시도하고 실패/CentOS5 I 구성을했다,하지만 웹 애플리케이션을 시작하려고하면 여기 사람이 약간의 수정을했다 말했듯이 그렇게 실패 웹 애플리케이션의 시작은 tomcat6

갈망하는 시스템에서 여기에 새로운 로그가 있습니다. /usr/local/tomcat/logs/catalina.out

마지막 줄은 다음과 같습니다

------------- org.apache.catalina.core.ApplicationContext log 
INFO: HTMLManager: start: Starting web application at '/' 
------------- org.apache.catalina.core.StandardContext listenerStart 
SEVERE: Error configuring application listener of class org.ambraproject.configuration.WebAppListener 
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory 
     at org.ambraproject.configuration.WebAppListener.<clinit>(WebAppListener.java:40) 
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 
     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) 
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) 
     at java.lang.reflect.Constructor.newInstance(Constructor.java:513) 
     at java.lang.Class.newInstance0(Class.java:355) 
     at java.lang.Class.newInstance(Class.java:308) 
     at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4150) 
     at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705) 
     at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1276) 
     at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:625) 
     at org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:136) 
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) 
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) 
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 
     at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:194) 
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) 
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) 
     at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:563) 
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) 
     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) 
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) 
     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) 
     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861) 
     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606) 
     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) 
     at java.lang.Thread.run(Thread.java:662) 
Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory 
     at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680) 
     at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526) 
      ... 30 more 
------------- org.apache.catalina.core.StandardContext listenerStart 
    SEVERE: Skipped installing application listeners due to previous error(s) 
    Mar 2, 2013 5:46:07 PM org.apache.catalina.core.ApplicationContext log 
    INFO: HTMLManager: list: Listing contexts for virtual host 'localhost' 

과에서 내 인 webxml 파일/usr/지방/WEB-INF는/바람둥이/웹 어플리케이션/ROOT입니다 :

<?xml version="1.0" encoding="UTF-8"?> 
<web-app xmlns="http://java.sun.com/xml/ns/javaee"> 

    <display-name>Ambra</display-name> 

    <context-param> 
    <param-name>webAppRootKey</param-name> 
    <param-value>/WEB-INF/propertyConfigurer.xml /WEB-INF/countryList.xml /WEB-INF/profaneWords.xml /WEB-INF/applicationContext.xml</param-value> 
    </context-param> 

    <context-param> 
    <param-name>log4jConfigLocation</param-name> 
    <param-value>log4j.properties</param-value> 
    </context-param> 



    <resource-ref> 
    <description>Main Ambra Database</description> 
    <res-ref-name>jdbc/AmbraDS</res-ref-name> 
    <res-type>javax.sql.DataSource</res-type> 
    <res-auth>Container</res-auth> 
    </resource-ref> 

    <resource-env-ref> 
    <description>File Store for Ambra</description> 
    <resource-env-ref-name>ambra/FileStore</resource-env-ref-name> 
    <resource-env-ref-type>org.ambraproject.filestore.FileStoreService</resource-env-ref-type> 
    </resource-env-ref> 

    <filter> 
    <description>Filter out any request that matches regexp</description> 
    <filter-name>SinkHoleFilter</filter-name> 
    <filter-class>org.ambraproject.web.GatekeeperFilter</filter-class> 
    <init-param> 
     <param-name>regexp</param-name> 
     <param-value>.*\.ftl$</param-value> 
    </init-param> 
    </filter> 

    <filter> 
    <filter-name>UrlRewriteFilter</filter-name> 
    <filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class> 
    </filter> 

    <filter> 
    <filter-name>MultipleRequestFilter</filter-name> 
    <filter-class>org.ambraproject.web.MultipleRequestFilter</filter-class> 
    <init-param> 
     <param-name>includePattern_fetchArticle</param-name> 
     <param-value>.*\/article\/info.*</param-value> 
    </init-param> 
    <init-param> 
     <param-name>includePattern_browseIssue</param-name> 
     <param-value>.*browseIssue\.action.*</param-value> 
    </init-param> 
    <init-param> 
     <param-name>includePattern_browseVolume</param-name> 
     <param-value>.*browseVolume\.action.*</param-value> 
    </init-param> 
    </filter> 

    <filter> 
    <description>Sets the virtual journal context. 
Should be 1st in the chain as other Filters, e.g. caching, may rely on the journal context.</description> 
    <filter-name>VirtualJournalContextFilter</filter-name> 
    <filter-class>org.ambraproject.web.VirtualJournalContextFilter</filter-class> 
    </filter> 

    <filter> 
    <description>Should immediately follow VirtualJournalContext in Filter chain. 
If a virtual journal context is set, check to see if requested resource has a virtual journal override. 
If so, wrap request with virtual journal override values in FilterChain.</description> 
    <filter-name>VirtualJournalMappingFilter</filter-name> 
    <filter-class>org.ambraproject.web.VirtualJournalMappingFilter</filter-class> 
    </filter> 

    <filter> 
    <filter-name>DummySSOFilter</filter-name> 
    <filter-class>org.ambraproject.web.DummySSOFilter</filter-class> 
    <!-- uncomment these if you want to be logged in by default when you start the server 
    <init-param> 
     <param-name>auth.id</param-name> 
     <param-value>foo</param-value> 
    </init-param> 
    <init-param> 
     <param-name>email</param-name> 
     <param-value>[email protected]</param-value> 
    </init-param> 
    --> 
    <init-param> 
     <param-name>casUrl</param-name> 
     <param-value>https://localhost:7443/cas/</param-value> 
    </init-param> 
    <init-param> 
     <param-name>wrapRequest</param-name> 
     <param-value>false</param-value> 
    </init-param> 
    </filter> 

    <filter> 
    <filter-name>CAS Filter</filter-name> 
    <filter-class>org.ambraproject.service.cas.client.filter.CASFilterWrapper</filter-class> 
    <init-param> 
     <param-name>edu.yale.its.tp.cas.client.filter.loginUrl</param-name> 
     <param-value>https://localhost:7443/cas/login</param-value> 
    </init-param> 
    <init-param> 
     <param-name>edu.yale.its.tp.cas.client.filter.validateUrl</param-name> 
     <param-value>https://localhost:7443/cas/proxyValidate</param-value> 
    </init-param> 
    <init-param> 
     <param-name>edu.yale.its.tp.cas.client.filter.serverName</param-name> 
     <param-value>localhost:8080</param-value> 
    </init-param> 
    <init-param> 
     <param-name>edu.yale.its.tp.cas.client.filter.wrapRequest</param-name> 
     <param-value>false</param-value> 
    </init-param> 
    </filter> 

    <filter> 
    <filter-name>gzip</filter-name> 
    <filter-class>org.mortbay.servlet.GzipFilter</filter-class> 
    <init-param> 
     <param-name>minGzipSize</param-name> 
     <param-value>100</param-value> 
    </init-param> 
    <init-param> 
     <param-name>mimeTypes</param-name> 
     <param-value>text/html,text/plain,text/css,text/javascript,application/xml,application/atom+xml</param-value> 
    </init-param> 
    </filter> 

    <filter> 
    <filter-name>journalStaticResources</filter-name> 
    <filter-class>org.ambraproject.web.JournalStaticResourceFilter</filter-class> 
    </filter> 

    <filter> 
    <filter-name>struts2</filter-name> 
    <!-- 
    <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class> 
    --> 
    <filter-class>org.ambraproject.struts2.AmbraStruts2Dispatcher</filter-class> 
    <init-param> 
     <param-name>packages</param-name> 
     <param-value>struts</param-value> 
    </init-param> 
    </filter> 

    <!-- 
    <filter> 
    <filter-name>DebuggingFilter</filter-name> 
    <filter-class>org.ambraproject.web.DebuggingFilter</filter-class> 
    </filter> 
    --> 


    <filter-mapping> 
    <filter-name>SinkHoleFilter</filter-name> 
    <url-pattern>/*</url-pattern> 
    <dispatcher>REQUEST</dispatcher> 
    </filter-mapping> 

    <filter-mapping> 
    <filter-name>MultipleRequestFilter</filter-name> 
    <url-pattern>/*</url-pattern> 
    <dispatcher>REQUEST</dispatcher> 
    </filter-mapping> 

    <filter-mapping> 
    <filter-name>UrlRewriteFilter</filter-name> 
    <url-pattern>/*</url-pattern> 
    <dispatcher>REQUEST</dispatcher> 
    </filter-mapping> 

    <filter-mapping> 
    <filter-name>VirtualJournalContextFilter</filter-name> 
    <url-pattern>/*</url-pattern> 
    <dispatcher>REQUEST</dispatcher> 
    <dispatcher>FORWARD</dispatcher> 
    <dispatcher>ERROR</dispatcher> 
    </filter-mapping> 

    <filter-mapping> 
    <filter-name>VirtualJournalMappingFilter</filter-name> 
    <url-pattern>/*</url-pattern> 
    <dispatcher>REQUEST</dispatcher> 
    <dispatcher>FORWARD</dispatcher> 
    </filter-mapping> 

    <filter-mapping> 
    <filter-name>DummySSOFilter</filter-name> 
    <url-pattern>/*</url-pattern> 
    <dispatcher>REQUEST</dispatcher> 
    <dispatcher>FORWARD</dispatcher> 
    </filter-mapping> 

    <filter-mapping> 
    <filter-name>CAS Filter</filter-name> 
    <url-pattern>/annotation/secure/*</url-pattern> 
    <dispatcher>REQUEST</dispatcher> 
    <dispatcher>FORWARD</dispatcher> 
    </filter-mapping> 

    <filter-mapping> 
    <filter-name>CAS Filter</filter-name> 
    <url-pattern>/user/secure/*</url-pattern> 
    <dispatcher>REQUEST</dispatcher> 
    <dispatcher>FORWARD</dispatcher> 
    </filter-mapping> 

    <filter-mapping> 
    <filter-name>CAS Filter</filter-name> 
    <url-pattern>/rate/secure/*</url-pattern> 
    <dispatcher>REQUEST</dispatcher> 
    <dispatcher>FORWARD</dispatcher> 
    </filter-mapping> 

    <filter-mapping> 
    <filter-name>CAS Filter</filter-name> 
    <url-pattern>/admin/*</url-pattern> 
    <dispatcher>REQUEST</dispatcher> 
    <dispatcher>FORWARD</dispatcher> 
    </filter-mapping> 

    <filter-mapping> 
    <filter-name>gzip</filter-name> 
    <url-pattern>/*</url-pattern> 
    <dispatcher>REQUEST</dispatcher> 
    <dispatcher>FORWARD</dispatcher> 
    </filter-mapping> 

    <filter-mapping> 
    <filter-name>journalStaticResources</filter-name> 
    <url-pattern>/*</url-pattern> 
    <dispatcher>REQUEST</dispatcher> 
    <dispatcher>FORWARD</dispatcher> 
    <dispatcher>ERROR</dispatcher> 
    </filter-mapping> 

    <filter-mapping> 
    <filter-name>struts2</filter-name> 
    <url-pattern>/*</url-pattern> 
    <dispatcher>REQUEST</dispatcher> 
    <dispatcher>FORWARD</dispatcher> 
    <dispatcher>ERROR</dispatcher> 
    </filter-mapping> 

    <!-- 
    <filter-mapping > 
    <filter-name>DebuggingFilter</filter-name> 
    <url-pattern>/*</url-pattern> 
    <dispatcher>REQUEST</dispatcher> 
    <dispatcher>FORWARD</dispatcher> 
    </filter-mapping> 
--> 

    <listener> 
    <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class> 
    </listener> 


    <!-- The configuration WebAppListener to pull in the configuration stuff automatically. --> 
    <listener> 
    <listener-class>org.ambraproject.configuration.WebAppListener</listener-class> 
    </listener> 
    <!-- to hook in the spring container --> 
    <listener> 
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> 
    </listener> 
    <!-- to hook in the scope management system that provides scopes like session, request for Servlet 2.4 and Spring 2.0 above --> 
    <listener> 
    <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class> 
    </listener> 

    <!-- Count the number of active sessions and make it available. --> 
    <listener> 
    <listener-class>org.ambraproject.web.SessionCounter</listener-class> 
    </listener> 



    <welcome-file-list> 
    <welcome-file>index.jsp</welcome-file> 
    </welcome-file-list> 

    <error-page> 
    <error-code>404</error-code> 
    <location>/static/pageNotFound.action</location> 
    </error-page> 

    <session-config> 
    <session-timeout>1440</session-timeout> 
    </session-config> 
</web-app> 
+0

여기에 정보가 충분하지 않습니다. 당신이보고있는 것은 문제의 증상입니다. Tomcat은 앱 배포를 취소하려고 시도하고 있는데, 그 동안 앱이 스레드를 만들어 메모리를 새고 있다고 불평합니다. 왜 배포를 시도 했습니까? 배포 중에 실패했습니다. 배포 오류와 관련된 로그 메시지는 포함하지 않았습니다. – Brandon

+0

Tanks, 나는 그렇게 할 것이다 – AhAd

답변

0

classpath에 Apache commons-logging jar 파일이 있습니까? 그것은 당신이 누락 된 커먼스 로깅의 일부인 클래스 인 것 같습니다.

+0

탱크가 작동했습니다. – AhAd

+0

다행이었습니다. – Michael

0

만들기 war 파일에 WEB-INF/classes/logging.properties이고 다음 내용이 포함되어 있습니다.

org.apache.catalina.core.ContainerBase.[Catalina].level = INFO 
org.apache.catalina.core.ContainerBase.[Catalina].handlers = java.util.logging.ConsoleHandler 

그러면 실제 문제가있는 Error listnerStart 행을 찾을 수 있습니다. 나는 이것을 전에 사용했고 ClassNotFound 오류 및 다른 원인을 발견했습니다.

자세한 정보 here.

+0

tanks 내가 말했듯이 여전히 usr/local/tomcat/logs/catalina.out은 동일한 출력을 준다. – AhAd

+0

그런 다음 Brandon이 의견에서 말했듯이해야 할 것이고 더 많이 제공한다. 정보. 'web.xml'을 게시하고, webapp에 대한 더 많은 정보를 얻거나, 첫 번째 심각성 이전에 다른 로그가 있는지 확인하십시오. –

+0

마이클이 말했듯이, 당신은 commons-logging을 누락하고 있습니다. –