Operating System - Linux
1754014 Members
7312 Online
108811 Solutions
New Discussion юеВ

Java JNI error on IA64 box [URGENT]

 
Giridhar Shankar
Occasional Contributor

Java JNI error on IA64 box [URGENT]

Hello,

We are working on a HP Itanium box with JDK 1.4.2, aCC (A.05) and attempting to use JNI to invoke some C++ functions thru a Java client and we have run into issues.

We have a C++ library (in the form of .a files). For the sake of JNI, we recompiled the C++ code with +z option (PIC option) and we built a .sl file with -b option using aCC. We have followed all the steps as per JNI implementation guide (http://www.hp.com/products1/unix/java/infolibrary/prog_guide/JNI_java2.html).

We get the error below when we run Java program. Could anybody pls help?

Also, after creating the .sl file, we verified if there is any dynamic link missing thru ldd and there is no issue there. However, I observed that when I do nm <.sl> file, there are a few UNDEF functions like malloc, printf, etc.

Is it necessary for an .sl file to have no UNDEF symbols in the .sl file to be loaded into the JVM thru System.loadLibrary()? Can somebody pls pls help?

[Raja@ion2.digitalindiasw.net] /opt/java1.4/bin/java RateCDR Loading libraries...
Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/raja/Rating/Ram
/libRateCDR.sl: some symbol required by the shared library could not be found.
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1489)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1368)
at java.lang.Runtime.load0(Runtime.java:737)
at java.lang.System.load(System.java:809)
at RateCDR.(RateCDR.java:12)

Thanks,
Giri
2 REPLIES 2
Peter Godron
Honored Contributor

Re: Java JNI error on IA64 box [URGENT]

Giri,
not 100% sure this is relevant, but:
http://doc.cesga.es/superdome/Libraries/B2355-90730.html
gives some simple sripts that may help with tracking down the problem.
Arunvijai_4
Honored Contributor

Re: Java JNI error on IA64 box [URGENT]

Hi Giri,

IA64 uses shared libraries with extension of .so not .sl which is used by PA (11.11).

You can also try asking this question at,

http://h21007.www2.hp.com/dspp/ml/ml_MailingLists_IDX/1,1275,,00.html#25

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"