|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
JRuby Debug Finds Driver JarsUsing 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@... |
|
|
Re: JRuby Debug Finds Driver JarsHi Paul,
The debugger shouldn't really do much additional loading, so not sure now how come it behaves differently under the debugger. I'll check what I can find in the code, but you may want to check the actual command that the IDE executes when debugging (perhaps it will give some hints) -- turn on detailed logging in Tools -> Options -> Misc -> Ruby -> Ruby IDE Logging and debug the program, the command is then logged into the IDE's log file (View -> IDE Log, search for "Running:"). Erno Paul F Fraser wrote: > 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@... > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
| Free embeddable forum powered by Nabble | Forum Help |