Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2008

Tip: Looking for answers? Try searching our database.

about exception message

Thread view: 
Spark - 01 Mar 2008 07:14 GMT
Hi here,

I got a problem in my program. Spring+hibernate+postgresql were used
in my case.
I manipulate data use HibernateTemplate from spring, sometime I do
some operation to break the database constraint, such as insert a
duplicate key record. I obtain the reason of exception by mothed
getMessage(). the following message was presented
"Could not execute JDBC batch update; nested exception is
org.hibernate.exception.ConstraintViolationException: Could not
execute JDBC batch update".
But it's not as me might expect. I wanted the orignal message from the
database.

Appriciate anyone who point me out!

lx
Sabine Dinis Blochberger - 03 Mar 2008 10:13 GMT
> Hi here,
>
[quoted text clipped - 9 lines]
> But it's not as me might expect. I wanted the orignal message from the
> database.

I would say look at the PostgreSQL logs.

> Appriciate anyone who point me out!
>
> lx

The word ConstraintViolationException makes me think you tried to insert
a primary key that already exists, or a foreign key that doesn't.
Signature

Sabine Dinis Blochberger

Op3racional
www.op3racional.eu



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.