tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Riedel <a...@hearme.com>
Subject [Catalina] More On Startup Error
Date Fri, 14 Apr 2000 02:19:17 GMT
The problem is the syntax of the rules added to the 
org.apache.tomcat.util.xml.XMLMapper class by Catalina.java.

For example, the following rule is added:

	mapper.addRule("Engine", 
mapper.objectCreate("org.apache.tomcat.core.StandardEngine", "className"));

XMLMapper finds this associated tag in the server.xml file:

   <Engine defaultHost="localhost" unknownHost="localhost">

It uses the attribute of "className" from the rule when it goes to 
instantiate the org.apache.tomcat.core.StandardEngine class. Since the 
above tag does not contain an attribute of "className" a NULL is passed to 
the Class.forName method causing a NullPointerException. This could be 
fixed by changing Catalina.java to not contain the "classname" attribute 
parameter such as this:

	mapper.addRule("Engine", 
mapper.objectCreate("org.apache.tomcat.core.StandardEngine"));

There are a lot of these rules in the current Catalina.java that do not 
match properly with the current Catalina server.xml.

XMLMapper.java could be cleaned up a little but to catch and report this 
appropriately but my guess is that this is a low priority.


Andy




Mime
View raw message