Bug 41289 - Error when deploying XML Configuration file URL
Error when deploying XML Configuration file URL
Status: RESOLVED FIXED
Product: Tomcat 6
Classification: Unclassified
Component: Catalina
6.0.2
Macintosh Mac OS X 10.4
: P2 normal (vote)
: default
Assigned To: Tomcat Developers Mailing List
http://localhost:8080/manager/html
:
: 42041 (view as bug list)
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2007-01-04 07:42 UTC by Zemian Deng
Modified: 2007-04-05 07:00 UTC (History)
1 user (show)



Attachments
just a single line of fix (603 bytes, patch)
2007-04-05 06:07 UTC, Shiva Kumar H R
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zemian Deng 2007-01-04 07:42:41 UTC
I tried to deploy a webapp using a context.xml file under manager webapp and
received this error:

java.io.FileNotFoundException:
/opt/apache-tomcat-6.0.2/conf/Catalina/localhost/mywebapp3.xml (No such file or
directory)
        at java.io.FileOutputStream.open(Native Method)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
        at
org.apache.catalina.manager.ManagerServlet.copyInternal(ManagerServlet.java:1570)
        at org.apache.catalina.manager.ManagerServlet.copy(ManagerServlet.java:1530)
        at
org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:803)
        at
org.apache.catalina.manager.HTMLManagerServlet.deployInternal(HTMLManagerServlet.java:249)
        at
org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:96)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:212)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:818)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:624)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
        at java.lang.Thread.run(Thread.java:613)

I did checked and noticed apache-tomcat-6.0.2/conf/Catalina directory no longer
exists in version 6. Did something changed?
Comment 1 lizongbo 2007-04-04 00:05:00 UTC
I got the same problem,
then I submited in: 
http://issues.apache.org/bugzilla/show_bug.cgi?id=42041

Comment 2 Shiva Kumar H R 2007-04-05 05:45:37 UTC
Could reproduce the problem even with /tc6.0.x/trunk/ build. 

Tried deploying "sample.war"
(http://tomcat.apache.org/tomcat-6.0-doc/appdev/sample/sample.war) through the
Manager web-application, by executing the following URL from Browser:

http://localhost:8080/manager/deploy?path=/Shiva&config=file:/c:/tomcat/examples/myContext.xml

where, "c:/tomcat/examples/myContext.xml" file contains the following contents:

<?xml version="1.0" encoding="UTF-8"?>
<Context path="/WebApplication1" docBase="c:\tomcat\examples\sample.war" />

Deploy failed with following return message:
  FAIL - Failed to deploy application at context path /Shiva

and log file shows:
INFO: Manager: install: Installing context configuration at
'file:/c:/tomcat/examples/myContext.xml'
java.io.FileNotFoundException:
C:\tomcat\trunk60\output\build\conf\Catalina\localhost\Shiva.xml (The system
cannot find the path specified)
	at java.io.FileOutputStream.open(Native Method)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
	at
org.apache.catalina.manager.ManagerServlet.copyInternal(ManagerServlet.java:1570)
...

Created <conf-path>\Catalina\localhost manually and tried deploying again and it
is successful this time.

Will create a fix for this.
Comment 3 Shiva Kumar H R 2007-04-05 05:57:29 UTC
*** Bug 42041 has been marked as a duplicate of this bug. ***
Comment 4 Shiva Kumar H R 2007-04-05 06:07:42 UTC
Created attachment 19917 [details]
just a single line of fix
Comment 5 Remy Maucherat 2007-04-05 07:00:54 UTC
Fixed. Thanks.