Operating System - HP-UX
1753943 Members
9075 Online
108811 Solutions
New Discussion юеВ

Unsatified link error with Java 1.6 on IA64/11.31 -

 
Christian H.
Occasional Advisor

Unsatified link error with Java 1.6 on IA64/11.31 -

Hello,
we are trying to run an SAP JCO Java client to connect to a SAP Application server. For this a JCO native library is needed. The JCO connect application is running on an HPUX IA64 - 11.31 IA64.
I'm using Java1.6.0.01-jinteg.

I have tried to set the LD_LIBRARY_PATH and SHLIB_PATH to the sap jco native libraries but nothing helps. I always get the exception:

java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030)
...


The enviroment is set in this way:
=========================
LD_LIBRARY_PATH=/opt/java6/bin:/opt/java6/lib:/sapmnt/PT1/knapp/bin/../lib/sap_jco/hpuxIA64:/usr/lib:/usr/lib/hpux64:/opt/langtools/lib/hpux64:/opt/java6/jre/lib/IA64N/hotspot:/usr/lib/hpux64
=========================
SHLIB_PATH=/opt/java6/bin:/opt/java6/lib:/sapmnt/PT1/knapp/bin/../lib/sap_jco/hpuxIA64:/usr/lib:/usr/lib/hpux64:/opt/langtools/lib/hpux64:/opt/java6/jre/lib/IA64N/hotspot:/usr/lib/hpux64

I have tried 'chatr +s enable /sapmnt/PT1/knapp/lib/sap_jco/hpuxIA64/libsapjco3.so' with this result:
//sapmnt/PT1/knapp/lib/sap_jco/hpuxIA64/libsapjco3.so:
current values:
64-bit ELF shared library
shared library dynamic path search:
LD_LIBRARY_PATH enabled first
SHLIB_PATH enabled second
embedded path enabled third /usr/lib/hpux64:/opt/langtools/lib/hpux64
shared library list:
libnsl.so.1
libpthread.so.1
libc.so.1
libCsup.so.1
libcl.so.1
shared library mapped private disabled
shared vtable support disabled
explicit unloading enabled
linkage table protection disabled
segments:
index type address flags size
7 text 4000000000000000 z---c- D (default)
8 data 6000000000000000 ---m-- D (default)
kernel assisted branch prediction enabled
lazy swap allocation for dynamic segments disabled
nulptr dereferences trap enabled
address space model: default
caliper dynamic instrumentation disabled
new values:
64-bit ELF shared library
shared library dynamic path search:
LD_LIBRARY_PATH enabled first
SHLIB_PATH enabled second
embedded path enabled third /usr/lib/hpux64:/opt/langtools/lib/hpux64
shared library list:
libnsl.so.1
libpthread.so.1
libc.so.1
libCsup.so.1
libcl.so.1
shared library mapped private disabled
shared vtable support disabled
explicit unloading enabled
linkage table protection disabled
segments:
index type address flags size
7 text 4000000000000000 z---c- D (default)
8 data 6000000000000000 ---m-- D (default)
kernel assisted branch prediction enabled
lazy swap allocation for dynamic segments disabled
nulptr dereferences trap enabled
address space model: default
caliper dynamic instrumentation disabled

But this didn't solved the problem.
Some ideas what to setup?
Christian
10 REPLIES 10
Dennis Handly
Acclaimed Contributor

Re: Unsatified link error with Java 1.6 on IA64/11.31 -

Are you invoking java with -d64?
Christian H.
Occasional Advisor

Re: Unsatified link error with Java 1.6 on IA64/11.31 -

Yes!

Re: Unsatified link error with Java 1.6 on IA64/11.31 -

Christian,

I know almost zip about java, but given that it seems to be failing in the class loader, doesn't that imply that it will be looking for sapjco3 in the CLASSPATH, not the library path?

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Christian H.
Occasional Advisor

Re: Unsatified link error with Java 1.6 on IA64/11.31 -

I have checked this.
The sapjco3.jar is in classpath.

By the way.
Sorry for the duplicate thread. But on the "languages and scripting" forum i got only one reply.

Thanks
Christian
Dennis Handly
Acclaimed Contributor

Re: Unsatified link error with Java 1.6 on IA64/11.31 -

>The sapjco3.jar is in CLASSPATH.

What about libsapjco3.so?
If you have a java question it seems you'll need to talk to the Response Center.
Dennis Handly
Acclaimed Contributor

Re: Unsatified link error with Java 1.6 on IA64/11.31 -

You may want to use "tusc -fp java ..." to see what files get opened and paths used.
Christian H.
Occasional Advisor

Re: Unsatified link error with Java 1.6 on IA64/11.31 -

Ok, i have added the libsapjco3.so to the classpath, too.
But still the same error "java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path"

Christian

Christian H.
Occasional Advisor

Re: Unsatified link error with Java 1.6 on IA64/11.31 -

>You may want to use "tusc -fp java ..." to >see what files get opened and paths used.

I will talk the responsible sys admin to install "tusc".
Thanks
Christian
Christian H.
Occasional Advisor

Re: Unsatified link error with Java 1.6 on IA64/11.31 -

Hello,

after studying a lot of documentation it works fine.
The first error was invoking the jvm with -D64, but it must in lower case -d64.
The second error are, the position of the argument of java must be this switch. If it is not the first argument it will not work in 64 Bit mode.

Thanks
Christian