Let me guess: An object with the id 0 does already exist since you ran your code at least once before. Regards Felix View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4040362#4040362 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4040362