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 21822] New: - Placing a Valve inside a Context gives Null Pointer Exception...
Date Wed, 23 Jul 2003 09:29:09 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21822>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21822

Placing a Valve inside a Context gives Null Pointer Exception...

           Summary: Placing a Valve inside a Context gives Null Pointer
                    Exception...
           Product: Tomcat 5
           Version: 5.0.4
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: banil@novell.com


This was working in Tomcat 4.1.18, but is not working in 5.0.3 and 5.0.4

Placing a Valve inside the Context for admin.xml as follows:
-------------------------------------------------------------------
<Context path="/admin" docBase="../server/webapps/admin"
        debug="0" privileged="true">
 
  <Logger className="org.apache.catalina.logger.FileLogger"
             prefix="localhost_admin_log." suffix=".txt"
          timestamp="true"/>

  <Valve className="org.apache.catalina.valves.RequestDumperValve"/>

</Context>
-------------------------------------------------------------------
gives following Null Pointer Exception:

Jul 23, 2003 10:08:42 AM org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application from Config file URL file:D:\Tomcat5.0.4
\jakarta-tomcat-5\build\conf\Catalina\localhost\admin.xml
Jul 23, 2003 10:08:43 AM org.apache.catalina.core.StandardPipeline registerValve
INFO: Can't register valve RequestDumperValve[/admin]
java.lang.NullPointerException
        at org.apache.catalina.valves.ValveBase.createObjectName
(ValveBase.java:292)
        at org.apache.catalina.core.StandardPipeline.registerValve
(StandardPipeline.java:357)
        at org.apache.catalina.core.StandardPipeline.addValve
(StandardPipeline.java:492)
        at org.apache.catalina.core.ContainerBase.addValve
(ContainerBase.java:1306)
        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.crimson.parser.Parser2.maybeElement(Parser2.java:1536)
        at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)
        at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)
        at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500)
        at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
        at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
        at org.apache.commons.digester.Digester.parse(Digester.java:1567)
        at org.apache.catalina.core.StandardHostDeployer.install
(StandardHostDeployer.java:515)
        at org.apache.catalina.core.StandardHost.install(StandardHost.java:869)
        at org.apache.catalina.startup.HostConfig.deployDescriptors
(HostConfig.java:519)
        at org.apache.catalina.startup.HostConfig.deployApps
(HostConfig.java:470)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:920)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent
(HostConfig.java:399)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent
(LifecycleSupport.java:166)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1135)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:795)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1127)
        at org.apache.catalina.core.StandardEngine.start
(StandardEngine.java:502)
        at org.apache.catalina.core.StandardService.start
(StandardService.java:519)
        at org.apache.catalina.core.StandardServer.start
(StandardServer.java:2312)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:577)
        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:394)
Jul 23, 2003 10:08:43 AM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.util.LocalStrings', 
returnNull=true
-------------------------------------------------------------------------
Got same exception when placed a Context having a Valve inside server.xml.
Placing a Valve inside a Host seems to work fine.

---------------------------------------------------------------------
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