I'm tracking this error for a while now, it hapens on irregular basis unpredictibly and I haven't find a way to reproduce it for now.
Our environment
- linux centos 5.3 hosting one jboss 5.1 app server
- linux centos 5.3 hosting one oracle 10g XE db
- windows server 2003 R2 hosting another oracle 10g XE db
Programming environment
- seam 2.1
- hibernate
- JSF 1.2
Most of this errors happens on a "APPLICATION" scope seam component, but it also happened elswhere.
Wea are using XA-datasource to access the databases.
It appeares that tis is also some sort of a bug in jboss 5.1 look here, but we do not have queries or requests that last 60 seconds.
What could be the possible reason for this kind of errors?
The final stack trace of the error:
Caused by: java.sql.SQLException: Unable to obtain lock in 60 seconds: org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@1d314d
at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.tryLock(BaseWrapperManagedConnection.java:267)
at org.jboss.resource.adapter.jdbc.WrappedConnection.lock(WrappedConnection.java:79)
at org.jboss.resource.adapter.jdbc.WrappedConnection.prepareStatement(WrappedConnection.java:237)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:534)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:452)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1573)
at org.hibernate.loader.Loader.doQuery(Loader.java:696)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
at org.hibernate.loader.Loader.doList(Loader.java:2228)