You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by James Lampert <ja...@touchtonecorp.com> on 2012/04/17 17:39:31 UTC

Problem with deployment of a WAR file from Manager

We are having a very frustrating error on one customer box, with a 
Tomcat version and a WAR file that are working perfectly elsewhere.

That same WAR file runs perfectly on this same box, if expanded from the 
command line.

Can anybody here shed any light on this?

--
James H. H. Lampert
Touchtone Corporation

SEVERE: Error deploying web application archive 
/wintouch/tomcat/webapps/ROOT.war
Throwable occurred: java.lang.IllegalArgumentException: The archive 
[jar:file:/wintouch/tomcat/webapps/ROOT.war!/] is malformed and will be 
ignored: an entry contains an illegal path [META-INF/MANIFEST.MF] which 
was not expanded to 
[/WINTOUCH/TOMCAT/webapps/ROOT//META-INF/MANIFEST.MF] since that is 
outside of the defined docBase [/wintouch/tomcat/webapps/ROOT/]
    at org.apache.catalina.startup.ExpandWar.expand(ExpandWar.java:122)
    at 
org.apache.catalina.startup.ContextConfig.fixDocBase(ContextConfig.java:667) 

    at 
org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:790)
    at 
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:318) 

    at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) 

    at 
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) 

    at 
org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:401) 

    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
    at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:897) 

    at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:873)
    at 
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
    at 
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:958)
    at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:536)
    at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1467)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60) 

    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) 

    at java.lang.reflect.Method.invoke(Method.java:611)
    at 
org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301) 

    at 
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:848)
    at 
com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:773)
    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:305) 

    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.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108) 

    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:169) 

    at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581) 

    at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) 

    at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) 

    at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
    at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) 

    at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at 
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987) 

    at 
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
    at 
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309) 

    at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897) 

    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919) 

    at java.lang.Thread.run(Thread.java:736)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Problem with deployment of a WAR file from Manager

Posted by James Lampert <ja...@touchtonecorp.com>.
Konstantin Kolinko wrote:
. . .
> In essence it checks that File.getCanonicalPath() of (webapp root
> directory + archive entry) is as expected.
> 
>>   at org.apache.catalina.startup.ExpandWar.expand(ExpandWar.java:122)

My colleague at the next desk found this:

https://issues.apache.org/bugzilla/show_bug.cgi?id=50737

which is more-or-less as you say.

The funny thing is that the customer is on a more recent iOS (or 
whatever IBM is calling it this week; to me, OS/400 is OS/400) than we 
(and most of the other customers) are (V7R1 vs V6R1).

And where the example at the above link is failing on one lousy 
character being of mismatched case, we have this in the CL program:
 > SBMJOB     CMD(QSH +
 >             CMD('/WINTOUCH/TOMCAT/BIN/STARTUP.SH')) +
 >             JOB(CATALINA) JOBD(WINTOUCH/WTSRVC) +
 >             CPYENVVAR(*YES) ALWMLTTHD(*YES)

but the actual path in the file system is:
 > /wintouch/tomcat/bin/startup.sh

with every single letter being of mismatched case.

--
JHHL

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Problem with deployment of a WAR file from Manager

Posted by Konstantin Kolinko <kn...@gmail.com>.
2012/4/17 James Lampert <ja...@touchtonecorp.com>:
> We are having a very frustrating error on one customer box, with a Tomcat
> version and a WAR file that are working perfectly elsewhere.
>
> That same WAR file runs perfectly on this same box, if expanded from the
> command line.
>
> Can anybody here shed any light on this?
>
> --
> James H. H. Lampert
> Touchtone Corporation
>
> SEVERE: Error deploying web application archive
> /wintouch/tomcat/webapps/ROOT.war
> Throwable occurred: java.lang.IllegalArgumentException: The archive
> [jar:file:/wintouch/tomcat/webapps/ROOT.war!/] is malformed and will be
> ignored: an entry contains an illegal path [META-INF/MANIFEST.MF] which was
> not expanded to [/WINTOUCH/TOMCAT/webapps/ROOT//META-INF/MANIFEST.MF] since
> that is outside of the defined docBase [/wintouch/tomcat/webapps/ROOT/]

1. Tomcat version = ?
2. OS = ?

3. It is security check against CVE-2009-2693

In essence it checks that File.getCanonicalPath() of (webapp root
directory + archive entry) is as expected.

>   at org.apache.catalina.startup.ExpandWar.expand(ExpandWar.java:122)


Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org