JNI program work with jdk 5 but not jdk6 on aix 5.3

T

TsanChung

My JNI program work with jdk 5 but not jdk6 on aix 5.3.
i.e. I compiled & tested my program with jdk 5 and it worked.
Then with the same files & directory, I run jdk6 (I installed both
jdk5 & 6) and it failed.
Why?
jdk5 is ok:
$ /usr/java5_64/jre/bin/java -d64 -jar jMultidevice.jar

jdk6 fails:
$ /usr/java6_64/jre/bin/java -d64 -jar jMultidevice.jar
SSL Connect is failing
Exception in thread "main" com.mycomp.crypto.HwCryptokiException:
function 'C_Initialize' returns 0x30
at
com.mycomp.crypto.HwCryptokiException.ThrowNew(HwCryptokiException.java:
57)
at com.mycomp.crypto.HwAPI.Initialize(Native Method)
at
com.mycomp.crypto.HwTokenManager.<init>(HwTokenManager.java:
107)
at
com.mycomp.crypto.HwTokenManager.getInstance(HwTokenManager.java:62)
at jMultidevice.jMultidevice.<init>(jMultidevice.java:32)
at jMultidevice.jMultidevice.main(jMultidevice.java:805)

$ /usr/java5_64/jre/bin/java -d64 -version
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build
pap64dev-20051104)
IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 AIX ppc64-64
j9vmap6423-20051103 (JIT enabled)
J9VM - 20051027_03723_BHdSMr
JIT - 20051027_1437_r8
GC - 20051020_AA)
JCL - 20051102

$ /usr/java6_64/jre/bin/java -d64 -version
java version "1.6.0"
Java(TM) SE Runtime Environment (build pap6460-20071123_01)
IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 AIX ppc64-64
jvmap6460-20071121_15015 (JIT enabled)
J9VM - 20071121_015015_BHdSMr
JIT - r9_20071121_1330
GC - 20071031_AA)
JCL - 20071118_01
 
R

Roedy Green

Exception in thread "main" com.mycomp.crypto.HwCryptokiException:
function 'C_Initialize' returns 0x30

Java is not that good about reporting problems that occur at
initialise time. Try moving your initialisation code to a separate
init method. That may make it easier to debug.
 
T

TsanChung

Java is not that good about reporting problems that occur at
initialise time. Try moving your initialisation code to a  separate
init method.  That may make it easier to debug.

The problem is that SSL_connect return SSL_ERROR_SYSCALL for jdk 6 on
aix 5.3, but jdk 5 is ok.
Why?
 
T

TsanChung

Java is not that good about reporting problems that occur at
initialise time. Try moving your initialisation code to a  separate
init method.  That may make it easier to debug.

The problem is that SSL_connect return SSL_ERROR_SYSCALL for jdk 6 on
aix 5.3, but jdk 5 is ok.
Why?
 
T

TsanChung

The problem is that SSL_connect return SSL_ERROR_SYSCALL for jdk 6 on
aix 5.3, but jdk 5 is ok.
Why?

Using wireshark, I saw
SSL CLient Hello messaging.
SSL Server Hello messaging.
Then the java 6 client sent out FIN, ACK packets.
No SSL Certificate is sent.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top