Question

Recently one of our Tomcat servers started having trouble deploying WAR files. We have an existing version of the WAR in the webapps directory as well as the unpacked version. When we drop a new version of the WAR file into the webapps directory, it does not unpack the new WAR and the application dies. If I delete the old unpacked version, sometimes it will then unpack the new one. Other times I have to restart Tomcat to get it to restart.

In the catalina log I find the following error:

WARNING: Error during context [/pos] destroy
java.lang.StackOverflowError
        at sun.nio.cs.UTF_8$Encoder.encodeLoop(UTF_8.java:575)
        at java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:544)
        at java.lang.StringCoding$CharsetSE.encode(StringCoding.java:342)
        at java.lang.StringCoding.encode(StringCoding.java:378)
        at java.lang.String.getBytes(String.java:812)
        at java.io.UnixFileSystem.getBooleanAttributes0(Native Method)
        at java.io.UnixFileSystem.getBooleanAttributes(UnixFileSystem.java:228)
        at java.io.File.isDirectory(File.java:723)
        at org.apache.catalina.startup.ExpandWar.delete(ExpandWar.java:360)
        at org.apache.catalina.startup.ExpandWar.delete(ExpandWar.java:361)
        at org.apache.catalina.startup.ExpandWar.delete(ExpandWar.java:361)
        at org.apache.catalina.startup.ExpandWar.delete(ExpandWar.java:361)
        at org.apache.catalina.startup.ExpandWar.delete(ExpandWar.java:361)
        at org.apache.catalina.startup.ExpandWar.delete(ExpandWar.java:361)
        at org.apache.catalina.startup.ExpandWar.delete(ExpandWar.java:361)

That last line is repeated a few hundred times.

Then there are other errors. I'm happy to paste them in, but I suspect the first error is the most likely culprit.

Any clues what this means?

Once I delete the old unpack and restart if necessary, everything seems fine.

We're running Tomcat 5.5.23 on Red Hat Linux 2.6.18.

Was it helpful?

Solution

This is a bug in Tomcat 5.5.23 https://bugzilla.redhat.com/show_bug.cgi?format=multiple&id=620996

upgrade or downgrade.

Bye

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top