Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Strange behaviour: war files corrupted during upload

1 view
Skip to first unread message

werner55

unread,
Aug 24, 2004, 6:50:59 AM8/24/04
to
Hello folks,

maybe someone can help me, I am facing a strange tomcat behaviour. I
work on a servlet, compiling it with ant as a war file. The output war
file contains

/META-INF
- MANIFEST.MF
/WEB-INF
- classes
- lib
- ~ config files
- etc

There seems nothing to be unusual, I can unpack the war file by hand
with no problems. Then I want to deploy it with the tomcat manager, do
the file upload, wait... nothing happens. I look up the logs and find
the following stack trace (just the upper half):

2004-08-23 17:05:35 StandardContext[/manager]HTMLManager:
managerServlet.extract[null.war]
java.util.zip.ZipException: No such file or directory
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:112)
at java.util.jar.JarFile.<init>(JarFile.java:117)
at java.util.jar.JarFile.<init>(JarFile.java:82)
at org.apache.catalina.manager.ManagerServlet.extractXml(ManagerServlet.java:1509)
at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:234)

OK, it seems to have problems unpacking the war file. So I change into
the webapps directory, find the recently uploaded .war file and try to
unpack it by hand - nothing happens, jar tvf shows no contents. Diff
tells me there a differences, I open the file in Emacs and see a
strange header in the uploaded file. I cannot read binaries but after
deleting it, the file could be unpacked, the servlet works fine.

I don't know why this happens, I currently run a Mac OS X machine and
tried Safari and IE 5 for uploading, I also try my Win XP machine with
IE 6, but the same results. Does anyone have a clue how this can
happen? It doesn't seem to be the browser and the input file is
correct (btw: I tried two tomcats on different machines as well, each
is a tomcat 5.0.27).

The problem is no lethal as I have access to the webapps directory on
the server, but war deployment is much nicer...

Thanks in advance for any help!
Werner

micromuncher

unread,
Jan 11, 2005, 5:09:26 PM1/11/05
to

werner55 wrote:
> Hello folks,
>
> maybe someone can help me, I am facing a strange tomcat behaviour. I
> work on a servlet, compiling it with ant as a war file. The output
war
> file contains
>

Are you using an ant filter to copy jars before the war? It is likely
that copy is corrupting the jars. Only use filter on text files.

0 new messages