-
-
Notifications
You must be signed in to change notification settings - Fork 925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to load Sybase driver in rc1, works in pre2 #3110
Comments
Are you able to try jruby head? |
Unable to install jruby-head with rvm on mac or linux to try it. Same errors on both platforms. Is there another way to get it?
|
Ahh I'm guessing you don't have maven 3.3.1+ installed locally, which we need for our build. Perhaps you could try cloning and building yourself? Just clone repo and run ./mvnw from it. |
I’m hitting a wall with building jruby. Mac OS X 10.10.4.
|
Looks like you're not building on Java 7+? Make sure Java 7+ is in PATH. |
Another option: create a temporary git repo that contains all the relevant files to repro and I can take it from there :-) |
it looks very much that |
Here is the the demo repo: |
@mkristian @DougEverly Adding set_context_class_loader does indeed make the script boot up properly (though of course I don't have a sybase database here to confirm it works). Here's my diff to the reproduction script (thanks @DougEverly): --- sybase_bug_orig.rb 2015-07-07 14:53:42.000000000 -0500
+++ sybase_bug.rb 2015-07-07 14:51:49.000000000 -0500
@@ -3,6 +3,8 @@
require 'jconn3.jar'
require 'pp'
+JRuby.set_context_class_loader
+
# load the driver
Java::com.sybase.jdbc3.jdbc.SybDriver
@mkristian These sorts of issues worry me. There are a number of Java libraries, JDBC one of the biggest, that really do what context classloader set. If we're not setting it for command line runs anymore, aren't we going to keep getting these bugs? |
@headius setting it for the commandline is just a partial fix. suppose you put THIS code into a gem including the sybDriver then this gem works ONLY on the command line and fails with the same error when using it inside a j2ee or osgi container. but adding |
@headius I applied your diff and I get this error in rc1 and pre2 (I don’t have head). From your testing tho, it seems that
I am not familiar with the intricacies of |
fixed via 7d3bc47 |
Here is a discrepancy between pre2 and rc1.
Working pre2
Broken rc1
The files
The Code
The text was updated successfully, but these errors were encountered: