BPEL ATM example
stone_42 Jan 10, 2006 7:41 AMHello,
I have two questions regarding the atm example:
- The atm example is running and the test case completes. But if I try to call the operations connect() and logon() from one client process, and after that, from another client process, e.g. deposit(), logoff() and disconnect() (with the same sessionID and customerName), there is strange behavior: My second process needs lots of time, and after depositing or withdrawing, the balance is always zero. I looked to the server log, and found the following entries:
2006-01-10 13:07:56,015 DEBUG [org.jbpm.bpel.service.messager.PortHandler] listening for response: JMS_TQ2 2006-01-10 13:08:56,015 DEBUG [org.jbpm.bpel.service.messager.PortHandler] response timeout expired: JMS_TQ2
This seems to be the reason for the long execution time of my second client process.
What do I do wrong?
The second question is about jbpm bpel on mysql (I use version 4.1.14).
I can create the db-schema without a problem and deploy the atm example, but when I run the testcase of the atm example, the server throws a huge stacktrace, beginning with the following:
org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:91) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:79) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:200) at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:91) at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:86) at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:169) at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2162) at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2117) at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2373) at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:84) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:243) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:227) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:296) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:905) at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:345) at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106) at org.jbpm.bpel.service.messager.StartListener.onMessage(StartListener.java:124) at org.jboss.mq.SpyMessageConsumer.run(SpyMessageConsumer.java:707) at java.lang.Thread.run(Thread.java:595) Caused by: java.sql.BatchUpdateException: Incorrect arguments to mysql_stmt_execute at com.mysql.jdbc.ServerPreparedStatement.executeBatch(ServerPreparedStatement.java:828) at org.jboss.resource.adapter.jdbc.WrappedStatement.executeBatch(WrappedStatement.java:487) at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:58) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:193) ... 18 more 13:21:11,265 ERROR [StartListener] could not deliver request org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:91) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:79) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:200) at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:91) at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:86) at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:169) at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2162) at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2117) at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2373) at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:84) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:243) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:227) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:296) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:905) at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:345) at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106) at org.jbpm.bpel.service.messager.StartListener.onMessage(StartListener.java:124) at org.jboss.mq.SpyMessageConsumer.run(SpyMessageConsumer.java:707) at java.lang.Thread.run(Thread.java:595) Caused by: java.sql.BatchUpdateException: Incorrect arguments to mysql_stmt_execute at com.mysql.jdbc.ServerPreparedStatement.executeBatch(ServerPreparedStatement.java:828) at org.jboss.resource.adapter.jdbc.WrappedStatement.executeBatch(WrappedStatement.java:487) at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:58) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:193) ... 18 more 13:21:11,531 INFO [DefaultLoadEventListener] Error performing load command org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [org.jbpm.graph.exe.Token#6] at org.hibernate.ObjectNotFoundException.throwIfNull(ObjectNotFoundException.java:27) at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:128) at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:161) at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:87) at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:809) at org.hibernate.impl.SessionImpl.load(SessionImpl.java:731) at org.hibernate.impl.SessionImpl.load(SessionImpl.java:724) at org.jbpm.bpel.service.messager.RequestListener.onMessage(RequestListener.java:95) at org.jboss.mq.SpyMessageConsumer.run(SpyMessageConsumer.java:707) at java.lang.Thread.run(Thread.java:595)
I run the atm example also on a HSQLDB and on Oracle 10 with Hibernate Oracle9Dialect (after renaming some foreign keys in the mapping files whose names were too long for oracle), and it worked. Interesting, create-schema worked on mysql without any exception, on HSQLDB and Oracle there was an exception in the server log, but the server returned 200 and the ant task completed successfully.
Regards,
Martin