Tomcat 7 生产服务器上的验证错误可能是由 Apache Commons Logging 1.0.4 引起的
我正在Tomcat 7上开发Web应用程序。在我的本地版本的Tomcat上一切正常,但是当我在生产服务器上部署它时,它会引发此异常。
java.lang.VerifyError: (class: org/apache/commons/logging/impl/Log4JLogger, method: fatal signature: (Ljava/lang/Object;Ljava/lang/Throwable;)V) Incompatible object argument for function call
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2595)
at java.lang.Class.getConstructor0(Class.java:2895)
at java.lang.Class.getConstructor(Class.java:1731)
at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:410)
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
at org.apache.fop.apps.FopFactory.<clinit>(FopFactory.java:68)
at cz.soma.tomcat.generator.DokumentaceUtils.createPdfDocument(DokumentaceUtils.java:818)
at cz.soma.tomcat.generator.FileFactory.createPdfDocument(FileFactory.java:58)
at cz.soma.tomcat.generator.Generator.doPost(Generator.java:111)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
当我尝试(从Apache FOP 1.0)时,会引发错误。之后,它会尝试 .它会导致(即调用)其中 logConstructorSignature 包含一个 String.class。(至少在我的本地计算机上)FopFactory.newInstance();
LogFactory.getLog(FopFactory.class);
logClass.getConstructor(logConstructorSignature);
try {
logConstructor = logClass.getConstructor(logConstructorSignature);
return (logConstructor);
} catch (Throwable t) {
throw new LogConfigurationException
("No suitable Log constructor " +
logConstructorSignature+ " for " + logClassName, t);
}
在此之后称为java.lang.Class函数并引发异常。你有没有想过,为什么错误只抛在生产服务器上,而不是在我的本地计算机上?