Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2010
    Posts
    2

    Unanswered: Code works on one box but fails on another

    Greetings
    I have two AIX boxes with the same locales and system charmap ISO8859-1. One houses WAS and the other houses DB2 database.
    The DB2 codepage is 1208 and codeset is UTF-8.

    I run a standalone Java program on the box that houses WAS. The Java application connects to the database on the other box, processes a bunch of xml files and persists in the database (as raw data, not xml). It does it successfully.
    The JRE is
    java version "1.5.0"
    Java(TM) 2 Runtime Environment, Standard Edition (build pap32dev-20091106a (SR11 ))
    IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 AIX ppc-32 j9vmap3223-20091104 (JIT enabled)
    J9VM - 20091103_45935_bHdSMr
    JIT - 20091016_1845_r8
    GC - 20091026_AA)
    JCL - 20091106


    Now I run the same Java program using the same JDBC driver against the same set of xml files on the box that houses the database but it fails with the following exception
    COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver] CLI0109E String data right truncation. SQLSTATE=22001

    The JRE on this box is slightly older even though it is of the same major level.
    java version "1.5.0"
    Java(TM) 2 Runtime Environment, Standard Edition (build pap64dev-20070511(SR5))
    IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 AIX ppc64-64 j9vmap6423-20070426 (JIT enabled)
    J9VM - 20070420_12448_BHdSMr
    JIT - 20070419_1806_r8
    GC - 200704_19)
    JCL - 20070511


    Could it be the older JRE or is this something to do with character encoding or..? All assistance will be greatly appreciated.
    Thanks
    Sid

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    I suspect that you are using the type 2 ("app") JDBC driver, which is deprecated. Use the type 4 ("jcc") driver instead.

  3. #3
    Join Date
    Jun 2010
    Posts
    2
    I am using the same driver on both machines. One works and the other does not.
    I have also tried the jcc driver earlier. The error message was slightly different but it meant the same thing.

Posting Permissions

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