Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem in connecting to DB2 using hibernate

 
Rama Dev
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 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",
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:163)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:81)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:96)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1.acquireResource(C3P0PooledConnectionPool.java:89)
at com.mchange.v2.resourcepool.BasicResourcePool.acquireUntil(BasicResourcePool.java:665)
at com.mchange.v2.resourcepool.BasicResourcePool.access$500(BasicResourcePool.java:32)
at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1204)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:368)
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34178
340
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rama,
We have a separate forum for Hibernate. I'll move this for you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic