I am getting annoying logs in the weblogic server logs whenever a query fails to update the record due to row level locking in the table. The locking is expected as multiple application will try to update the record at same time. The application is designed to handle these exceptions and retry after an interval. But the Hibernate writes the error logs to server out files every time the query fails.
WARNING: SQL Error: -244, SQLState: IX000
16-Oct-2013 19:15:00 org.hibernate.util.JDBCExceptionReporter logExceptions
SEVERE: Could not do a physical-order read to fetch next row.
16-Oct-2013 19:15:00 org.hibernate.util.JDBCExceptionReporter logExceptions
WARNING: SQL Error: -113, SQLState: IX000
16-Oct-2013 19:15:00 org.hibernate.util.JDBCExceptionReporter logExceptions
SEVERE: ISAM error: the file is locked.
16-Oct-2013 19:15:00 org.hibernate.event.def.AbstractFlushingEventListener performExecutions
SEVERE: Could not synchronize database state with session
org.hibernate.exception.GenericJDBCException: could not update: [uk.co.orange.rp.collections.entity.PpsServerLock#2]
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
.
.
.
In Eclipse, I am able to avoid logging on the console by adding slf4j-log4j12 jar in the classpath. But I am not able to achieve the same in WebLogic application.
Even tried by adding the following on weblogic-application.xml, no luck.
<prefer-application-packages>
<package-name>org.slf4j.*</package-name>
<package-name>org.apache.log4j.*</package-name>
</prefer-application-packages>
Can someone suggest what else can be done.
I am using Hibernate-3.3.2, Log4j-1.2.15, slf4j-1.5.6, JPA-1.1
Regards