Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2012
    Posts
    1,035
    Provided Answers: 18

    Unanswered: ASNCLP and libdb2jcmn.a on AIX v9.5.6a

    Running DB2 v9.5 fixpack 6a on AIX 6.1 (Cannot change the DB2 version yet- scheduled for upgrade later this year).

    Error message from asnclp is:
    ( 0509-022 Cannot load module /home/myinst/sqllib/lib64/libdb2jcmn.a.
    0509-026 System error: Cannot run a file that does not have a valid format.)



    SQL-replication is already configured and operational but I need to use asnclp to manage
    an offline line for a subscription set. Getting invalid format on libdb2jcmn.a


    Using asnclp locally to the DB2 server,
    running using the db2-instance-owner account for this 64-bit instance:

    Repl> set server all to db mydb;

    Repl > offline load before setname myset_one applyqual myqual_one ;

    ====
    CMD: offline load before setname myset_one applyqual myqual_one;
    ====

    Exception in thread "main" java.lang.UnsatisfiedLinkError: db2jcmn ( 0509-022 Cannot load module /home/myinst/sqllib/lib64/libdb2jcmn.a.
    0509-026 System error: Cannot run a file that does not have a valid format.)
    ...


    the file exists (/home/myinst/sqllib/lib64/libdb2jcmn.a).

    The LIBPATH setting seems correct:
    /usr/lib:/lib:/home/myinst/sqllib/lib64

    The CLASSPATH seems correct:
    /home/myinst/sqllib/java/db2java.zip:/home/myinst/sqllib/java/db2jcc.jar:/home/myinst/sqllib/java/sqlj.zip:/home/myinst/sqllib/function:/home/myinst/sqllib/java/db2jcc_license_cu.jar:.


    The db2_install method installed the DB2 V9.5 FP6A ESE server.

    I saw an old document relevant for Linux x64 (did not mention AIX) stating that the asnclp
    needed a 32-bit instance. But is this true for AIX 6.1 and DB2 v9.5?

    the V9.5 infocenter page mentions the need for a JDK (but there is no jdk subdirectory in the /opt/IBM/db2/V9.5 tree, so I
    assume that the docs mean a JRE - which is present).


    java -version
    java version "1.5.0"
    Java(TM) 2 Runtime Environment, Standard Edition (build pap32devifx-20131023 (SR16 FP4 ))
    IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 AIX ppc-32 j9vmap3223ifx-20131007 (JIT enabled)
    J9VM - 20131005_169275_bHdSMr
    JIT - 20130920_46470_r8
    GC - 20120911_AA)
    JCL - 20131023

  2. #2
    Join Date
    Jul 2013
    Location
    Moscow, Russia
    Posts
    666
    Provided Answers: 55
    Quote Originally Posted by db2mor View Post
    Error message from asnclp is:
    ( 0509-022 Cannot load module /home/myinst/sqllib/lib64/libdb2jcmn.a.
    0509-026 System error: Cannot run a file that does not have a valid format.)
    ...
    java -version
    java version "1.5.0"
    Java(TM) 2 Runtime Environment, Standard Edition (build pap32devifx-20131023 (SR16 FP4 ))
    IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 AIX ppc-32 j9vmap3223ifx-20131007 (JIT enabled)
    J9VM - 20131005_169275_bHdSMr
    JIT - 20130920_46470_r8
    GC - 20120911_AA)
    JCL - 20131023
    Hi,

    It seems that you use a 32-bit java. 32-bit java can't load a 64-bit library.
    You have to use a 64-bit java.
    So you have to install a 64-bit jdk/jre if you haven't done it yet and correct your PATH env variable to point namely to a 64-bit java.
    Regards,
    Mark.

  3. #3
    Join Date
    Apr 2012
    Posts
    1,035
    Provided Answers: 18
    Thanks. That was it, although I had found a workaround of using a remote 64-bit client and configuring it appropriately and running asnclp from there.

    With your observation I was able to set the PATH, LIBPATH, CLASSPATH to the pre-existing 64-bit JRE installed with the DB2 on the server, so that the db2-supplied JRE was first on these paths, and then the asnclp seemed to work OK.

    Puzzled why the instance profile would not do this automatically however (i.e. promote its own jre to start of Path, Classpath, Libpath...) particularly when it can determine that the system JRE bitness mismatch exists...


    Anyway, problem solved thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •