
Context ClassLoader is not always JRuby ClassLoader
Reported by Peter Brant | November 17th, 2009 @ 06:22 PM
With JRuby 1.4.0, Warbler 0.9.14, and Tomcat, the context ClassLoader is set to the WebappClassLoader, not JRuby's ClassLoader.
AbstractDriverDefinition always uses the CCL to load the JDBC driver. The result is that JDBC drivers loaded from gems aren't found. The attached patch loads the JDBC driver from the ClassLoader that loaded AbstractDriverDefinition if the driver can't be found in the CCL. This fixes the problem in the above environment.
Comments and changes to this ticket
-
Alex Coles November 18th, 2009 @ 03:49 AM
- State changed from new to accepted
-
Alex Coles November 18th, 2009 @ 10:40 AM
The patch is applied on our next branch. I hope to take some time to do a test deployment of a 'real world' app to Tomcat over the next few days. Many thanks.
-
Alex Coles November 18th, 2009 @ 01:12 PM
Tested a real world app (albeit not a very big one) on Glassfish (which uses Tomcat under the covers) and this resolves the class loading issue. Once again many thanks!
-
Alex Coles November 20th, 2009 @ 11:05 AM
- State changed from accepted to resolved
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »