db2 java application of 32-bit and 64-bit DB2 insatnce

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • zgh1970

    db2 java application of 32-bit and 64-bit DB2 insatnce

    I did a test on running db2 database java code on 32-bit and 64-bit
    db2 instance.
    It seams that java application with 32-bit JVM couldn't run at 64-bit
    db2 instance.
    Also 64-bit JVM couldn't run at 32-bit db2 instance.
    I will show the following error:
    A database problem has occurred - java.sql.SQLExc eption: No suitable
    driver

    IBM only provides SQC on different 32-bit and 64-bit.
    DB2 instance will have different LIB for 32 and 64 bit instance.
    But for JAVA, I didn't find JAVA driver with 32-bit and 64-bit.
    How DB2 get the driver for 32-bit and 64-bit instance?
    When I upgrade db2 instance 32-bit to 64-bit, What will I need to do
    for the exsting JAVA database application?
    I just need to use 64-bit JVM recompile it and run it wiht 64-bit JVM?

    thanks,
    George
  • Darin McBride

    #2
    Re: db2 java application of 32-bit and 64-bit DB2 insatnce

    zgh1970 wrote:
    I did a test on running db2 database java code on 32-bit and 64-bit
    db2 instance.
    It seams that java application with 32-bit JVM couldn't run at 64-bit
    db2 instance.
    Correct, if you're using the Type2 driver.
    Also 64-bit JVM couldn't run at 32-bit db2 instance.
    I will show the following error:
    A database problem has occurred - java.sql.SQLExc eption: No suitable
    driver
    >
    IBM only provides SQC on different 32-bit and 64-bit.
    DB2 instance will have different LIB for 32 and 64 bit instance.
    But for JAVA, I didn't find JAVA driver with 32-bit and 64-bit.
    The type 2 driver will load libdb2 from the sqllib/lib directory, and that's
    causing your problem.
    How DB2 get the driver for 32-bit and 64-bit instance?
    When I upgrade db2 instance 32-bit to 64-bit, What will I need to do
    for the exsting JAVA database application?
    Use a 64-bit JVM ;-)
    I just need to use 64-bit JVM recompile it and run it wiht 64-bit JVM?
    You shouldn't need to recompile anything, unless you have your own JNI code.
    Or you can use a type 4 driver which would provide further independence
    from the DB2 native code.

    Comment

    Working...