tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 27916] New: - context.xml in war appears to require a docBase
Date Wed, 24 Mar 2004 19:12:44 GMT
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=27916>.
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=27916

context.xml in war appears to require a docBase

           Summary: context.xml in war appears to require a docBase
           Product: Tomcat 5
           Version: 5.0.19
          Platform: All
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: David.Holscher@nav-international.com


The deployment documentation states that you can put a context.xml in the META-
INF directory of your war file to specify Tomcat specific settings. However, 
whenever I put a context.xml in my war file that looks like this:

<Context path="/atd" reloadable="true">
</Context>

I get an NPE (see below) after dropping this file in the webapps directory and 
starting Tomcat. If I set the docBase this doesn't happen. However it doesn't 
make sense to set the docBase since who knows where the war file will actually 
be deployed at. Shouldn't the attributes in the context.xml file I provide with 
my web app just be defaults while the other attributes come from the xml file 
in the conf/Catalina/localhost directory? Of course there isn't a context file 
in there the first time I start the server up, but then again there isn't one 
in there when I drop in a war file without a context.xml file and one is 
created with a correct docBase.



SEVERE: End event threw exception
java.lang.reflect.InvocationTargetException
	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:324)
	at org.apache.commons.beanutils.MethodUtils.invokeMethod
(MethodUtils.java:252)
	at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
	at org.apache.commons.digester.Rule.end(Rule.java:276)
	at org.apache.commons.digester.Digester.endElement(Digester.java:1058)
	at org.apache.catalina.util.CatalinaDigester.endElement
(CatalinaDigester.java:123)
	at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown 
Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement
(Unknown Source)
	at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.
dispatch(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument
(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at org.apache.commons.digester.Digester.parse(Digester.java:1567)
	at org.apache.catalina.core.StandardHostDeployer.install
(StandardHostDeployer.java:519)
	at org.apache.catalina.core.StandardHost.install(StandardHost.java:906)
	at org.apache.catalina.startup.HostConfig.deployDescriptors
(HostConfig.java:527)
	at org.apache.catalina.startup.HostConfig.deployApps
(HostConfig.java:472)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1008)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent
(HostConfig.java:394)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent
(LifecycleSupport.java:166)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1134)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:832)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1126)
	at org.apache.catalina.core.StandardEngine.start
(StandardEngine.java:521)
	at org.apache.catalina.core.StandardService.start
(StandardService.java:519)
	at org.apache.catalina.core.StandardServer.start
(StandardServer.java:2345)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:594)
	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:324)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398)
Caused by: java.lang.NullPointerException
	at java.io.File.<init>(File.java:180)
	at org.apache.catalina.core.StandardContext.getBasePath
(StandardContext.java:4722)
	at org.apache.catalina.core.StandardContext.getServletContext
(StandardContext.java:1464)
	at org.apache.catalina.core.StandardContext.postWorkDirectory
(StandardContext.java:4972)
	at org.apache.catalina.core.StandardContext.start
(StandardContext.java:4128)
	at org.apache.catalina.core.ContainerBase.addChildInternal
(ContainerBase.java:866)
	at org.apache.catalina.core.ContainerBase.addChild
(ContainerBase.java:850)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:638)
	at org.apache.catalina.core.StandardHostDeployer.addChild
(StandardHostDeployer.java:839)

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message