Results 1 to 2 of 2
  1. #1
    Join Date
    May 2002
    Posts
    2

    Unanswered: Can not access remote db2 from java application

    I have DB2 7.2 running on a remote system.i am trying to access it from a java application on my system.i have DB2 7.2 client installed on my machine and also db2java.zip in my classpath.when i run the java program i get the following runtime exception :

    Exception in thread "main" java.lang.UnsatisfiedLinkError: SQLAllocStmt
    at COM.ibm.db2.jdbc.app.DB2Statement.SQLAllocStmt(Nat ive Method)
    at COM.ibm.db2.jdbc.app.DB2Statement.<init>(DB2Statem ent.java:288)
    at COM.ibm.db2.jdbc.app.DB2Statement.<init>(DB2Statem ent.java:304)
    at COM.ibm.db2.jdbc.app.DB2Connection.createStatement (DB2Connection.java:472)

    But when i run the same program on the machine on which DB2 is installed it runs fine.
    can anybody help me?Am I missing something.?

  2. #2
    Join Date
    Apr 2002
    Posts
    188

    Re: Can not access remote db2 from java application

    Originally posted by rameshc
    I have DB2 7.2 running on a remote system.i am trying to access it from a java application on my system.i have DB2 7.2 client installed on my machine and also db2java.zip in my classpath.when i run the java program i get the following runtime exception :

    Exception in thread "main" java.lang.UnsatisfiedLinkError: SQLAllocStmt
    at COM.ibm.db2.jdbc.app.DB2Statement.SQLAllocStmt(Nat ive Method)
    at COM.ibm.db2.jdbc.app.DB2Statement.<init>(DB2Statem ent.java:288)
    at COM.ibm.db2.jdbc.app.DB2Statement.<init>(DB2Statem ent.java:304)
    at COM.ibm.db2.jdbc.app.DB2Connection.createStatement (DB2Connection.java:472)

    But when i run the same program on the machine on which DB2 is installed it runs fine.
    can anybody help me?Am I missing something.?

    make sure that you are using JDBC type 2 drivers on your client and also on your server. Look for the sqllib/java12 folder and there should be a file named usejdbc2, if Windows execute the batch in Unix make the file part of your login profile in client/server

    marcos oliva

Posting Permissions

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