Bug 11710 - startup/shutdown - FileNotFoundException on server.xml
Summary: startup/shutdown - FileNotFoundException on server.xml
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 4
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 4.0.4 Final
Hardware: PC All
: P3 minor (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-08-14 22:11 UTC by Bryan Looper
Modified: 2005-03-20 17:06 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bryan Looper 2002-08-14 22:11:14 UTC
Specifying a trailing '\' on the catalina home directory value causes a 
malformed path to be used when catalina looks for conf\server.xml, resulting a 
FileNotFoundException during startup or shutdown.  

C:\User\JavaDevelopment\jakarta-tomcat-4.0.4>bin\catalina run
Using CATALINA_BASE:   c:\user\javadevelopment\jakarta-tomcat-4.0.4\
Using CATALINA_HOME:   c:\user\javadevelopment\jakarta-tomcat-4.0.4\
Using CATALINA_TMPDIR: c:\user\javadevelopment\jakarta-tomcat-4.0.4\\temp
Using JAVA_HOME:       c:\j2sdk1.4.0_01
java.io.FileNotFoundException: c:\user\javadevelopment\jakarta-tomcat-4.0.4" -Dc
atalina.home=c:\user\javadevelopment\jakarta-tomcat-4.0.4"\conf\server.xml (The
filename, directory name, or volume label syntax is incorrect)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:103)
        at java.io.FileInputStream.<init>(FileInputStream.java:66)
        at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection
.java:69)
        at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLCon
nection.java:148)
        at java.net.URL.openStream(URL.java:955)
        at org.apache.xerces.readers.DefaultReaderFactory.createReader(DefaultRe
aderFactory.java:149)
        at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromDocume
nt(DefaultEntityHandler.java:493)
        at org.apache.xerces.framework.XMLParser.parseSomeSetup(XMLParser.java:3
14)
        at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1097)
        at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)

        at javax.xml.parsers.SAXParser.parse(SAXParser.java:362)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:301)
        at org.apache.catalina.util.xml.XmlMapper.readXml(XmlMapper.java:228)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:725)
        at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
        at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)


Running without the trailing '\' works just fine in the same setup.

C:\User\JavaDevelopment\jakarta-tomcat-4.0.4>bin\catalina run
Using CATALINA_BASE:   c:\user\javadevelopment\jakarta-tomcat-4.0.4
Using CATALINA_HOME:   c:\user\javadevelopment\jakarta-tomcat-4.0.4
Using CATALINA_TMPDIR: c:\user\javadevelopment\jakarta-tomcat-4.0.4\temp
Using JAVA_HOME:       c:\j2sdk1.4.0_01
Starting service Tomcat-Standalone
Apache Tomcat/4.0.4
Starting service Tomcat-Apache
Apache Tomcat/4.0.4


Maybe the "Don't do that" resolution is appropriate here, but I must say that 
as a first time user it was quite frustrating because I wasn't getting any 
feedback from the startup script on what was going on.   (Startup, of course, 
opens tomcat in a separate window that would close instantly when the error 
occurred.)  A tip in the running.txt or graceful error message would have been 
very helpful.
Comment 1 Mark Thomas 2004-01-06 22:52:27 UTC
This has been fixed for some time.