<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Error: java.lang.UnsatisfiedLinkError in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/error-java-lang-unsatisfiedlinkerror/m-p/3960413#M95085</link>
    <description>&amp;gt;change the makefile as you suggest and then compile the source (.c)&lt;BR /&gt;&lt;BR /&gt;This would not fix your problem but make sure you don't have others.&lt;BR /&gt;&lt;BR /&gt;/&amp;gt;&amp;gt;java TestJava2CallingNative cImpl&lt;BR /&gt;&amp;gt;/usr/lib/dld.sl: Unresolved symbol: userlog (code) from .//libcImpl.sl&lt;BR /&gt;&lt;BR /&gt;This seems to tell you exactly what was wrong.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Know that need link the definition of "userlog" function, but make this generate an link error:&lt;BR /&gt;/usr/ccs/bin/ld: /tuxedo8/tuxedo8.1/lib/libfml.sl: Mismatched ABI. 64-bit PA shared library found in 32-bit link.&lt;BR /&gt;&lt;BR /&gt;You need to compile and link with +DD64.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Question: How can know that my JAVA is from 64-bit?&lt;BR /&gt;&lt;BR /&gt;You need to pass in "-d64" to get 64 bit.&lt;BR /&gt;&lt;BR /&gt;Have you tried my suggestion of a dummy main to load your JNI?</description>
    <pubDate>Tue, 13 Mar 2007 21:43:11 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2007-03-13T21:43:11Z</dc:date>
    <item>
      <title>Error: java.lang.UnsatisfiedLinkError</title>
      <link>https://community.hpe.com/t5/operating-system-linux/error-java-lang-unsatisfiedlinkerror/m-p/3960410#M95082</link>
      <description>I've an problem with JNI make in TUXEDO 8.1 and Java 1.4, I want make an simple example for use both. My compilation string is:&lt;BR /&gt;&lt;BR /&gt;cc -Ae +u4 +Z -c -D_HPUX -D_POSIX_C_SOURCE=199506L +DD64 \&lt;BR /&gt;-I /tuxedo8/tuxedo8.1/include -I/opt/java1.4/include -I/opt/java1.4/include/hp-ux \&lt;BR /&gt;-lc -lnsl -lpthread -L /tuxedo8/tuxedo8.1/lib -lfml -lfml32 -ltux -lengine -lbuft -lgiconv -lusort \&lt;BR /&gt;cImpl.c&lt;BR /&gt;&lt;BR /&gt;This generate an .o file then run the next command:&lt;BR /&gt;&lt;BR /&gt;cc -b -o libcImpl.sl cImpl.o +DD64 \&lt;BR /&gt;-lc -lnsl -lpthread -L /tuxedo8/tuxedo8.1/lib -lfml -lfml32 -ltux -lengine -lbuft -lgiconv -lusort&lt;BR /&gt;&lt;BR /&gt;And generate the libcImpl.sl "Shared Library" so try load this library with a java program:&lt;BR /&gt;&lt;BR /&gt;java TestJava2CallingNative cImpl&lt;BR /&gt;&lt;BR /&gt;The result is a message of subject . . .&lt;BR /&gt;&lt;BR /&gt;/libcImpl.sl: specified file is not a shared library, or a format error was detected.&lt;BR /&gt;&lt;BR /&gt;How can verify my .sl file or what are doing bad?&lt;BR /&gt;&lt;BR /&gt;thank you</description>
      <pubDate>Mon, 12 Mar 2007 18:58:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/error-java-lang-unsatisfiedlinkerror/m-p/3960410#M95082</guid>
      <dc:creator>Gerardo AYALA</dc:creator>
      <dc:date>2007-03-12T18:58:30Z</dc:date>
    </item>
    <item>
      <title>Re: Error: java.lang.UnsatisfiedLinkError</title>
      <link>https://community.hpe.com/t5/operating-system-linux/error-java-lang-unsatisfiedlinkerror/m-p/3960411#M95083</link>
      <description>&lt;P&gt;There is nothing that tells you in more detail what is wrong? The name of the symbol in question?&lt;BR /&gt;&lt;BR /&gt;cc -b -o libcImpl.sl cImpl.o +DD64 \&lt;BR /&gt;-lc -lnsl -lpthread -L/tuxedo8/tuxedo8.1/lib -lfml -lfml32 -ltux -lengine -lbuft -lgiconv -lusort&lt;BR /&gt;&lt;BR /&gt;You have your libs out of order. -lc should be removed. System libs should be after user libs, move -lnsl -lpthread to the end.&lt;BR /&gt;&lt;BR /&gt;/libcImpl.sl: specified file is not a shared library, or a format error was detected.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;How can verify my .sl file or what are doing bad?&lt;BR /&gt;&lt;BR /&gt;To check if the right format, you could try&lt;BR /&gt;$ file libcImpl.sl&lt;BR /&gt;&lt;BR /&gt;I assume you are using a 64 bit java (-d64) to go with your 64 bit lib??&lt;BR /&gt;&lt;BR /&gt;If you can't get java to give you more details on unsats, you should write a dummy main that uses shl_load or dlopen on your lib.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Oct 2011 04:05:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/error-java-lang-unsatisfiedlinkerror/m-p/3960411#M95083</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-10-10T04:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: Error: java.lang.UnsatisfiedLinkError</title>
      <link>https://community.hpe.com/t5/operating-system-linux/error-java-lang-unsatisfiedlinkerror/m-p/3960412#M95084</link>
      <description>Dennis,&lt;BR /&gt;&lt;BR /&gt;change the makefile as you suggest and then compile the source (.c) the result is ( /&amp;gt;file libcImpl.sl)&lt;BR /&gt;&lt;BR /&gt;libcImpl.sl:    ELF-64 shared object file - PA-RISC 2.0 (LP64)&lt;BR /&gt;&lt;BR /&gt;But when execute my java program send me the error:&lt;BR /&gt;Error: java.lang.UnsatisfiedLinkError&lt;BR /&gt;&lt;BR /&gt;So what recompile without some libraries leave the makefile:&lt;BR /&gt;&lt;BR /&gt;cc -b -o libcImpl.sl cImpl.o&lt;BR /&gt;&lt;BR /&gt;The result was:&lt;BR /&gt;&lt;BR /&gt;/&amp;gt;file libcImpl.sl&lt;BR /&gt;libcImpl.sl:    PA-RISC2.0 shared library -not stripped&lt;BR /&gt;&lt;BR /&gt;/&amp;gt;java TestJava2CallingNative cImpl&lt;BR /&gt;Shared library cImpl load&lt;BR /&gt;call to method sayHelloWorld&lt;BR /&gt;C say HelloWorld via stdio&lt;BR /&gt;/usr/lib/dld.sl: Unresolved symbol: userlog (code)  from .//libcImpl.sl&lt;BR /&gt;/usr/lib/dld.slAbort(coredump)&lt;BR /&gt; &lt;BR /&gt;I Know that need link the definition of "userlog" function, but make this generate an link error:&lt;BR /&gt;&lt;BR /&gt;/usr/ccs/bin/ld: /tuxedo8/tuxedo8.1/lib/libfml.sl: Mismatched ABI. 64-bit PA shared library found in 32-bit link.&lt;BR /&gt;&lt;BR /&gt;For this reason my makefile need link in mode 64-bit all libraries.&lt;BR /&gt;&lt;BR /&gt;Question: How can know that my JAVA is from 64-bit?&lt;BR /&gt;&lt;BR /&gt;thank&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 13 Mar 2007 11:21:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/error-java-lang-unsatisfiedlinkerror/m-p/3960412#M95084</guid>
      <dc:creator>Gerardo AYALA</dc:creator>
      <dc:date>2007-03-13T11:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: Error: java.lang.UnsatisfiedLinkError</title>
      <link>https://community.hpe.com/t5/operating-system-linux/error-java-lang-unsatisfiedlinkerror/m-p/3960413#M95085</link>
      <description>&amp;gt;change the makefile as you suggest and then compile the source (.c)&lt;BR /&gt;&lt;BR /&gt;This would not fix your problem but make sure you don't have others.&lt;BR /&gt;&lt;BR /&gt;/&amp;gt;&amp;gt;java TestJava2CallingNative cImpl&lt;BR /&gt;&amp;gt;/usr/lib/dld.sl: Unresolved symbol: userlog (code) from .//libcImpl.sl&lt;BR /&gt;&lt;BR /&gt;This seems to tell you exactly what was wrong.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Know that need link the definition of "userlog" function, but make this generate an link error:&lt;BR /&gt;/usr/ccs/bin/ld: /tuxedo8/tuxedo8.1/lib/libfml.sl: Mismatched ABI. 64-bit PA shared library found in 32-bit link.&lt;BR /&gt;&lt;BR /&gt;You need to compile and link with +DD64.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Question: How can know that my JAVA is from 64-bit?&lt;BR /&gt;&lt;BR /&gt;You need to pass in "-d64" to get 64 bit.&lt;BR /&gt;&lt;BR /&gt;Have you tried my suggestion of a dummy main to load your JNI?</description>
      <pubDate>Tue, 13 Mar 2007 21:43:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/error-java-lang-unsatisfiedlinkerror/m-p/3960413#M95085</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-03-13T21:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: Error: java.lang.UnsatisfiedLinkError</title>
      <link>https://community.hpe.com/t5/operating-system-linux/error-java-lang-unsatisfiedlinkerror/m-p/3960414#M95086</link>
      <description>Dennis,&lt;BR /&gt;&lt;BR /&gt;I compile with +DD64 option and libraries include successful.&lt;BR /&gt;But the error now is:&lt;BR /&gt;&lt;BR /&gt;Error: java.lang.UnsatisfiedLinkError: /jni_tst/libcImpl.sl: some symbol required by the shared library could not be found.&lt;BR /&gt;&lt;BR /&gt;The core was not generated used -d64 option.&lt;BR /&gt;&lt;BR /&gt;I make my main dummy for load JNI and execute successful, no have problem, the problem is when link the TUXEDO libreries.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 14 Mar 2007 14:13:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/error-java-lang-unsatisfiedlinkerror/m-p/3960414#M95086</guid>
      <dc:creator>Gerardo AYALA</dc:creator>
      <dc:date>2007-03-14T14:13:26Z</dc:date>
    </item>
    <item>
      <title>Re: Error: java.lang.UnsatisfiedLinkError</title>
      <link>https://community.hpe.com/t5/operating-system-linux/error-java-lang-unsatisfiedlinkerror/m-p/3960415#M95087</link>
      <description>&amp;gt;Error: java.lang.UnsatisfiedLinkError: /jni_tst/libcImpl.sl: some symbol required by the shared library could not be found.&lt;BR /&gt;&lt;BR /&gt;That's not very helpful.  :-(&lt;BR /&gt;The PA aC++ runtime makes sure you get a list before you abort.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;The core was not generated used -d64 option.&lt;BR /&gt;&lt;BR /&gt;Can you use that option with java?&lt;BR /&gt;&lt;BR /&gt;&amp;gt;I make my main dummy for load JNI and execute successful, no have problem, the problem is when link the TUXEDO libreries.&lt;BR /&gt;&lt;BR /&gt;You have to link exactly the same as your real application, with TUXEDO.  Using shl_load with BIND_IMMEDIATE would give you the list of all unsats.&lt;BR /&gt;&lt;BR /&gt;I suppose you can also get them with -Wl,+vnoshlibunsats.  (If you left off the -lc as I said above, add it back (after -lpthread), look at the messages, then remove it.)</description>
      <pubDate>Wed, 14 Mar 2007 20:17:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/error-java-lang-unsatisfiedlinkerror/m-p/3960415#M95087</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-03-14T20:17:16Z</dc:date>
    </item>
    <item>
      <title>Re: Error: java.lang.UnsatisfiedLinkError</title>
      <link>https://community.hpe.com/t5/operating-system-linux/error-java-lang-unsatisfiedlinkerror/m-p/3960416#M95088</link>
      <description>Can you show the complete error message?  I just got this reported:&lt;BR /&gt;       java.lang.UnsatisfiedLinkError: xx.so:&lt;BR /&gt;xx.so' is not a valid load module: Bad machine type&lt;BR /&gt;&lt;BR /&gt;A message similar to this would indicate you need that -d64.&lt;BR /&gt;</description>
      <pubDate>Wed, 14 Mar 2007 20:37:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/error-java-lang-unsatisfiedlinkerror/m-p/3960416#M95088</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-03-14T20:37:47Z</dc:date>
    </item>
  </channel>
</rss>

