Native Library already loaded in another classloader when running in JBoss
--------------------------------------------------------------------------
Key: JRUBY-2606
URL: http://jira.codehaus.org/browse/JRUBY-2606
Project: JRuby
Issue Type: Bug
Components: Java Integration
Affects Versions: JRuby 1.1.1
Environment: Linux greeves01 2.6.24-17-generic #1 SMP Thu May 1
13:57:17 UTC 2008 x86_64 GNU/Linux
Reporter: Gareth Reeves
Our rails app connects to a 3rd party library via a JNI wrapper that we have
built. We don't have any problems when running with jruby and mongrel, but
under JBoss, after the first request has responded succesfully, we get the
following error.
java.lang.UnsatisfiedLinkError: Native Library [library] already loaded in
another classloader
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1716)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1647)
at java.lang.Runtime.load0(Runtime.java:770)
at java.lang.System.load(System.java:1005)
at IntexAPI.init(IntexAPI.java:8)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.jruby.javasupport.JavaMethod.invokeWithExceptionHandling(JavaMethod.java:250)
at org.jruby.javasupport.JavaMethod.invoke_static(JavaMethod.java:230)
at
org.jruby.javasupport.JavaClass$StaticMethodInvoker.execute(JavaClass.java:362)
at
org.jruby.internal.runtime.methods.SimpleCallbackMethod.call(SimpleCallbackMethod.java:67)
at
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:78)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.cacheAndCall(CallSite.java:146)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:302)
at org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:661)
at
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:309)
...
The issue is similar or the same as JRUBY-1939 but I am not sure I understand
the resolution. Should we be able to use JNI?
--
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
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email