<?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: Can't load library:  /home/nalgo01/cImpl in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/error-java-lang-unsatisfiedlinkerror-can-t-load-library-home/m-p/4333131#M683697</link>
    <description>&amp;gt;Thanks for all your time spending on this.&lt;BR /&gt;&amp;gt;I used some uppercase letters while loading and stored the same lib with different cases in dir. &lt;BR /&gt;&lt;BR /&gt;Glad you figured it out.&lt;BR /&gt;Please read the following about assigning points:&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/helptips.do?#33" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/helptips.do?#33&lt;/A&gt;</description>
    <pubDate>Fri, 16 Jan 2009 10:31:51 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2009-01-16T10:31:51Z</dc:date>
    <item>
      <title>error: java.lang.UnsatisfiedLinkError: Can't load library:  /home/nalgo01/cImpl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-java-lang-unsatisfiedlinkerror-can-t-load-library-home/m-p/4333110#M683676</link>
      <description>Hi World,&lt;BR /&gt;&lt;BR /&gt;In the below u can find a sample Java™ program that calls a native method, which has a C implementation:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;OS : HP-UX IA64&lt;BR /&gt;java : 1.6&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Here is the sample program.&lt;BR /&gt;&lt;BR /&gt;####################################&lt;BR /&gt;&lt;BR /&gt;//&lt;BR /&gt;// File TestJava2CallingNative.java&lt;BR /&gt;//&lt;BR /&gt;class TestJava2CallingNative {&lt;BR /&gt;native static void sayHelloWorld();&lt;BR /&gt;public static void main(String args[])&lt;BR /&gt;{&lt;BR /&gt;String libname = args[0];&lt;BR /&gt;try {&lt;BR /&gt;System.loadLibrary(libname);&lt;BR /&gt;System.out.println("Library " +&lt;BR /&gt;libname + " successfully loaded");&lt;BR /&gt;}&lt;BR /&gt;catch (UnsatisfiedLinkError Err) {&lt;BR /&gt;System.out.println("error: " + Err);&lt;BR /&gt;return;&lt;BR /&gt;}&lt;BR /&gt;System.out.println("Calling sayHelloWorld");&lt;BR /&gt;sayHelloWorld();&lt;BR /&gt;System.out.println("All done");&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Compile this class:&lt;BR /&gt;&lt;BR /&gt;$ &lt;JAVA_DIR&gt;/bin/javac -verbose TestJava2CallingNative.java&lt;BR /&gt;&lt;BR /&gt;Output:&lt;BR /&gt;&lt;BR /&gt;TestJava2CallingNative.class&lt;BR /&gt;&lt;BR /&gt;Generate the JNI header file for this class. You must have the current directory in your CLASSPATH for the javah command to find your newly compiled class file.&lt;BR /&gt;&lt;BR /&gt;$ &lt;JAVA_DIR&gt;/bin/javah -verbose -jni TestJava2CallingNative&lt;BR /&gt;&lt;BR /&gt;Output:&lt;BR /&gt;&lt;BR /&gt;TestJava2CallingNative.h&lt;BR /&gt;&lt;BR /&gt;#########################################&lt;BR /&gt;&lt;BR /&gt;Here is the sample c code&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Here is the sample C native method implementation for sayHelloWorld:&lt;BR /&gt;&lt;BR /&gt;/*&lt;BR /&gt;* File cImpl.c&lt;BR /&gt;*/&lt;BR /&gt;#include "TestJava2CallingNative.h"&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;JNIEXPORT void JNICALL&lt;BR /&gt;Java_TestJava2CallingNative_sayHelloWorld(JNIEnv *env, jclass class)&lt;BR /&gt;{&lt;BR /&gt;printf("C says HelloWorld via stdio\n");&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;To compile this C source file:&lt;BR /&gt;&lt;BR /&gt;$ cc -Ae +u4 +z -c -mt -I&lt;JAVA_DIR&gt;/include \&lt;BR /&gt;-I&lt;JAVA_DIR&gt;/include/hp-ux cImpl.c&lt;BR /&gt;&lt;BR /&gt;Output:&lt;BR /&gt;&lt;BR /&gt;cImpl.o&lt;BR /&gt;&lt;BR /&gt;Create the shared library containing the native method implementation:&lt;BR /&gt;&lt;BR /&gt;ld -b -o libcImpl.so cImpl.o ( Is this creation correct for HP-UX IA64 )&lt;BR /&gt;&lt;BR /&gt;Output:&lt;BR /&gt;&lt;BR /&gt;libcImpl.so&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Have set the path as :&lt;BR /&gt;To execute the Java™ program, you must set the SHLIB_PATH environment variable to contain the location of the directory that contains libcImpl.so&lt;BR /&gt;&lt;BR /&gt;Once i set the PATH i did the following steps&lt;BR /&gt;&lt;BR /&gt;$ export SHLIB_PATH=.:$SHLIB_PATH&lt;BR /&gt;$ &lt;JAVA_DIR&gt;/bin/java TestJava2CallingNative cImpl&lt;BR /&gt;&lt;BR /&gt;This is what i have done...&lt;BR /&gt;&lt;BR /&gt;While extecuting the&lt;BR /&gt;$ &lt;JAVA_DIR&gt;/bin/java TestJava2CallingNative cImpl&lt;BR /&gt;above line i got the error message as&lt;BR /&gt;&lt;BR /&gt;# java TestJava2CallingNative cImpl&lt;BR /&gt;error: java.lang.UnsatisfiedLinkError: Can't load library: /home/nalgo01/cImpl&lt;BR /&gt;&lt;BR /&gt;what is the solution for this. Does i need to set any other options while compiling or linking.&lt;BR /&gt;&lt;BR /&gt;Make sure i am using HP-UX IA64.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Any help is apreceated&lt;BR /&gt;&lt;BR /&gt;Thanks in advance&lt;BR /&gt;Gopi&lt;/JAVA_DIR&gt;&lt;/JAVA_DIR&gt;&lt;/JAVA_DIR&gt;&lt;/JAVA_DIR&gt;&lt;/STDIO.H&gt;&lt;/JAVA_DIR&gt;&lt;/JAVA_DIR&gt;</description>
      <pubDate>Wed, 07 Jan 2009 10:23:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-java-lang-unsatisfiedlinkerror-can-t-load-library-home/m-p/4333110#M683676</guid>
      <dc:creator>nallamolu</dc:creator>
      <dc:date>2009-01-07T10:23:31Z</dc:date>
    </item>
    <item>
      <title>Re: error: java.lang.UnsatisfiedLinkError: Can't load library:  /home/nalgo01/cImpl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-java-lang-unsatisfiedlinkerror-can-t-load-library-home/m-p/4333111#M683677</link>
      <description>Hi!&lt;BR /&gt;&lt;BR /&gt;Should'nt /home/nalgo01 (absolute path) be in your SHLIB_PATH when thats where clmpl is located?&lt;BR /&gt;&lt;BR /&gt;export SHLIB_PATH=$SHLIB_PATH:/home/nalgo01&lt;BR /&gt;&lt;BR /&gt;Yours&lt;BR /&gt;Danny</description>
      <pubDate>Wed, 07 Jan 2009 13:27:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-java-lang-unsatisfiedlinkerror-can-t-load-library-home/m-p/4333111#M683677</guid>
      <dc:creator>Danny Petterson - DK</dc:creator>
      <dc:date>2009-01-07T13:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: error: java.lang.UnsatisfiedLinkError: Can't load library:  /home/nalgo01/cImpl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-java-lang-unsatisfiedlinkerror-can-t-load-library-home/m-p/4333112#M683678</link>
      <description>Hi Danny,&lt;BR /&gt;&lt;BR /&gt;Have tried setting the SHLIB_PATH to /home/nalgo01 (absolute path) &lt;BR /&gt;&lt;BR /&gt;But no result. Same error is being produced&lt;BR /&gt;&lt;BR /&gt;Any help is appreceated&lt;BR /&gt;&lt;BR /&gt;Thanks in advance&lt;BR /&gt;Gopi</description>
      <pubDate>Wed, 07 Jan 2009 14:28:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-java-lang-unsatisfiedlinkerror-can-t-load-library-home/m-p/4333112#M683678</guid>
      <dc:creator>nallamolu</dc:creator>
      <dc:date>2009-01-07T14:28:46Z</dc:date>
    </item>
    <item>
      <title>Re: error: java.lang.UnsatisfiedLinkError: Can't load library:  /home/nalgo01/cImpl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-java-lang-unsatisfiedlinkerror-can-t-load-library-home/m-p/4333113#M683679</link>
      <description>This looks like a continuation of your other two threads:&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1300275" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1300275&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1299685" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1299685&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;what is the solution for this?  Do I need to set any other options while compiling or linking?&lt;BR /&gt;&lt;BR /&gt;I have no problems compiling, linking and running this test case using cc(1) and java 1.5.  Both in 32 and 64 bit.&lt;BR /&gt;And no problems with gcc 4.2.1.</description>
      <pubDate>Fri, 09 Jan 2009 04:22:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-java-lang-unsatisfiedlinkerror-can-t-load-library-home/m-p/4333113#M683679</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-01-09T04:22:28Z</dc:date>
    </item>
    <item>
      <title>Re: error: java.lang.UnsatisfiedLinkError: Can't load library:  /home/nalgo01/cImpl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-java-lang-unsatisfiedlinkerror-can-t-load-library-home/m-p/4333114#M683680</link>
      <description>Hi Dennis,&lt;BR /&gt;&lt;BR /&gt;I Compiled the above test case using&lt;BR /&gt;&lt;BR /&gt;# cc +z -c -dynamic +DD64 -Ae +u4 -mt \&lt;BR /&gt;  -I&lt;JAVA-DIR&gt;/include \&lt;BR /&gt;  -I&lt;JAVA-DIR&gt;/include/hpux cImpl.c&lt;BR /&gt;&lt;BR /&gt;It compiled properly, and linked using ld&lt;BR /&gt;&lt;BR /&gt;# ld -b +k +s +std -o libcImpl.so cImpl.o \&lt;BR /&gt;  -lstd_v2 -lCsup -lunwind -lm&lt;BR /&gt;&lt;BR /&gt; The test application ran successfully&lt;BR /&gt;&lt;BR /&gt;&amp;gt; I have no problems compiling, linking and running this test case using cc(1) and java 1.5. Both in 32 and 64 bit.&lt;BR /&gt;&lt;BR /&gt;Can u post what are the options u have used for compileing and linking using cc.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; And no problems with gcc 4.2.1.&lt;BR /&gt;&lt;BR /&gt;Can u post the options for compiling and linking using gcc.&lt;BR /&gt;&lt;BR /&gt;Dennis one more info needed.&lt;BR /&gt;&lt;BR /&gt;1.) My c application retreives the system related info such as &lt;BR /&gt;&lt;BR /&gt;     - pid, No of CPU's, Process CPU &lt;BR /&gt;       utilization, Aggregate CPU utilization&lt;BR /&gt;&lt;BR /&gt;  I retreive these info using getrusage system call.&lt;BR /&gt;      &lt;BR /&gt;  Q : i have compiled this appication using &lt;BR /&gt;the the above cc options. it compiled sucessfully. I linked this appication using the same linking options as above.&lt;BR /&gt;&lt;BR /&gt; When i tried to use the executable it is giving the error as&lt;BR /&gt;&lt;BR /&gt;error: java.lang.UnsatisfiedLinkError: Can't load library: /home/nalgo01/libIA64.so&lt;BR /&gt;&lt;BR /&gt;My question is does these system calls have any other dependencies other than what i used while linking ie ( -lstd_v2 -lCsup -lunwind -lm )&lt;BR /&gt;&lt;BR /&gt;What are the libraries which depend on native system calls such as getrusage.&lt;BR /&gt;&lt;BR /&gt;Any help is apreceated&lt;BR /&gt;Thanx in advance&lt;BR /&gt;Gopi&lt;BR /&gt;&lt;/JAVA-DIR&gt;&lt;/JAVA-DIR&gt;</description>
      <pubDate>Mon, 12 Jan 2009 06:23:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-java-lang-unsatisfiedlinkerror-can-t-load-library-home/m-p/4333114#M683680</guid>
      <dc:creator>nallamolu</dc:creator>
      <dc:date>2009-01-12T06:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: error: java.lang.UnsatisfiedLinkError: Can't load library:  /home/nalgo01/cImpl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-java-lang-unsatisfiedlinkerror-can-t-load-library-home/m-p/4333115#M683681</link>
      <description>Hi Dennis,&lt;BR /&gt;&lt;BR /&gt;Can u look into this once.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Gopi</description>
      <pubDate>Mon, 12 Jan 2009 10:24:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-java-lang-unsatisfiedlinkerror-can-t-load-library-home/m-p/4333115#M683681</guid>
      <dc:creator>nallamolu</dc:creator>
      <dc:date>2009-01-12T10:24:32Z</dc:date>
    </item>
    <item>
      <title>Re: error: java.lang.UnsatisfiedLinkError: Can't load library:  /home/nalgo01/cImpl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-java-lang-unsatisfiedlinkerror-can-t-load-library-home/m-p/4333116#M683682</link>
      <description>&amp;gt;I compiled the above test case using&lt;BR /&gt;&amp;gt; cc +z -c -dynamic +DD64 -Ae +u4 -mt \&lt;BR /&gt;-I&lt;JAVA-DIR&gt;/include \&lt;BR /&gt;-I&lt;JAVA-DIR&gt;/include/hpux cImpl.c&lt;BR /&gt;&lt;BR /&gt;I left out -dynamic since it is the default.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;linked using ld&lt;BR /&gt;&amp;gt;ld -b +k +s +std -o libcImpl.so cImpl.o \&lt;BR /&gt;-lstd_v2 -lCsup -lunwind -lm&lt;BR /&gt;&lt;BR /&gt;You must NOT use ld to link aC++ shlibs.  You must use aCC -b.&lt;BR /&gt;&lt;BR /&gt;I just used what was documented: ld -b -o libcImpl.so cImpl.o&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Can you post what are the options you have used for compiling and linking using cc.&lt;BR /&gt;&lt;BR /&gt;What you had before.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Can you post the options for compiling and linking using gcc.&lt;BR /&gt;&lt;BR /&gt;What you had previously.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Q: I linked this application using the same linking options as above.&lt;BR /&gt;&lt;BR /&gt;Use the cut down ld command.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;When i tried to use the executable it is giving the error as&lt;BR /&gt;&amp;gt;error: java.lang.UnsatisfiedLinkError: Can't load library: /home/nalgo01/libIA64.so&lt;BR /&gt;&lt;BR /&gt;This java error is garbage, it doesn't tell you anything.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;does these system calls have any other dependencies other than what i used while linking ie (-lstd_v2 -lCsup -lunwind -lm)&lt;BR /&gt;&lt;BR /&gt;Do not use these aC++ shlibs.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;What are the libraries which depend on native system calls such as getrusage.&lt;BR /&gt;&lt;BR /&gt;They are all in libc.&lt;/JAVA-DIR&gt;&lt;/JAVA-DIR&gt;</description>
      <pubDate>Mon, 12 Jan 2009 10:29:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-java-lang-unsatisfiedlinkerror-can-t-load-library-home/m-p/4333116#M683682</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-01-12T10:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: error: java.lang.UnsatisfiedLinkError: Can't load library:  /home/nalgo01/cImpl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-java-lang-unsatisfiedlinkerror-can-t-load-library-home/m-p/4333117#M683683</link>
      <description>You do know that if you compile with +DD64, you need to run java with -d64.</description>
      <pubDate>Mon, 12 Jan 2009 10:31:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-java-lang-unsatisfiedlinkerror-can-t-load-library-home/m-p/4333117#M683683</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-01-12T10:31:30Z</dc:date>
    </item>
    <item>
      <title>Re: error: java.lang.UnsatisfiedLinkError: Can't load library:  /home/nalgo01/cImpl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-java-lang-unsatisfiedlinkerror-can-t-load-library-home/m-p/4333118#M683684</link>
      <description>Hi Dennis,&lt;BR /&gt;&lt;BR /&gt;thanx a lot for u reply :-)&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; &amp;gt;What are the libraries which depend on native system calls such as getrusage.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;They are all in libc.&lt;BR /&gt;&lt;BR /&gt;i have tried that native appication ie which retrives pid, No of CPU's, so on...&lt;BR /&gt;&lt;BR /&gt;I compiled &amp;amp; linked as u have have mentioned.&lt;BR /&gt;&lt;BR /&gt;Linking options :&lt;BR /&gt;&lt;BR /&gt;ld -b -o libIntroscopeHpuxItanium64Stats.so java_interface.o -lc (as u have mentioned all system call libraries are stored in libc )&lt;BR /&gt;&lt;BR /&gt;It got linked properly.&lt;BR /&gt;&lt;BR /&gt;I used this executable in my appication but got an error :&lt;BR /&gt;&lt;BR /&gt;#&lt;BR /&gt;# An unexpected error has been detected by HotSpot Virtual Machine:&lt;BR /&gt;#&lt;BR /&gt;#  SIGSEGV (11) at pc=c00000000774e1c1, pid=20716, tid=19&lt;BR /&gt;#&lt;BR /&gt;# Java VM: Java HotSpot(TM) 64-Bit Server VM (1.5.0.11 jinteg:11.07.07-18:21 IA64W mixed mode)&lt;BR /&gt;# Problematic frame:&lt;BR /&gt;# C  [libIntroscopeHpuxItanium64Stats.so+0x21c1]  Java_com_wily_introscope_agent_platform_hpux_HPUXPlatformStatisticsBackEnd_getCPUIndexMap+0x191&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;detailed log is atached for clear understanding.&lt;BR /&gt;&lt;BR /&gt;Thanks in Advance Dennis,&lt;BR /&gt;Gopi</description>
      <pubDate>Mon, 12 Jan 2009 12:53:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-java-lang-unsatisfiedlinkerror-can-t-load-library-home/m-p/4333118#M683684</guid>
      <dc:creator>nallamolu</dc:creator>
      <dc:date>2009-01-12T12:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: error: java.lang.UnsatisfiedLinkError: Can't load library:  /home/nalgo01/cImpl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-java-lang-unsatisfiedlinkerror-can-t-load-library-home/m-p/4333119#M683685</link>
      <description>&amp;gt;ld -b -o libIntroscopeHpuxItanium64Stats.so java_interface.o -lc (as you have mentioned all system call libraries are stored in libc)&lt;BR /&gt;&lt;BR /&gt;You shouldn't need to add -lc here.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;I used this executable in my application but got an error:&lt;BR /&gt;# Problematic frame: C&lt;BR /&gt;[libIntroscopeHpuxItanium64Stats.so+0x21c1] Java_com_wily_introscope_agent_platform_hpux_HPUXPlatformStatisticsBackEnd_g&lt;BR /&gt;etCPUIndexMap+0x191&lt;BR /&gt;&lt;BR /&gt;Notice how java cleverly blames your JNI function.  :-)&lt;BR /&gt;&lt;BR /&gt;You need to debug your code.  Compile with -g and you can use gdb to print out variables.</description>
      <pubDate>Mon, 12 Jan 2009 23:47:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-java-lang-unsatisfiedlinkerror-can-t-load-library-home/m-p/4333119#M683685</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-01-12T23:47:31Z</dc:date>
    </item>
    <item>
      <title>Re: error: java.lang.UnsatisfiedLinkError: Can't load library:  /home/nalgo01/cImpl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-java-lang-unsatisfiedlinkerror-can-t-load-library-home/m-p/4333120#M683686</link>
      <description>Hi Dennis,&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Notice how java cleverly blames your JNI function.&lt;BR /&gt;&lt;BR /&gt; As u said to first check the JNI function, I tried doing that.&lt;BR /&gt;&lt;BR /&gt; I just tried to work on each JNI fuction &amp;amp; calling them using the above java code makking nessasary changes. &lt;BR /&gt;&lt;BR /&gt;Out of the 11 JNI functions 3 are problematic..&lt;BR /&gt;I ran all the jni functions individually.&lt;BR /&gt;&lt;BR /&gt;This is the jni function which is causing the problem..&lt;BR /&gt;&lt;BR /&gt;JNIEXPORT jintArray JNICALL &lt;BR /&gt;Java_HPUXPlatformStatistics_getCPUIndexMap(JNIEnv *env, jobject obj)&lt;BR /&gt;&lt;BR /&gt;{&lt;BR /&gt; int count = 0,numOfProc = 0, *arrIndex = NULL,rc = 0;&lt;BR /&gt; struct pst_dynamic pstat_dyn;&lt;BR /&gt; rc=pstat_getdynamic(&amp;amp;pstat_dyn, sizeof(struct pst_dynamic),&lt;BR /&gt;                        1,0);&lt;BR /&gt; if ( rc == -1 ){&lt;BR /&gt;  JNU_ThrowByName(env,"java/langUnsatisfiedLinkError",0);&lt;BR /&gt;  return (jstring)NULL;&lt;BR /&gt; }&lt;BR /&gt; numOfProc = pstat_dyn.psd_proc_cnt;&lt;BR /&gt; arrIndex= (int*)malloc(sizeof(int)*numOfProc);&lt;BR /&gt; for(count=0;count&lt;NUMOFPROC&gt;&lt;/NUMOFPROC&gt; arrIndex[count]=count;&lt;BR /&gt;&lt;BR /&gt; jintArray iarr = (*env)-&amp;gt;NewIntArray(env, numOfProc);&lt;BR /&gt; if((*env)-&amp;gt;ExceptionOccurred(env) != NULL) {&lt;BR /&gt;  free(arrIndex);&lt;BR /&gt;  return (jintArray)NULL;&lt;BR /&gt; }&lt;BR /&gt; (*env)-&amp;gt;SetIntArrayRegion(env, iarr, 0, numOfProc, arrIndex);&lt;BR /&gt; if((*env)-&amp;gt;ExceptionOccurred(env) != NULL) {&lt;BR /&gt;  free(arrIndex);&lt;BR /&gt;  return (jintArray)NULL;&lt;BR /&gt; }&lt;BR /&gt; free(arrIndex);&lt;BR /&gt; return iarr;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;ERROR MESSAGE :&lt;BR /&gt;&lt;BR /&gt;(0) 0xc0000000091d6b00  VMError::report_and_die{_ZN7VMError14report_and_dieEv} + 0x110 [/opt/java6/jre/lib/IA64W/server/libjvm.so]&lt;BR /&gt;(1) 0xc0000000097d2150  os::Hpux::JVM_handle_hpux_signal{_ZN2os4Hpux22JVM_handle_hpux_signalEiP9__siginfoPvi} + 0x6d0 at /CLO/Components/JAVA_HOTSPOT/Src/src/os_cpu/hp-ux_ia64/vm/os_hp-ux_ia64.cpp:1359 [/opt/java6/jre/lib/IA64W/server/libjvm.so]&lt;BR /&gt;(2) 0xc0000000097d1a40  os::Hpux::signalHandler{_ZN2os4Hpux13signalHandlerEiP9__siginfoPv} + 0x80 at /CLO/Components/JAVA_HOTSPOT/Src/src/os/hp-ux/vm/os_hp-ux.cpp:5733 [/opt/java6/jre/lib/IA64W/server/libjvm.so]&lt;BR /&gt;(3) 0xe0000001120028e0  ---- Signal 11 (SIGSEGV) delivered ----&lt;BR /&gt;(4) 0xc0000000083e5d71  Java_TestJava2CallingNative_getCPUIndexMap + 0x191 at cImpl.c:63 [/home/nalgo01/Test/libcImpl.so]&lt;BR /&gt;(5) 0x9fffffffeb400e70&lt;BR /&gt;*** Internal error (-3) while unwinding stack [/CLO/Components/JAVA_HOTSPOT/Src/src/os_cpu/hp-ux_ia64/vm/thread_hp-ux_ia64.cpp:142] ***&lt;BR /&gt;#&lt;BR /&gt;# An unexpected error has been detected by Java Runtime Environment:&lt;BR /&gt;#&lt;BR /&gt;#  SIGSEGV (11) at pc=c0000000083e5d71, pid=15643, tid=1&lt;BR /&gt;#&lt;BR /&gt;# Java VM: Java HotSpot(TM) 64-Bit Server VM (1.6.0.02 jinteg:09.27.08-08:51 IA64W mixed mode)&lt;BR /&gt;# Problematic frame:&lt;BR /&gt;# C  [libcImpl.so+0xd71]&lt;BR /&gt;[error occurred during error reporting, step 60, id 0xb]&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Unable to understand this message...&lt;BR /&gt;&lt;BR /&gt;I am attaching the java code &amp;amp; the JNI function..&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;This is a showstopper issue for me....&lt;BR /&gt;&lt;BR /&gt;Hope to find help from u..&lt;BR /&gt;&lt;BR /&gt;Thanks in advance,&lt;BR /&gt;Gopi&lt;BR /&gt;</description>
      <pubDate>Tue, 13 Jan 2009 12:46:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-java-lang-unsatisfiedlinkerror-can-t-load-library-home/m-p/4333120#M683686</guid>
      <dc:creator>nallamolu</dc:creator>
      <dc:date>2009-01-13T12:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: error: java.lang.UnsatisfiedLinkError: Can't load library:  /home/nalgo01/cImpl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-java-lang-unsatisfiedlinkerror-can-t-load-library-home/m-p/4333121#M683687</link>
      <description>&amp;gt;Unable to understand this message.&lt;BR /&gt;&lt;BR /&gt;It says you got a signal 11 in frame 4:&lt;BR /&gt;(4) 0xc0000000083e5d71 Java_TestJava2CallingNative_getCPUIndexMap + 0x191 at cImpl.c:63 [/home/nalgo01/Test/libcImpl.so]&lt;BR /&gt;&lt;BR /&gt;If you have debug info, you can print the variables.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;I am attaching the java code &amp;amp; the JNI function.&lt;BR /&gt;&lt;BR /&gt;Your code is illegal and will NOT compile in 64 bit mode:&lt;BR /&gt;"cImpl.c", line 61: error #4313-D: no prototype or definition in scope for call to memory allocation routine "malloc"&lt;BR /&gt;        arrIndex= (int*)malloc(sizeof(int)*numOfProc);&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 14 Jan 2009 00:05:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-java-lang-unsatisfiedlinkerror-can-t-load-library-home/m-p/4333121#M683687</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-01-14T00:05:24Z</dc:date>
    </item>
    <item>
      <title>Re: error: java.lang.UnsatisfiedLinkError: Can't load library:  /home/nalgo01/cImpl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-java-lang-unsatisfiedlinkerror-can-t-load-library-home/m-p/4333122#M683688</link>
      <description>Hi Dennis,&lt;BR /&gt;&lt;BR /&gt;Thanx for letting some time for me. The information which u provide was a knowlegable one.&lt;BR /&gt;&lt;BR /&gt;Have some more queries. Hope u answer these queries also.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Your code is illegal and will NOT compile in 64 bit mode:&lt;BR /&gt;"cImpl.c", line 61: error #4313-D: no prototype or definition in scope for call to memory allocation routine "malloc"&lt;BR /&gt;arrIndex= (int*)malloc(sizeof(int)*numOfProc); &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;1.)What are the nessasary changes i need to make for it to compile in 64 bit mode.( if possible do send me the modified c file )&lt;BR /&gt;&lt;BR /&gt;2.) what is the alternate solution for &lt;BR /&gt;    arrIndex= (int*)malloc(sizeof(int)*numOfProc); &lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;Hope to find help for u.&lt;BR /&gt;&lt;BR /&gt;Thanks in Advance.&lt;BR /&gt;Gopi&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 14 Jan 2009 04:25:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-java-lang-unsatisfiedlinkerror-can-t-load-library-home/m-p/4333122#M683688</guid>
      <dc:creator>nallamolu</dc:creator>
      <dc:date>2009-01-14T04:25:01Z</dc:date>
    </item>
    <item>
      <title>Re: error: java.lang.UnsatisfiedLinkError: Can't load library:  /home/nalgo01/cImpl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-java-lang-unsatisfiedlinkerror-can-t-load-library-home/m-p/4333123#M683689</link>
      <description>&amp;gt;&amp;gt;error #4313-D: no prototype or definition in scope for call to memory allocation routine "malloc"&lt;BR /&gt;&lt;BR /&gt;&amp;gt;1) What are the necessary changes I need to make for it to compile in 64 bit mode.&lt;BR /&gt;&lt;BR /&gt;As Don and the error message say, you need to include the appropriate header, &lt;STDLIB.H&gt;.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;2) what is the alternate solution for&lt;BR /&gt;&lt;BR /&gt;That malloc statement is fine, you need that prototype.&lt;/STDLIB.H&gt;</description>
      <pubDate>Wed, 14 Jan 2009 06:35:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-java-lang-unsatisfiedlinkerror-can-t-load-library-home/m-p/4333123#M683689</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-01-14T06:35:15Z</dc:date>
    </item>
    <item>
      <title>Re: error: java.lang.UnsatisfiedLinkError: Can't load library:  /home/nalgo01/cImpl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-java-lang-unsatisfiedlinkerror-can-t-load-library-home/m-p/4333124#M683690</link>
      <description>Hi Dennis,&lt;BR /&gt;&lt;BR /&gt;Thanks a lot for u r reply.&lt;BR /&gt;&lt;BR /&gt;Making the nessasary changes, I compiled &amp;amp; linked the code. It worked fine.&lt;BR /&gt;&lt;BR /&gt;The same i did for my project. But it is not working for that code. ( All Paths Lead To Rome :::: Similarly all changes lead to the same error : java.lang.UnsatisfiedLinkError: Can't load library:/home/nalgo01/Probeing/libHPUXItanium64Stats.so )&lt;BR /&gt;&lt;BR /&gt;This c file is for getting system related info ( i use getrusage() system call )&lt;BR /&gt;&lt;BR /&gt;Compiling options:&lt;BR /&gt;&lt;BR /&gt;cc +z -c +DD64 -Ae +u4 -mt -I/opt/java6/include -I/opt/java6/include/hp-ux java_interface.c&lt;BR /&gt;&lt;BR /&gt;Compiled sucessfully&lt;BR /&gt;&lt;BR /&gt;Linking Options:&lt;BR /&gt;&lt;BR /&gt;ld -b -o libHPUXItanium64Stats.so &lt;LOCATION_HOME&gt;/java_interface.o&lt;BR /&gt;&lt;BR /&gt;setted the following paths:&lt;BR /&gt;&lt;BR /&gt;export LPATH=/usr/lib/hpux64/dld.so&lt;BR /&gt;&lt;BR /&gt;export SHLIB_PATH=/usr/lib/hpux64:/home/nalgo01/Probeing&lt;BR /&gt;&lt;BR /&gt;export LD_LIBRARY_PATH=/usr/lib/hpux64&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Can u plz look into this once.&lt;BR /&gt;&lt;BR /&gt;I request u r help on this&lt;BR /&gt;&lt;BR /&gt;Thanks in advance,&lt;BR /&gt;Gopi&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/LOCATION_HOME&gt;</description>
      <pubDate>Wed, 14 Jan 2009 07:06:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-java-lang-unsatisfiedlinkerror-can-t-load-library-home/m-p/4333124#M683690</guid>
      <dc:creator>nallamolu</dc:creator>
      <dc:date>2009-01-14T07:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: error: java.lang.UnsatisfiedLinkError: Can't load library:  /home/nalgo01/cImpl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-java-lang-unsatisfiedlinkerror-can-t-load-library-home/m-p/4333125#M683691</link>
      <description>&amp;gt;Similarly all changes lead to the same error: java.lang.UnsatisfiedLinkError: Can't load library:/home/nalgo01/Probeing/libHPUXItanium64Stats.so) &lt;BR /&gt;&lt;BR /&gt;Again a useless message with no details, errno.&lt;BR /&gt;I assume you are passing -d64 to java.  You have exported CLASSPATH?  And libHPUXItanium64Stats.so is executable?&lt;BR /&gt;&lt;BR /&gt;You are going to have to use a debugger to get the real error info.  Possibly by using "catch load" and set a breakpoint in dlopen.&lt;BR /&gt;&lt;BR /&gt;Also in your test .c you did this: JNU_ThrowByName(env,"java/lang/UnsatisfiedLinkError",0);&lt;BR /&gt;&lt;BR /&gt;How do you know what is producing that error?  It is better if you invent a completely new message so there can't be any confusion.</description>
      <pubDate>Wed, 14 Jan 2009 07:41:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-java-lang-unsatisfiedlinkerror-can-t-load-library-home/m-p/4333125#M683691</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-01-14T07:41:25Z</dc:date>
    </item>
    <item>
      <title>Re: error: java.lang.UnsatisfiedLinkError: Can't load library:  /home/nalgo01/cImpl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-java-lang-unsatisfiedlinkerror-can-t-load-library-home/m-p/4333126#M683692</link>
      <description>Hi Dennis,&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Again a useless message with no details, errno&lt;BR /&gt;&lt;BR /&gt;java.lang.UnsatisfiedLinkError: Can't load library: /home/nalgo01/Probeing/libIntroscopeHpuxItanium64Stats.so&lt;BR /&gt;        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1650)&lt;BR /&gt;        at java.lang.Runtime.load0(Runtime.java:770)&lt;BR /&gt;        at java.lang.System.load(System.java:1005)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt; I assume you are passing -d64 to java. &lt;BR /&gt;&lt;BR /&gt;  Yes i am using 64 bit jvm (-d64)&lt;BR /&gt;&lt;BR /&gt;&amp;gt; You have exported CLASSPATH? &lt;BR /&gt; &lt;BR /&gt;  No i have set the classpath. if i have to set to which env variable i need to set&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Possibly by using "catch load" and set a breakpoint in dlopen. &lt;BR /&gt;&lt;BR /&gt; who to use "catch load" &amp;amp; dlopen&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Also in your test .c you did this: JNU_ThrowByName(env,"java/lang/UnsatisfiedLinkError",0);&lt;BR /&gt;&lt;BR /&gt;Yes it did in test.c also&lt;BR /&gt;&lt;BR /&gt;Thanks in advance,&lt;BR /&gt;Gopi</description>
      <pubDate>Wed, 14 Jan 2009 08:09:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-java-lang-unsatisfiedlinkerror-can-t-load-library-home/m-p/4333126#M683692</guid>
      <dc:creator>nallamolu</dc:creator>
      <dc:date>2009-01-14T08:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: error: java.lang.UnsatisfiedLinkError: Can't load library:  /home/nalgo01/cImpl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-java-lang-unsatisfiedlinkerror-can-t-load-library-home/m-p/4333127#M683693</link>
      <description>&amp;gt;java.lang.UnsatisfiedLinkError: Can't load library:&lt;BR /&gt;&lt;BR /&gt;I mean the message doesn't say why it can't load.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;if I have to set to which env variable I need to set&lt;BR /&gt;&lt;BR /&gt;I guess you don't have that problem because java would say it couldn't find the java class.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;who to use "catch load" &amp;amp; dlopen &lt;BR /&gt;&lt;BR /&gt;You need to use these commands in gdb when debugging.  See your other thread:&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1304147" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1304147&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;JNU_ThrowByName(env,"java/lang/UnsatisfiedLinkError",0);&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Yes it did in test.c also &lt;BR /&gt;&lt;BR /&gt;Don't use that string.  Make up something completely different so you know that you have a different error in your JNI.&lt;BR /&gt;&lt;BR /&gt;Is there any way you can attach something small that fails?</description>
      <pubDate>Wed, 14 Jan 2009 08:23:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-java-lang-unsatisfiedlinkerror-can-t-load-library-home/m-p/4333127#M683693</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-01-14T08:23:35Z</dc:date>
    </item>
    <item>
      <title>Re: error: java.lang.UnsatisfiedLinkError: Can't load library:  /home/nalgo01/cImpl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-java-lang-unsatisfiedlinkerror-can-t-load-library-home/m-p/4333128#M683694</link>
      <description>Hi Dennis,&lt;BR /&gt;&lt;BR /&gt;Plz do have a look at the below link&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=109447626+1231904747519+28353475&amp;amp;threadId=1302344" target="_blank"&gt;http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=109447626+1231904747519+28353475&amp;amp;threadId=1302344&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The problem is with System.load( ).&lt;BR /&gt;&lt;BR /&gt;It is being loaded for the test application and for the main appication it is not being loaded. &lt;BR /&gt;&lt;BR /&gt;What may be the problem.?&lt;BR /&gt;&lt;BR /&gt;Thanking you,&lt;BR /&gt;Gopi</description>
      <pubDate>Wed, 14 Jan 2009 11:48:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-java-lang-unsatisfiedlinkerror-can-t-load-library-home/m-p/4333128#M683694</guid>
      <dc:creator>nallamolu</dc:creator>
      <dc:date>2009-01-14T11:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: error: java.lang.UnsatisfiedLinkError: Can't load library:  /home/nalgo01/cImpl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-java-lang-unsatisfiedlinkerror-can-t-load-library-home/m-p/4333129#M683695</link>
      <description>&amp;gt;Plz do have a look at the below link&lt;BR /&gt;&lt;BR /&gt;I assume you mean:&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1304461" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1304461&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;The problem is with System.load().&lt;BR /&gt;&lt;BR /&gt;Unless I can get my hands on something or you can duplicate it with C/C++ or at the assembly level, I can't help much.  The java messages are next to useless, if you have already know your problems are due to zebras.  :-)&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt;JNU_ThrowByName(env,"java/lang/UnsatisfiedLinkError",0); &lt;BR /&gt;&lt;BR /&gt;If you don't want to change these, please add a "fprintf(stderr," before each one that prints out useful diagnostics.</description>
      <pubDate>Thu, 15 Jan 2009 05:13:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-java-lang-unsatisfiedlinkerror-can-t-load-library-home/m-p/4333129#M683695</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-01-15T05:13:53Z</dc:date>
    </item>
  </channel>
</rss>

