The code that generates this log is from class
org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand and more specifically in method
protected void performInsert(EntityEnterpriseContext ctx) throws CreateException. Here is
the snippet that is logging.
?..
| catch(SQLException e)
| {
| if(exceptionProcessor != null && exceptionProcessor.isDuplicateKey(e))
| {
| log.error("Failed to create instance.", e);
| throw new CreateException(
| "Integrity constraint violation. Possibly unique key violation or
invalid foreign key value."
| );
| }
| ?.
| }
log object is org.jboss.logging.Logger instance.
The only way that I find is not to log log level ERROR, which is too hard. Or just make
feature request this logging to be changed from ERROR to WARN level. I am wondering why
this is ERROR? Exception is thrown and it will not be left unnoticed, why explicitly
logging is needed? If this is because throw new CreateException(??"); hides the
original message and stack trace, this could be changed, too.
Is there anyone with good explanation?
Best Regards, jivkoto
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3977896#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...