AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
 View Only

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

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

    Posted Sun September 21, 2008 08:33 PM

    Originally posted by: SystemAdmin


    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?
    Please help to fix this problem.
    Thanks.
    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
    #AIX-Forum