-->
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.  [ 3 posts ] 
Author Message
 Post subject: getConstraintName() returns null with oracle 10.2.0.4.0
PostPosted: Thu Mar 12, 2009 10:38 am 
Newbie

Joined: Fri Jul 11, 2008 7:48 am
Posts: 5
Hi all,

i'm using hibernate 3.2.1 together with an oracle db. I'm always catching ConstraintViolationException and throw a user readable custom exception where i display the constraint name of the constraint which was violated (by using the getConstraintName() method). This works perfectly with my oracle 10.2.0.2.0 data base.
Now i had to switch to oracle 10.2.0.4.0 and the getConstraintName() method always returns null.
I already tried the following:
- new OJDBC drivers (tried 10.2.0.4, 10.2.0.3, 10.2.0.2)
- new hibernate version 3.3.1
- the structure and data of the new db is identical to the old one

Is this a known problem? Should i report a bug?

Thank in advance,
Christian


Top
 Profile  
 
 Post subject: Re: getConstraintName() returns null with oracle 10.2.0.4.0
PostPosted: Tue Jun 15, 2010 10:59 am 
Newbie

Joined: Fri Jul 11, 2008 7:48 am
Posts: 5
Same problem occurs with Oracle 11.

Any suggestions?


Top
 Profile  
 
 Post subject: Re: getConstraintName() returns null with oracle 10.2.0.4.0
PostPosted: Fri Jul 30, 2010 8:02 am 
Newbie

Joined: Fri Jul 11, 2008 7:48 am
Posts: 5
Obviously these Oracle versions now throw language specific errors e.g. on violating database constraints Hibernate however tries to parse these errors in English language to retrieve constraint names, which fails. So the solution was to set up the language of the JDBC connection:

-Duser.language=en
-Duser.country=US


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

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.