在Tomcat 7中部署WAR时出现严重错误

发布于 2024-11-26 07:03:15 字数 4482 浏览 3 评论 0原文

我正在尝试将 WAR 文件(来自 Ext GWT 项目)部署到 Tomcat 7 中,但收到一个我不明白的错误。我已经尝试过 Tomcat Manager 的权限,WAR 文件似乎没问题(至少我可以使用 zip 应用程序提取它)。谁能帮助我理解这一点?

非常感谢!

这里是来自“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

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

祁梦 2024-12-03 07:03:15

请分享更多有关此的信息。毕竟这不是 Tomcat7 中的错误,而是椅子和键盘之间的问题:/。

我正在使用“zip”的 Ant 任务来生成 WAR 文件。 Tomcat7 的专家对此表示:

“您的 WAR 文件无效。我怀疑它是使用 zip 实用程序创建的,而不是
比用罐子。默认字符集不同。如果你需要使用jar
你有使用非 ASCII 字符的文件名。”

顺便说一句,我正在开发一个基于 Google GWT 的应用程序,“build.xml”是由框架自动生成的。“war”目标是我唯一没有的目标t 定制。

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.

柠檬心 2024-12-03 07:03:15

我刚刚发现问题出在 WAR 中的特定文件中:

“Cliente-TextExtractRules-Açoreana.properties”

文件名具有葡萄牙语重音字符“ç”。

将该文件中的字符替换为“c”后,部署正常完成。

(我留下这个答案,希望对其他人有用)

不确定这个问题是否会得到解决,不过我已经向 Tomcat7 团队报告了一个错误(Bugzilla ID:51580)

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)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文