Hello,
I’m trying to use the dalli gem (1.1.5) with UNIX sockets under JRuby
1.7.4 on Fedora 19. I get the following error.
Java::JavaLang::NoClassDefFoundError (Could not initialize class
jnr.unixsocket.Native$LibC):
jnr.unixsocket.Native.libsocket(Native.java:60)
jnr.unixsocket.Native.socket(Native.java:68)
jnr.unixsocket.UnixSocketChannel.(UnixSocketChannel.java:66)
jnr.unixsocket.UnixSocketChannel.open(UnixSocketChannel.java:47)
org.jruby.ext.socket.RubyUNIXSocket.init_unixsock(RubyUNIXSocket.java:257)
org.jruby.ext.socket.RubyUNIXSocket.initialize(RubyUNIXSocket.java:82)
org.jruby.ext.socket.RubyUNIXSocket$INVOKER$i$1$0$initialize.call(RubyUNIXSocket$INVOKER$i$1$0$initialize.gen)
org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOne.call(JavaMethod.java:968)
org.jruby.internal.runtime.methods.JavaMethod$JavaMethodN.call(JavaMethod.java:674)
…
I can see that the relevant classes are already present in the
classpath as part of jruby.jar, including jnr.unixsocket.Native$LibC. I
normally use RVM but I also tried downloading the standard JRuby
tarball and got the same result.
I’ve tried debugging it with -J-Djruby.native.verbose=true but that
didn’t show anything interesting. I’ve even tried LD_DEBUG=libs to see
whether it was having trouble with the native libraries. I see a bunch
of undefined symbol errors but they relate to all sorts of things and
libjffi-1.2.so does appear to load eventually so these are probably
spurious. Am I missing something here?
Regards,
James