Severe error when deploying WAR in Tomcat 7
I'm trying to deploy a WAR file (from Ext GWT project) into Tomcat 7 and I'm getting an error which I don't understand. I've played around with permissions of Tomcat Manager, the WAR file seems to be ok (at least I'm able to extract it with zip application). Can anyone help me to understand this?
Thank you much!
Here the error from "catalina.log":
INFO: Undeploying context [/CampaignManager]
26/Jul/2011 14:32:45 org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive gestaoApolices.war
26/Jul/2011 14:32:52 org.apache.catalina.startup.HostConfig deployWAR
SEVERE: Error deploying web application archive gestaoApolices.war
java.lang.NullPointerException
at org.apache.catalina.startup.ExpandWar.expand(ExpandWar.java:407)
at org.apache.catalina.startup.ExpandWar.expand(ExpandWar.java:138)
at org.apache.catalina.startup.ContextConfig.fixDocBase(ContextConfig.java:735)
at org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:861)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:340)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:379)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:136)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:812)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:787)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:932)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:529)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1377)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1436)
at org.apache.catalina.manager.HTMLManagerServlet.upload(HTMLManagerServlet.java:334)
at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:211)
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:304)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:187)
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:224)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:572)
at org.apache.catalina.core.StandardHostValve.开发者_高级运维invoke(StandardHostValve.java:164)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:851)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:278)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
26/Jul/2011 14:43:34 org.apache.catalina.startup.HostConfig checkResources
Just share a bit more info on this. After all was not a bug in Tomcat7, it was a problem here between the chair and the keyboard :/.
I was using the "zip"'s Ant task to generate the WAR file. Accordingly with Tomcat7's expert:
"Your WAR file is not valid. I suspect it was created with a zip utility rather than with jar. The default character sets are different. You need to use jar if you have file names that are use non-ASCII characters."
BTW, I'm developing a Google GWT based application and the "build.xml" was automatically generated by the framework. The "war" target was the only one I didn't costumized.
I've just found out that the problem was in a specific file within the WAR:
"Cliente-TextExtractRules-Açoreana.properties"
The file name has Portuguese accented char "ç".
After replace the char by "c" in that file, the deployment was done ok.
(I'm leaving that this answer hopping that could be useful to someone else)
Not sure wether this issue is going to be fixed, nevertheless I've reported a bug to Tomcat7's team (Bugzilla ID: 51580)
精彩评论