[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: 'no-select-before-insert'

bartvh do-not-reply at jboss.com
Mon May 7 10:29:03 EDT 2007


This error log is indeed very annoying. But to me, the fact that a generic CreateException is thrown is even more problematic. How do I distinguish this from some other failure in the database? I would hope I do not need to interpret the exeception's message to distinguish.

Shouldn't this code read as:  catch(SQLException e)
  |   {
  |      if(exceptionProcessor != null && exceptionProcessor.isDuplicateKey(e))
  |      {
  |         throw new DuplicateKeyException(
  |            "Integrity constraint violation:" + e.getMessage());
  |      }
  |      ...
  |   }

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

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



More information about the jboss-user mailing list