Question

I have Tomcat 5 installed on Linux, and have a webapp deployed and happily running for a number of years. I'm now trying to deploy a new webapp, this war is created using Maven and looks fine to me, however there is an error in catalna log preventing it from deploying properly.

It complains:

 java.io.IOException: java.io.FileNotFoundException: 
 /home/jthink/jakarta-tomcat-5.0.27/conf/Catalina/localhost/widget.xml
 (Is a directory)

which is true, widget.xml is a directory. But I didn't create this file and I have no idea where it came from

my war contains the following file structure:

.:
META-INF
WEB-INF

./META-INF:
context.xml
MANIFEST.MF
maven

./WEB-INF:
classes
lib
web.xml

i dont see anything wierd with it

Here is the full stack trace

java.io.IOException: java.io.FileNotFoundException: /home/jthink/jakarta-tomcat-5.0.27/conf/Catalina/localhost/widget.xml (Is a directory)
        at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:494)
        at org.apache.catalina.core.StandardHost.install(StandardHost.java:863)
        at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:482)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
        at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1068)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:327)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at org.apache.catalina.core.StandardHost.backgroundProcess(StandardHost.java:800)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1619)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1628)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1608)
        at java.lang.Thread.run(Thread.java:619)

Workaround

jakarta-tomcat-5.0.27/conf/Catalina/localhost/widget.xml should be a copy of widget.wars META-INF/context.xml file instead of a directory. I have no idea why it is being created as a directory but manually deleting and then copying over context.xml and renaming as widget.xml fixes the problem.

Raised a bug with developers https://issues.apache.org/bugzilla/show_bug.cgi?id=53864 but closed wont-fix because tomcat version is too old. Guess I should upgrade amd see if the problem goes away.

Was it helpful?

Solution

Didn't get to the bottom of this but tHe solution was to upgrade to Tomcat 7, I didn''t realize quite how out of date Tomcat 5 was.

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