tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Jacoby <a...@umich.edu>
Subject RemoteHostValve config problem
Date Wed, 09 Jan 2008 15:45:26 GMT

My RemoteHostValve config is causing a NPE when my app deploys, and I can't
figure out why.  It seems to be that the class can't be found, but the
tomcat-optional.jar w/ the class is in the standard /server/lib dir.

I'm using Tomcat 5.5.25 (OS X) and 5.5.20 (linux) and am getting the same
error on both.

The Valve is defined in my app's context.xml as so:
<?xml version="1.0" encoding="UTF-8"?>
<Context
    ...>
  <Resource ... />
  <Valve classname="org.apache.catalina.valves.RemoteHostValve"
        allow="localhost"/>
</Context>

The error message in catalina.out I'm getting after adding the valve:

Jan 9, 2008 9:40:35 AM org.apache.tomcat.util.digester.Digester startElement
SEVERE: Begin event threw exception
java.lang.NullPointerException
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:273)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
	at
org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:205)
	at org.apache.tomcat.util.digester.Rule.begin(Rule.java:153)
	at
org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1276)
	at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:533)
	at
com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:220)
	at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:872)
	at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1693)
	at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
	at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
	at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
	at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
	at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
	at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1562)
	at
org.apache.catalina.startup.ContextConfig.processContextConfig(ContextConfig.java:782)
	at
org.apache.catalina.startup.ContextConfig.contextConfig(ContextConfig.java:722)
	at org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:987)
	at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:279)
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
	at org.apache.catalina.core.StandardContext.init(StandardContext.java:5071)
	at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3984)
	at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
	at
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
	at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
	at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1206)
	at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
	at
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1306)
	at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
	at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1579)
	at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1559)
	at java.lang.Thread.run(Thread.java:613)
Jan 9, 2008 9:40:35 AM org.apache.catalina.startup.ContextConfig
processContextConfig
SEVERE: Parse error in context.xml for /SumProgAdmin
java.lang.NullPointerException
	at
org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2726)
	at
org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2752)
	at
org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1279)
	at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:533)
	at
com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:220)
	at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:872)
	at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1693)
	at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
	at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
	at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
	at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
	at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
	at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1562)
	at
org.apache.catalina.startup.ContextConfig.processContextConfig(ContextConfig.java:782)
	at
org.apache.catalina.startup.ContextConfig.contextConfig(ContextConfig.java:722)
	at org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:987)
	at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:279)
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
	at org.apache.catalina.core.StandardContext.init(StandardContext.java:5071)
	at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3984)
	at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
	at
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
	at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
	at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1206)
	at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
	at
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1306)
	at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
	at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1579)
	at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1559)
	at java.lang.Thread.run(Thread.java:613)
Jan 9, 2008 9:40:35 AM org.apache.catalina.startup.ContextConfig
processContextConfig
SEVERE: Occurred at line 17 column 21
Jan 9, 2008 9:40:35 AM org.apache.catalina.startup.ContextConfig start
SEVERE: Marking this application unavailable due to previous error(s)
Jan 9, 2008 9:40:35 AM org.apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
Jan 9, 2008 9:40:35 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/SumProgAdmin] startup failed due to previous errors

Thanks for any ideas,
Alex
-- 
View this message in context: http://www.nabble.com/RemoteHostValve-config-problem-tp14714628p14714628.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message