« Return to Thread: JRuby Debug Finds Driver Jars

JRuby Debug Finds Driver Jars

by Paul F Fraser :: Rate this Message:

Reply to Author | View in Thread

Using netbeans Build 200905120201,  Vista Business SP1
I have a h2 database driver jar located in the project lib directory and
NOT referenced in the JRuby classpath screen.
When I run the program normally, it fails to find the driver jar, but
when debugging  it all works OK.
What is netbeans and/or the debugger doing to locate the jar in debug mode?

Jruby has a problem locating Jdbc drivers when called in a require
statement as detailed in an email from Nick Sieger in the Jruby mail
list. I am hoping that the nb debugger might have a simple solution....

=====================================
We have to jump through some hoops with AR-JDBC in order to use jar
files require'd by JRuby -- perhaps you're running into this issue.
The issue is the following:

http://java.sun.com/j2se/1.5.0/docs/api/java/sql/DriverManager.html

"When the method getConnection is called, the DriverManager will
attempt to locate a suitable driver from amongst those loaded at
initialization and those loaded explicitly using the same classloader
as the current applet or application."
=======================================

Thanks
Paul F Fraser

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...

 « Return to Thread: JRuby Debug Finds Driver Jars