Topic
3 replies Latest Post - ‏2013-07-24T19:25:02Z by chuck@edmonds
chuck@edmonds
chuck@edmonds
33 Posts
ACCEPTED ANSWER

Pinned topic 10.5 JDBC driver problem ??

‏2013-06-25T23:52:24Z |

I installed 10.5 on 64 bit Linux.  Code that has been working for over a decade no longer works and provides the following stack trace:

java.lang.ArrayIndexOutOfBoundsException
    at java.lang.System.arraycopy(Native Method)
    at com.ibm.db2.jcc.t4.x.a(x.java:104)
    at com.ibm.db2.jcc.t4.x.a(x.java:152)
    at com.ibm.db2.jcc.uw.UWReply.b(UWReply.java:62)
    at com.ibm.db2.jcc.t4.x.c(x.java:317)
    at com.ibm.db2.jcc.t4.x.d(x.java:332)
    at com.ibm.db2.jcc.t4.x.f(x.java:603)
    at com.ibm.db2.jcc.t4.y.ic(y.java:4656)
    at com.ibm.db2.jcc.t4.y.hc(y.java:4641)
    at com.ibm.db2.jcc.t4.ab.c(ab.java:3028)
    at com.ibm.db2.jcc.t4.ab.b(ab.java:3018)
    at com.ibm.db2.jcc.t4.ab.b(ab.java:2908)
    at com.ibm.db2.jcc.t4.ab.a(ab.java:2764)
    at com.ibm.db2.jcc.t4.ab.b(ab.java:2689)
    at com.ibm.db2.jcc.t4.ab.a(ab.java:2603)
    at com.ibm.db2.jcc.t4.ab.h(ab.java:134)
    at com.ibm.db2.jcc.t4.ab.b(ab.java:41)
    at com.ibm.db2.jcc.t4.p.a(p.java:32)
    at com.ibm.db2.jcc.t4.qb.i(qb.java:135)
    at com.ibm.db2.jcc.am.jo.gb(jo.java:2159)
    at com.ibm.db2.jcc.am.jo.a(jo.java:3238)
    at com.ibm.db2.jcc.am.jo.a(jo.java:691)
    at com.ibm.db2.jcc.am.jo.executeQuery(jo.java:670)
    at com.cdpc.server.appobjects.ServerVariables.setUserAuthorities(ServerVariables.java:1036)

 

I'm guessing this is a driver problem but also possibly a problem with the JVM shipped with 10.5.  Is there a solution?

 

Thanks for any assistance.

  • chuck@edmonds
    chuck@edmonds
    33 Posts
    ACCEPTED ANSWER

    Re: 10.5 JDBC driver problem ??

    ‏2013-06-26T10:13:33Z  in response to chuck@edmonds

    Never mind.  I found the problem.  The driver was not loading correctly.  All is well that ends well.

    • Sreeharsha_Naik
      Sreeharsha_Naik
      34 Posts
      ACCEPTED ANSWER

      Re: 10.5 JDBC driver problem ??

      ‏2013-07-24T14:07:37Z  in response to chuck@edmonds

      Chuck,

      Glad that it worked, can you may be show us what you did to fix the error ? Greatly appreciated !!

      Cheers,
      Sreeharsha

      • chuck@edmonds
        chuck@edmonds
        33 Posts
        ACCEPTED ANSWER

        Re: 10.5 JDBC driver problem ??

        ‏2013-07-24T19:25:02Z  in response to Sreeharsha_Naik

        Oh, boy, that was a long time ago! 

        As I recall it was a permissions problem.  Java security has changed lately and I had to modify the .java.policy to allow code to execute from the driver directory as I recall.  I believe that machine is running JDK1.7u21.  I had to include /opt/ibm/db2/- in the policy file before my application could execute the driver code.  I presume you could also copy the db2jcc4.jar to a directory that is already included in your .java.policy file and is on your classpath definition.

         

        HTH if you're having a similar problem.