INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Can't get JDBC to work with DB2 using jdbc:db2:<database>

Can't get JDBC to work with DB2 using jdbc:db2:<database>

Can't get JDBC to work with DB2 using jdbc:db2:<database>

(OP)
Hi,
I have a Java application that works fine when using a JDBC URL like this:
jdbc:db2://host:port/database
but when I change it to use this format:
jdbc:db2:database
I get the following error:

CODE

WARNING: Failed to execute: select distinct tabschema from syscat.tables because: Execution failed due to a distribution protocol error that caused deallocation of the conversation.  A DRDA Data Stream Syntax Error was detected.  Reason: 0x3  DB2ConnectionCorrelator: *LOCAL.db2inst1.100917205438
com.ibm.db2.jcc.b.DisconnectException: Execution failed due to a distribution protocol error that caused deallocation of the conversation.  A DRDA Data Stream Syntax Error was detected.  Reason: 0x3  DB2ConnectionCorrelator: *LOCAL.db2inst1.100917205438
Debug Stack Trace:
com.ibm.db2.jcc.b.DisconnectException: Execution failed due to a distribution protocol error that caused deallocation of the conversation.  A DRDA Data Stream Syntax Error was detected.  Reason: 0x3  DB2ConnectionCorrelator: *LOCAL.db2inst1.100917205438
com.ibm.db2.jcc.b.DisconnectException: Execution failed due to a distribution protocol error that caused deallocation of the conversation.  A DRDA Data Stream Syntax Error was detected.  Reason: 0x3  DB2ConnectionCorrelator: *LOCAL.db2inst1.100917205438
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

I'm using DB2 Express-C 9.7.2 on Ubuntu Linux.
Any ideas on what the problem might be?

RE: Can't get JDBC to work with DB2 using jdbc:db2:<database>

(OP)
Nevermind.  I finally got it to work.
Apparently the db2jcc drivers I had in my classpath (which worked fine with Type 4 JDBC URLs) don't work with Type 2 JDBC URLs.  When I added the db2jcc drivers from my DB2 Express-C to my classpath it worked.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close