[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: ERROR: duplicate key violates unique constraint

PeterJ do-not-reply at jboss.com
Thu Jul 24 11:24:38 EDT 2008


Are you sure that you posted the correct code? I ask because the error message you posted is typically seen during an update, and not a query, and the code you posted relates to a query. (You really should have posted enough of the stack trace so that we could see a line that included the method in your code that initiated this.)

If it is this code, then the database is already corrupt. That is, the database already contains a duplicate key. In which case you will have to fix this using database tools.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4166466#4166466

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4166466



More information about the jboss-user mailing list