2014-04-15 58 views
0

的Tomcat 6.0.36Tomcat的閥門 - java.lang.NoSuchMethodError

開始我的tomcat的時候我得到一個java.lang.NoSuchMethodError。

我有這個在我的server.xml:

<Host name="dev.spirit.comp.net" appBase="spirit" 
       unpackWARs="true" autoDeploy="true" xmlValidation="false" 
       xmlNamespaceAware="false"> 
       <Alias>dev.spirit.comp.com</Alias> 
       <Valve className="org.apache.catalina.valves.ImprovedAccessLogValve" 
       directory="logs/spirit" prefix="${hostname}-${port}.access_log." 
       suffix=".txt" 
       pattern="%h %v %u %t '%r' %s %b '%{Referer}i' '%{User-Agent}i' '%{Cookie}i'" 
       resolveHosts="false" fileDateFormat="yyyy-MM-dd.HH" /> 

我收到此錯誤:

java.lang.reflect.InvocationTargetException 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:606) 
    at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:261) 
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) 
Caused by: java.lang.NoSuchMethodError: org.apache.catalina.valves.AccessLogValve$LocalAddrElement.<init>(Lorg/apache/catalina/valves/AccessLogValve;)V 
    at org.apache.catalina.valves.ImprovedAccessLogValve.initElements(ImprovedAccessLogValve.java:136) 
    at org.apache.catalina.valves.ImprovedAccessLogValve.<init>(ImprovedAccessLogValve.java:29) 
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) 
+0

您是否使用與您試圖運行相同的Tomcat進行編譯?我會猜測版本不匹配。 –

回答

0

發現了問題,由於某種原因,有一個在Tomcat服務器的一些JAR文件來自另一個版本