-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: DB2400Dialect and unsupported JDBC functions
PostPosted: Wed Mar 08, 2006 7:24 am 
Newbie

Joined: Thu Oct 14, 2004 10:05 am
Posts: 9
Location: Copenhagen, Denmark
After upgrading to Hibernate 3.1.1 (from 3.0) some of our programs stated to fail with JDBC exceptions stating that "The driver does not support this function."

It's working again, so I thought I'd share the easy, but not-so-obvious, solution with others who might run into the same problem.

You simply have to set hibernate.jdbc.use_get_generated_keys=false

Otherwise, according to the Hibernate documentation, Hibernate "will use JDBC3 PreparedStatement.getGeneratedKeys() to retrieve natively generated keys after insert. Requires JDBC3+ driver and JRE1.4+, set to false if your driver has problems with the Hibernate identifier generators. By default, tries to determine the driver capabilites using connection metadata."

The JDBC driver we are using is from JTOpen 5.0, and it apparantly does not support the above mentioned function.

Kind regards
Claus Nielsen


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.