tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Wiedmann <...@ispsoft.de>
Subject TomCat isn't extracting all my files from WAR
Date Tue, 20 Jan 2004 11:33:46 GMT

Hi,

I have an application which runs fine as long as I let the Ant script create 
the directory structure below webapps. It fails as soon as I try to deploy 
from a WAR file.

I have tried two different approaches of creating the WAR file. First, I 
have added the directory WEB-INF (which contains my whole application) to a 
ZIP file with paths like WEB-INF/autoUpdate, WEB-INF/bausteine, 
WEB-INF/classes, WEB-INF/lib, and so on. However, as soon as I drop the 
archive into the webapps directory, only a part gets extracted. TomCat's
log files looks as follows:

   HostConfig[localhost]: Deploying web application directory test
   StandardHost[localhost]: Installing web application at context path
     /test   from URL file:C:\Prg\Tomcat4.1\webapps\test
   WebappLoader[/test]: Deploying class repositories to work directory
     C:\Prg\Tomcat4.1\work\Standalone\localhost\test
   ContextConfig[/test]: Missing application web.xml, using defaults only
   StandardManager[/test]: Seeding random number generator class
     java.security.SecureRandom
   StandardManager[/test]: Seeding of random number generator has been
     completed
   StandardWrapper[/test:default]: Loading container servlet default
   StandardWrapper[/test:invoker]: Loading container servlet invoker

Note the message concerning the missing web.xml: It is wrong, the second 
entry in my archive is web-inf/web.xml (do not ask me where the lower case 
characters may arise from).

The second approach is to use Ant's war task, like this:

     <war destfile="${dist}/${war}.war" duplicate="fail"
        webxml="${ressources}/web.xml" encoding="ISO-8859-1">
       <classes dir="${build.classes}" includes="**/*.properties"/>
       <lib dir="${dist}" includes="justus.jar"/>
       <lib dir="${preqs}" includes="*.jar"/>
       <webinf dir="${build.templates}"/>
       <zipfileset prefix="WEB-INF/bausteine" dir="bausteine"/>
       <zipfileset prefix="WEB-INF/autoUpdate/stylesheet" dir="stylesheets"/>
       <zipfileset prefix="WEB-INF/autoUpdate/dcom" dir="dcom"/>
     </war>

Note the encoding, which is the only thing I find unusual. Again, this time 
only a part gets extracted, in particular the directory WEB-INF/autoUpdate 
is missing. This time an error message can be seen:

     java.lang.NullPointerException
	at org.apache.catalina.startup.ExpandWar.expand(ExpandWar.java:275)
	at org.apache.catalina.startup.ExpandWar.expand(ExpandWar.java:226)
	at org.apache.catalina.startup.ExpandWar.expand(ExpandWar.java:140)
	at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:490)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:400)
	at org.apache.catalina.startup.HostConfig.run(HostConfig.java:851)
	at java.lang.Thread.run(Unknown Source)

I am using TomCat 4.1.29.


Any ideas what might be wrong?


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


Mime
View raw message