You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jon Skeet <jo...@peramon.com> on 2000/09/26 15:53:26 UTC
Nasty exception (sometimes on console!) which started Tomcat
I'm trying to set up a system where Tomcat runs in both standalone and
JServ modes simultaneously. From what I've read, this shouldn't be tricky.
I have it running standalone on port 19000 and working perfectly. I'm now
trying the JServ part. I'll put the configuration files at the bottom of
this message, but the error I'm getting (when I try to connect to
hostname/jontc/index.html) is the following:
java.lang.NullPointerException
at org.apache.tomcat.core.ContextManager.handleError(ContextManager.java:644)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:566)
at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:156)
at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
at java.lang.Thread.run(Thread.java:484)
This appears on the console which started Tomcat (in the background). If
I add a context line in server.xml:
<Context path="" docBase="webapps/jon" debug="0" reloadable="true" >
</Context>
I start to get a more helpful error:
java.lang.NullPointerException
at java.util.Hashtable.get(Hashtable.java:320)
at org.apache.tomcat.request.SimpleMapper.getPathMatch(SimpleMapper.java:352)
at org.apache.tomcat.request.SimpleMapper.findContainer(SimpleMapper.java:239)
at org.apache.tomcat.request.SimpleMapper.requestMap(SimpleMapper.java:188)
at org.apache.tomcat.core.ContextManager.processRequest(ContextManager.java:594)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:552)
at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:156)
at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
at java.lang.Thread.run(Thread.java:484)
At least, I suspect that's more useful to someone. It seems a bit of a
shame that you *have* to have a context mapping "" though.
Anyway, all this still doesn't help me find out what's wrong with the
Apache/mod_jserv/Tomcat bridging. Does anyone have any ideas?
Many thanks,
Jon Skeet
Versions:
Linux 2.2.12-20
Apache 1.3.9-4
JServ 1.1-2 RH6x
Tomcat 3.1
JServ.conf: (non-commented lines)
<IfModule mod_jserv.c>
ApJServManual on
ApJServLogFile /var/log/httpd/mod_jserv.log
ApJServLogLevel notice
ApJServDefaultProtocol ajpv12
ApJServDefaultPort 8007
ApJServSecretKey DISABLED
(Removed other mount points)
ApJServMount /jontc ajpv12://localhost:18500/jon
</IfModule>
server.xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<Server>
<!-- Debug low-level events in XmlMapper startup -->
<xmlmapper:debug level="0" />
<!-- This is quite flexible; we can either have a log file per
module in Tomcat (example: ContextManager) or we can have
one for Servlets and one for Jasper, or we can just have
one tomcat.log for both Servlet and Jasper.
If you omit "path" there, then stderr should be used.
verbosityLevel values can be:
FATAL
ERROR
WARNING
INFORMATION
DEBUG
-->
<Logger name="tc_log"
path="/home/jon/tomcat/logs/tomcat.log"
customOutput="yes" />
<Logger name="servlet_log"
path="/home/jon/tomcat/logs/servlet.log"
customOutput="yes" />
<Logger name="JASPER_LOG"
path="/home/jon/tomcat/logs/jasper.log"
verbosityLevel = "INFORMATION" />
<!-- Add "home" attribute if you want tomcat to be based on a different directory
"home" is used to create work and to read webapps, but not for libs or CLASSPATH.
Note that TOMCAT_HOME is where tomcat is installed, while ContextManager home is the
base directory for contexts, webapps/ and work/
-->
<ContextManager debug="0" workDir="work" home="/home/jon/tomcat">
<!-- ContextInterceptor className="org.apache.tomcat.context.LogEvents" / -->
<ContextInterceptor className="org.apache.tomcat.context.AutoSetup" />
<ContextInterceptor className="org.apache.tomcat.context.DefaultCMSetter" />
<ContextInterceptor className="org.apache.tomcat.context.WorkDirInterceptor" />
<ContextInterceptor className="org.apache.tomcat.context.WebXmlReader" />
<ContextInterceptor className="org.apache.tomcat.context.LoadOnStartupInterceptor" />
<!-- Request processing -->
<RequestInterceptor className="org.apache.tomcat.request.SimpleMapper" debug="0" />
<RequestInterceptor className="org.apache.tomcat.request.SessionInterceptor" />
<RequestInterceptor className="org.apache.tomcat.request.SecurityCheck" />
<RequestInterceptor className="org.apache.tomcat.request.FixHeaders" />
<Connector className="org.apache.tomcat.service.SimpleTcpConnector">
<Parameter name="handler" value="org.apache.tomcat.service.http.HttpConnectionHandler"/>
<Parameter name="port" value="19000"/>
</Connector>
<Connector className="org.apache.tomcat.service.SimpleTcpConnector">
<Parameter name="handler" value="org.apache.tomcat.service.connector.Ajp12ConnectionHandler"/>
<Parameter name="port" value="18500"/>
</Connector>
<!-- example - how to override AutoSetup actions -->
<Context path="/jon" docBase="webapps/jon" debug="0" reloadable="true">
</Context>
<Context path="" docBase="webapps/jon" debug="0" reloadable="true" >
</Context>
</ContextManager>
</Server>