Tomcat7/Jackson/WebApp deployment crash/

I'm trying to deploy a new version of my web app on a Ubuntu server (12.04) running Tomcat 7.0.26. Rather than include the jackson- libraries that I use (`-core`, `-annotations`, and `-databind`), I'm trying to place them in the `/usr/share/tomcat7/lib` area for use by other applications that I plan to deploy. I can start the server, and deploy my app. However, once I do, the app crashes and takes down Tomcat. Clearly the ObjectMapper is not being properly loaded, but it exists in the databind jar file (I've jar tvf'd it to check)... The response to the client is: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception java.lang.NullPointerException org.apache.catalina.authenticator.AuthenticatorBase.invoke( org.apache.catalina.valves.ErrorReportValve.invoke( org.apache.catalina.valves.AccessLogValve.invoke( org.apache.catalina.connector.CoyoteAdapter.service( org.apache.coyote.http11.AbstractHttp11Processor.process( org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process($ java.util.concurrent.ThreadPoolExecutor.runWorker( java.util.concurrent.ThreadPoolExecutor$ And, the catalina.out log file shows the following after the app is executed: Mar 11, 2013 1:42:55 AM org.apache.coyote.AbstractProtocol pause INFO: Pausing ProtocolHandler ["http-bio-8080"] Mar 11, 2013 1:42:55 AM org.apache.catalina.core.StandardService stopInternal INFO: Stopping service Catalina Mar 11, 2013 1:42:57 AM org.apache.coyote.AbstractProtocol stop INFO: Stopping ProtocolHandler ["http-bio-8080"] Mar 11, 2013 1:42:57 AM org.apache.catalina.loader.WebappClassLoader loadClass INFO: Illegal access: this web application instance has been stopped already. Could not load com.fasterxml.jackson.databind.ObjectMapper. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact. java.lang.IllegalStateException at org.apache.catalina.loader.WebappClassLoader.loadClass( at org.apache.catalina.loader.WebappClassLoader.loadClass( at org.comtor.authserv.APIServer.doPost( at javax.servlet.http.HttpServlet.service( at javax.servlet.http.HttpServlet.service( at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( at org.apache.catalina.core.ApplicationFilterChain.doFilter( at org.apache.catalina.core.StandardWrapperValve.invoke( at org.apache.catalina.core.StandardContextValve.invoke( at org.apache.catalina.authenticator.AuthenticatorBase.invoke( at org.apache.catalina.core.StandardHostValve.invoke( at org.apache.catalina.valves.ErrorReportValve.invoke( at org.apache.catalina.valves.AccessLogValve.invoke( at org.apache.catalina.core.StandardEngineValve.invoke( at org.apache.catalina.connector.CoyoteAdapter.service( at org.apache.coyote.http11.AbstractHttp11Processor.process( at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process( at$ at java.util.concurrent.ThreadPoolExecutor.runWorker( at java.util.concurrent.ThreadPoolExecutor$ at Mar 11, 2013 1:42:57 AM org.apache.coyote.AbstractProtocol destroy INFO: Destroying ProtocolHandler ["http-bio-8080"] Any help here is appreciated. I'm attempting to learn what is going wrong, how I can prevent it, and also prevent the server from going down (crashing) when the web application is executed and this happens. Thanks.
The fact that its crashing only when your app is deployed is suspicious. What libraries are bundled in your WAR? If you are using Maven to manage your app please add the POM to your question, otherwise list out the JAR's from the WEB-INF/lib folder.

以上就是Tomcat7/Jackson/WebApp deployment crash/的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准