DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41447>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41447

           Summary: path element in new context.xml files
           Product: Tomcat 5
           Version: 5.5.20
          Platform: Other
        OS/Version: Windows XP
            Status: NEW
          Severity: critical
          Priority: P2
         Component: Unknown
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: [EMAIL PROTECTED]


Hi,

I have recently upgrade from tomcat 5.0.28 to 5.5.20 and everything seems to be
working fine for most of my apps except for the ones that have context with
multi-level path. Also I should mention that I am not unpacking any of my war
files. (unpackWARs="false" autoDeploy="true")

I deployed my app - foo.war which had the following context in
foo.war/meta-inf/context.xml 

<Context path="/some/foo" docBase="foo.war" debug="0" privileged="true"
reloadable="true"/> 


In the Tomcat Manager Application List, I only see the path /foo and also in the
<TOMCAT_CONF>/Catalina/hostname there is a file called foo.xml. If I try to hit
the url  < <http://localhost:8080/some/foo> http://localhost:8080/some/foo> 
<http://localhost:8080/some/foo> http://localhost:8080/some/foo - it doesn't 
work.

I did some reach on this issue and found a similar issue in bugzilla ( <
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38198>
http://issues.apache.org/bugzilla/show_bug.cgi?id=38198>

 <http://issues.apache.org/bugzilla/show_bug.cgi?id=38198>
http://issues.apache.org/bugzilla/show_bug.cgi?id=38198) that mentioned that the
path element is no longer being used and it mentions that I should rename the
context.xml file to contain the path. According to Bug#:38198 in bugzilla - the
fix is to rename the foo.xml file to be some#foo.xml and remove the path. So I
renamed the file in <TOMCAT_CONF>/Catalina/hostname/foo.xml to
<TOMCAT_CONF>/Catalina/hostname/some#foo.xml and it now contains the

following: 

<Context docBase="foo.war" debug="0" privileged="true" reloadable="true"/> 

When I do this and start up tomcat, I get the following error: 

SEVERE: Error starting static Resources 
java.lang.IllegalArgumentException: Document base
C:\www\tomcat_5.5.20\webapps\some\foo does not exist or is not a readable 
directory

        at
org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:14

0) 
        at
org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java

:3848) 
        at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4019) 
        at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:7

59) 
        at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) 
        at 
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) 
        at 
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:608)


        at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:535

) 
        at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470) 
        at 
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122) 
        at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310) 
        at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor

t.java:119) 
        at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021) 
        at 
org.apache.catalina.core.StandardHost.start(StandardHost.java:718) 
        at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013) 
        at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) 
        at 
org.apache.catalina.core.StandardService.start(StandardService.java:450) 
        at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:709) 
        at org.apache.catalina.startup.Catalina.start(Catalina.java:551) 
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39

) 
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl

.java:25) 
        at java.lang.reflect.Method.invoke(Method.java:585) 
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294) 
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432) 
Jan 19, 2007 3:58:06 PM org.apache.catalina.core.StandardContext start 
SEVERE: Error in resourceStart() 
Jan 19, 2007 3:58:06 PM org.apache.catalina.core.StandardContext start 
SEVERE: Error getConfigured 
Jan 19, 2007 3:58:06 PM org.apache.catalina.core.StandardContext start 
SEVERE: Context [/some/foo] startup failed due to previous errors 
Jan 19, 2007 3:58:06 PM org.apache.catalina.core.StandardContext stop 
INFO: Container
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/some/foo] 
has not been started 


I also tried changing the docBase to be the absolute path of the war file: 

some#foo.xml 
<Context docBase="C:\www\tomcat_5.5.20\webapps\foo.war" debug="0"
privileged="true" reloadable="true"/> 

But I get the same result as above. 

Could someone please tell me how they are able to get this to work with 5.5 
- what changes do I need to make so that when I deploy my war - foo.war, it show
up in the Tomcat Manager Application List with path /some/foo

Thanks for your help 
Ajay. 




http://issues.apache.org/bugzilla/show_bug.cgi?id=38198

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to