[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - two dataSources: Lock wait timeout exceeded

javatwo do-not-reply at jboss.com
Wed May 13 06:30:50 EDT 2009


we have 3 data sources(persistence units) in our app. The following exception raised in the senario:

data source 1:  create entity 1,
entity2.setEntity1(entity1);
data source 2:  create entity 2,  entity 1 is a property of entity2

class Entity2 {

  Entity1 getEntity1()
  void setEntity1(Entity1 entity1)
}
 
Caused by: java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
17:45:38,362 ERROR [STDERR]     at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
17:45:38,362 ERROR [STDERR]     at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
17:45:38,362 ERROR [STDERR]     at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3515)
17:45:38,362 ERROR [STDERR]     at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3447)
17:45:38,362 ERROR [STDERR]     at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1951)
17:45:38,362 ERROR [STDERR]     at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2101)
17:45:38,362 ERROR [STDERR]     at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2554)
17:45:38,362 ERROR [STDERR]     at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1761)
17:45:38,362 ERROR [STDERR]     at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2046)
17:45:38,362 ERROR [STDERR]     at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1964)
17:45:38,363 ERROR [STDERR]     at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1949)
17:45:38,363 ERROR [STDERR]     at com.mysql.jdbc.jdbc2.optional.PreparedStatementWrapper.executeUpdate(PreparedStatementWrapper.java:874)
17:45:38,363 ERROR [STDERR]     at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:365)
17:45:38,363 ERROR [STDERR]     at org.hibernate.id.IdentityGenerator$GetGeneratedKeysDelegate.executeAndExtract(IdentityGenerator.java:94)
17:45:38,363 ERROR [STDERR]     at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:57)

Is this a bug? How to work around this?
Thanks,
Dave

Enronment: JBoss 5.0.1.GA.


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

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



More information about the jboss-user mailing list