This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Weird ConstraintViolationException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Weird ConstraintViolationException" Watch "Weird ConstraintViolationException" New topic
Author

Weird ConstraintViolationException

Andre Mazoni
Greenhorn

Joined: Oct 21, 2011
Posts: 1

Hello guys,
I got a problem that is very weird.. This is the situation:
I have two classes: Code and FinancialMove. The FinancialMove has a Code (many moves to one code).
There are two codes in the db and just one of them is related to a registered FinancialMove.
If I try to remove the "unrelated" code it works, but if I try to remove the related one before it throws the exception (which is correct) then I try to remove that first one but it also says that this code is related to some financialmove.

Do you guys have any idea of what's happening?
Thanks!
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 43346
    
  32
Welcome to the Ranch

You would have to supply more information; that Exception doesn’t appear to be in the standard Oracle/Sun API, so you would need to know where it is from, and its details.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14913
    
  26

There's a javax.validation.ConstraintViolationException in the Java EE 6 API, is that what you meant?


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
 
Don't get me started about those stupid light bulbs.
 
subject: Weird ConstraintViolationException
 
It's not a secret anymore!