If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > problem in connecting to DB2 using hibernate

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-06-07, 17:09
marad marad is offline
Registered User
 
Join Date: Sep 2007
Posts: 3
problem in connecting to DB2 using hibernate

Please help me with your suggestions to solve the following problem.

I encountered a DRDA error in an attempt to connect to DB2 database through hibernate and c3PO connection pooling.

DB2 (version 9.1) is located in windows-2003 server
JDBC URL: jdbc:db2://<host>:50000/<database>
driver: com.ibm.db2.jcc.DB2Driver (type-4 driver)

Though I could successfully connect to the database using "Driver.connect" in a java application,
the following exception is thrown when I tried to connect through hibernate.
Using the same code block, I was able to connect to MySQL and SQL Server 2005.


BasicResourcePool: An exception occurred while acquiring a resource.
com.ibm.db2.jcc.c.DisconnectException: [ibm][db2][jcc][t4][2034][11148] Execution failed due to a distribution protocol error that caused deallocation of the conversation.
A DRDA Data Stream Syntax Error was detected. Reason: 0x2110.
at com.ibm.db2.jcc.b.db.l(db.java:927)
at com.ibm.db2.jcc.b.eb.Y(eb.java:1943)
at com.ibm.db2.jcc.b.eb.A(eb.java:629)
at com.ibm.db2.jcc.b.eb.Q(eb.java:510)
at com.ibm.db2.jcc.b.eb.i(eb.java:304)
at com.ibm.db2.jcc.b.eb.a(eb.java:43)
at com.ibm.db2.jcc.b.b.f(b.java:1248)
at com.ibm.db2.jcc.b.b.b(b.java:1140)
at com.ibm.db2.jcc.b.b.s(b.java:924)
at com.ibm.db2.jcc.b.b.b(b.java:607)
at com.ibm.db2.jcc.b.b.a(b.java:593)
at com.ibm.db2.jcc.b.b.<init>(b.java:263)
at com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:1 63)
at com.mchange.v2.c3p0.DriverManagerDataSource.getCon nection(DriverManagerDataSource.java:81)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSourc e.getPooledConnection(WrapperConnectionPoolDataSou rce.java:96)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$ 1.acquireResource(C3P0PooledConnectionPool.java:89 )
at com.mchange.v2.resourcepool.BasicResourcePool.acqu ireUntil(BasicResourcePool.java:665)
at com.mchange.v2.resourcepool.BasicResourcePool.acce ss$500(BasicResourcePool.java:32)
at com.mchange.v2.resourcepool.BasicResourcePool$Acqu ireTask****n(BasicResourcePool.java:1204)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$ PoolThread****n(ThreadPoolAsynchronousRunner.java:3 68)
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On