[zeromq-dev] jzmq UnsatisfiedLinkError on Linux

Joe Holloway jholloway7 at gmail.com
Wed Apr 14 21:19:23 CEST 2010

Anyone else using jzmq on Linux able to work with the latest API
changes?  It builds fine and the shared library is loaded into the
JVM, but I have issues resolving the JNI functions from there.

    java.lang.UnsatisfiedLinkError: org.zeromq.ZMQ$Context.construct(III)V
        at org.zeromq.ZMQ$Context.construct(Native Method)

I can tell the library is getting loaded otherwise I would get a
different UnsatisfiedLinkError prior to invoking the native method,
such as this one:

    Exception in thread "main" java.lang.UnsatisfiedLinkError: no jzmq
in java.library.path

Dumping the symbols from the underlying shared object, I can see
symbols that appear to match the function signatures in the source

/usr/local/lib$ nm libjzmq.so
00001170 T Java_org_zeromq_ZMQ_00024Context_construct
000010e0 T Java_org_zeromq_ZMQ_00024Context_finalize
00001df0 T Java_org_zeromq_ZMQ_00024Poller_run_1poll
000017d0 T Java_org_zeromq_ZMQ_00024Socket_bind
000016f0 T Java_org_zeromq_ZMQ_00024Socket_connect
00001c00 T Java_org_zeromq_ZMQ_00024Socket_construct
00001a60 T Java_org_zeromq_ZMQ_00024Socket_finalize
000013d0 T Java_org_zeromq_ZMQ_00024Socket_recv
00001540 T Java_org_zeromq_ZMQ_00024Socket_send
000019a0 T Java_org_zeromq_ZMQ_00024Socket_setsockopt__IJ
000018b0 T Java_org_zeromq_ZMQ_00024Socket_setsockopt__ILjava_lang_String_2

I was able to get jzmq to work before the latest API refactoring, so
I'm wondering if perhaps the inner class thing may be tripping it up
now on this platform?

I've built and ran jzmq against both OpenJDK and Sun JDK and both
exhibit the same behavior.   I have also run ldconfig as root, but I
don't think that really affects this particular issue.

Thanks for any pointers (pun somewhat intended)

More information about the zeromq-dev mailing list