[jBPM] - JBPM 4.4 - exception recovery
by Yuriy Fuksenko
Yuriy Fuksenko [http://community.jboss.org/people/yfuksenk] created the discussion
"JBPM 4.4 - exception recovery"
To view the discussion, visit: http://community.jboss.org/message/576183#576183
--------------------------------------------------------------
I have a Spring based web application with JBPM embeded.
I defined a workflow, that have a task followed by 3 custom activities:
activity1 - calls webservice
activity2 - sends email
activity3 - sends JMS message
At some point my application calls taskService.finishTask, and those activities will be executed.
What I need, is in a case of error (let say SMTPserver is unreachable or web service is not up):
1. Activity should be retried until it succeed (I understand that a lot of logic could be suggested around this, like retry count, notifications, etc, but I am simplifying this on purpose)
2. Activities that succeeded should not be repeated, i.e. if activity2 fails, activity1 should not be executed again (and this is what happens now if any of those activities throws an exception - I guess it has to do with transaction being rolled back)
So my question is - Is there an easy or at least standard way of doing this in JBPM?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/576183#576183]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 1 month
[JNDI and Naming] - Re: javax.naming.NameNotFoundException: persistence not bound
by rac tech
rac-tech [http://community.jboss.org/people/rac-tech] created the discussion
"Re: javax.naming.NameNotFoundException: persistence not bound"
To view the discussion, visit: http://community.jboss.org/message/577084#577084
--------------------------------------------------------------
Thank you for the reply
The JBoss version is 5.1.0.
Persistent unit(smalllake-bopc) is deployed with a warning just after this exception is thrown. Please see a portion of the log below
----------------------------------------------------------------------------------------------------------
Caused by: javax.naming.NameNotFoundException: persistence not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
....
....
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1400)
... 133 more
09:10:29,332 INFO [PersistenceUnitDeployment] Starting persistence unit persistence.unit:unitName=sss.ear/sss.jar#smalllake-bopc
09:10:29,379 INFO [Version] Hibernate Annotations 3.4.0.GA
09:10:29,394 INFO [Environment] Hibernate 3.3.1.GA
09:10:29,394 INFO [Environment] hibernate.properties not found
09:10:29,394 INFO [Environment] Bytecode provider name : javassist
09:10:29,394 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling
09:10:29,457 INFO [Version] Hibernate Commons Annotations 3.1.0.GA
09:10:29,457 INFO [Version] Hibernate EntityManager 3.4.0.GA
09:10:29,488 INFO [Ejb3Configuration] Processing PersistenceUnitInfo [
name: smalllake-bopc
...]
09:10:29,582 WARN [Ejb3Configuration] Persistence provider caller does not implement the EJB3 spec correctly. PersistenceUnitInfo.getNewTempClassLoader() is null.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/577084#577084]
Start a new discussion in JNDI and Naming at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 1 month
[jBPM] - JobExecutor becomes broken and cannot recover (JBPM3.2.2)
by Petr Sochurek
Petr Sochurek [http://community.jboss.org/people/soft] created the discussion
"JobExecutor becomes broken and cannot recover (JBPM3.2.2)"
To view the discussion, visit: http://community.jboss.org/message/577160#577160
--------------------------------------------------------------
Problem: JobExecutor thread becomes broken due to unknown transactional problem. As a reason no tasks are executed and only JBoss restart helps.
Configuration and environment
- components stack: JBOSS 4.2.3, JBOSS TS 4.2.3, JBPM 3.2.2, Hibernate 3.2.4.sp1.cp04
- database server: MySQL 5.1.47
- distributed transaction only within the one database server
- operated on several Linux environments
The problem occurs irregurarly (once per several days and only on some environments). When it happens following errors are logged by JBPMExecutor thread:
2010-12-15 15:53:20,566 WARN com.arjuna.ats.arjuna.logging.arjLoggerI18N com.arjuna.ats.arjuna.logging.arjLoggerI18N [com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator_2
TwoPhaseCoordinator.beforeCompletion - failed for nulljava.lang.NullPointerExceptionat org.hibernate.connection.DatasourceConnectionProvider.closeConnection(DatasourceConnectionProvider.java:74)at org.hibernate.jdbc.ConnectionManager.closeConnection(ConnectionManager.java:451)at org.hibernate.jdbc.ConnectionManager.aggressiveRelease(ConnectionManager.java:406)at org.hibernate.jdbc.ConnectionManager.afterStatement(ConnectionManager.java:281)at org.hibernate.jdbc.ConnectionManager.flushEnding(ConnectionManager.java:480)at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:305)at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)at org.hibernate.transaction.CacheSynchronization.beforeCompletion(CacheSynchronization.java:59)at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:114)at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:247)at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:86)at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177)at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1389)at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:135)at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:87)at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.commit(ServerVMClientUserTransaction.java:140)at org.jbpm.persistence.jta.JtaDbPersistenceService.endJtaTransaction(JtaDbPersistenceService.java:80)at org.jbpm.persistence.jta.JtaDbPersistenceService.close(JtaDbPersistenceService.java:41)at org.jbpm.svc.Services.close(Services.java:225)at org.jbpm.JbpmContext.close(JbpmContext.java:139)at org.jbpm.job.executor.JobExecutorThread.acquireJobs(JobExecutorThread.java:144)at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:58)2010-12-15 15:53:20,566 WARN com.arjuna.ats.arjuna.logging.arjLoggerI18N com.arjuna.ats.arjuna.logging.arjLoggerI18N com.arjuna.ats.arjuna.coordinator.CheckedAction_2 com.arjuna.ats.arjuna.coordinator.CheckedAction_2 - CheckedAction::check - atomic action
a471f1f:c46e:4d08ce0f:c5a aborting with 1 threads active!2010-12-15 15:53:20,582 ERROR org.jbpm.svc.Services org.jbpm.svc.Services problem closing service 'persistence'org.jbpm.JbpmException: couldn't commit JTA transactionat org.jbpm.persistence.jta.JtaDbPersistenceService.endJtaTransaction(JtaDbPersistenceService.java:82)at org.jbpm.persistence.jta.JtaDbPersistenceService.close(JtaDbPersistenceService.java:41)at org.jbpm.svc.Services.close(Services.java:225)at org.jbpm.JbpmContext.close(JbpmContext.java:139)at org.jbpm.job.executor.JobExecutorThread.acquireJobs(JobExecutorThread.java:144)at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:58)Caused by: java.lang.NullPointerExceptionat com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:235)at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:86)at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177)at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1389)at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:135)at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:87)at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.commit(ServerVMClientUserTransaction.java:140)at org.jbpm.persistence.jta.JtaDbPersistenceService.endJtaTransaction(JtaDbPersistenceService.java:80)... 5 more2010-12-15 15:53:20,589 ERROR org.jbpm.job.executor.JobExecutorThread org.jbpm.job.executor.JobExecutorThread exception in job executor thread. waiting 5000 millisecondsorg.jbpm.JbpmException: problem closing services {persistence=org.jbpm.JbpmException: couldn't commit JTA transaction}at org.jbpm.svc.Services.close(Services.java:245)at org.jbpm.JbpmContext.close(JbpmContext.java:139)at org.jbpm.job.executor.JobExecutorThread.acquireJobs(JobExecutorThread.java:144)at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:58)Caused by: org.jbpm.JbpmException: couldn't commit JTA transactionat org.jbpm.persistence.jta.JtaDbPersistenceService.endJtaTransaction(JtaDbPersistenceService.java:82)at org.jbpm.persistence.jta.JtaDbPersistenceService.close(JtaDbPersistenceService.java:41)at org.jbpm.svc.Services.close(Services.java:225)... 3 moreCaused by: java.lang.NullPointerExceptionat com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:235)at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:86)at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177)at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1389)at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:135)at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:87)at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.commit(ServerVMClientUserTransaction.java:140)at org.jbpm.persistence.jta.JtaDbPersistenceService.endJtaTransaction(JtaDbPersistenceService.java:80)
... 5 more
>From now all the successive iterations of JobExecutor always end up with following error (and the waiting time doubles after error):
2010-12-15 15:53:23,524 ERROR org.jbpm.job.executor.JobExecutorThread org.jbpm.job.executor.JobExecutorThread exception in job executor thread. waiting 10000 milliseconds
org.jbpm.JbpmException: couldn't start JTA transaction
at org.jbpm.persistence.jta.JtaDbPersistenceService.beginJtaTransaction(JtaDbPersistenceService.java:55)
at org.jbpm.persistence.jta.JtaDbPersistenceService.(JtaDbPersistenceService.java:28)
at org.jbpm.persistence.jta.JtaDbPersistenceServiceFactory.openService(JtaDbPersistenceServiceFactory.java:17)
at org.jbpm.svc.Services.getService(Services.java:144)
at org.jbpm.svc.Services.getPersistenceService(Services.java:183)
at org.jbpm.JbpmContext.getPersistenceService(JbpmContext.java:628)
at org.jbpm.JbpmContext.getJobSession(JbpmContext.java:561)
at org.jbpm.job.executor.JobExecutorThread.acquireJobs(JobExecutorThread.java:112)
at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:58)
Caused by: javax.transaction.NotSupportedException
at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.begin(BaseTransaction.java:79)
at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.begin(BaseTransactionManagerDelegate.java:77)
at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.begin(ServerVMClientUserTransaction.java:124)
at org.jbpm.persistence.jta.JtaDbPersistenceService.beginJtaTransaction(JtaDbPersistenceService.java:53)
... 8 more
I suppose that the root cause is some database connection problem or network problem (maybe firewall). The problem occurs irregurarly only on production environments and I wasn't able to find out what it coudl be.
Anyway, I would expect that regardless of such low-level errors, the JBPM (or Hibernate, Arjuna or anything else inside) should be able to fully recover.
Locally I can reproduce problem by locking Mysql database tables using scenario:
1) deployed testing jbpm process whose transitions are changed automatically every minute
2) locked mysql database tables using "FLUSH TABLES WITH READ LOCK \G;" command
3) wait 1 hour
4) unlock database tables using "UNLOCK TABLES;" command
5) now errors (see above) appear in the log
Can you please give me any advice how to ensure that JBPM recovers correctly?
Maybe I omited some important configuration in Hibernate/Arjuna/JBPM, Jboss (the JBPM datasource is configured correctly now).
I cannot belive that the JBOSS restart is sufficent solution.
Thanks a lot.
Petr
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/577160#577160]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 1 month
[JCA] - (JCA PoolFiller:) Unable to fill pool
by Werner Dijkerman
Werner Dijkerman [http://community.jboss.org/people/wdijkerman] created the discussion
"(JCA PoolFiller:) Unable to fill pool"
To view the discussion, visit: http://community.jboss.org/message/569127#569127
--------------------------------------------------------------
Hi,
Last weekend we had the following error:
2010-10-29 17:10:10,987 WARN org.jboss.resource.connectionmanager.JBossManagedConnectionPool org.jboss.resource.connectionmanager.JBossManagedConnectionPool (JCA PoolFiller:) Unable to fill pool
org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: Io exception: Connection reset)
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:179)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:565)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.fillToMin(InternalManagedConnectionPool.java:512)
at org.jboss.resource.connectionmanager.PoolFiller.run(PoolFiller.java:74)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.sql.SQLException: Io exception: Connection reset
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
at oracle.jdbc.driver.PhysicalConnection.(T4CConnection.java:165)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:171)
... 4 more
I can't find any information why this was happening. Can somebody explain that?
I Couldn't find any information out there on the web ...
Server: Jboss 4.05 GA
Thanks.
Kind regards,
Werner
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/569127#569127]
Start a new discussion in JCA at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 1 month