Tomcat classloading issue
-------------------------
Key: GEOS-548
URL: http://jira.codehaus.org/browse/GEOS-548
Project: GeoServer
Type: Bug
Reporter: dblasby
Assigned to: dblasby
Fix For: 1.3.1
rob@anonymised.com reported this problem (I'm putting this in jira to track) "[Geoserver-devel] Class loading error":
Hi,
Have uncovered a class loader issue.
Deploying under Tomcat 5.5 I got a "ClassDefNotFound" error with a configuration that ended up executing the code in
org.geotools.data.geometryless.ConnectionPoolFacade:
public ConnectionPoolFacade(String poolKey, String driver)
throws SQLException {
try {
javax.sql.ConnectionPoolDataSource _nativePool = (javax.sql.ConnectionPoolDataSource) (Class.forName(driver)
.newInstance());
// LOGGER.fine("Obtained ConnectionPoolDataSource " + _nativePool
// + " from driver " + driver);
} catch (Exception e) {
throw new SQLException(
"Failed to instantiate connection pool using " + driver
+ "(" + e + ")");
}
}
But the same code in a simple JSP page worked just fine.
The same configuration, however, worked just fine in Jetty on the same machine.
So, there is some quirk or bug in the class loading that may be related to the way the datastore plugin stuff works in geoserver.
Has anyone got any insight into this beast?
I will attempt to test under Tomcat 4.1 on the same box when I get access again.
Rob Atkinson
------------------------------------------
I'm not sure at all, but I remember something about a change
in the class loading from Tomcat 5.0.x to 5.5.x.
It was something about having a global or not-so global calss loading.
But I may be completely wrong, it's a distant memory...
Bye
Paolo Rizzi
-----------------------------------------------------
Hmm - sounds possible, although it worked OK on windows but not SUSE linux.
Well, a bit more of a play with it today: it works on Tomcat 4.1 on the same platform. I guess I should file a Jira issue on this so its a warning at least.
Rob
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira