Hey everybody,
I've been running tomcat 4.0.2 with jdk 1.3.1 and poolman 2.0.4 supported JDBC Realms
for a while now with no problems. I recently tried to switch to jdk 1.4 (Something
that I think I need to do for it's Headless support on my Linux box) and it gave me
the following exception on startup.
java.lang.NullPointerException
at
com.codestudio.management.PoolManConfiguration.parseXML(PoolManConfiguration.java:117)
at
com.codestudio.management.PoolManConfiguration.loadConfiguration(PoolManConfiguration.java:75)
at com.codestudio.management.PoolManBootstrap.<init>(PoolManBootstrap.java:61)
at com.codestudio.util.SQLManager.assertLoaded(SQLManager.java:109)
at com.codestudio.util.SQLManager.requestConnection(SQLManager.java:190)
at com.codestudio.sql.PoolMan.connect(PoolMan.java:184)
at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:548)
at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:613)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3345)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:614)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
at org.apache.catalina.core.StandardService.start(StandardService.java:388)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:42)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:28)
at java.lang.reflect.Method.invoke(Method.java:327)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
Line 117 of PoolManConfiguration.java is the following.
URL confURL = PoolManConfiguration.class.getClassLoader().getResource(configFile);
It's basically trying to load poolman.xml from common/classes.
It looks like it's having a major problem with the classloader. I.e.,
PoolManConfiguration.class.getClassLoader() is what is null. I've checked this with
some println()'s.
The strange thing is that this is not simply due to the change from jdk1.3.1 to jdk1.4
because I can run tomcat 4.0.1 with the same configuration with no problems.
Incidentally, I have to use 4.0.2 because I need to use the <error-page> element in my
application and it is broken in 4.0.1.
Does anyone have any idea what changed in both tomcat and the jdk from versions 4.0.1
and 1.3.1 to versions 4.0.2 and 1.4 that would account for this?
Does anyone know of an easy way to fix the <error-page> problem in 4.0.1? If so I'll
just use that.
If not I'll have to investigate another connection pooler for MySQL. Any ideas on
that?
Hope I hear from you guys.
Cavan Morris