[JBoss jBPM] - Re: Multithreaded JobExecutor with ForEachForkActionHandler
by kadlecp
in discussion http://www.jboss.com/index.html?module=bb&op=viewtopic&t=109636 Alex wrote
anonymous wrote :
| well, next problem, on a join node all incoming branches try to update the parent token, which fails
|
I think that that's my problem. This code in org.jbpm.graph.node.Join crashes when multiple threads are used in JobExecutor
| LockMode lockMode = LockMode.FORCE;
| if (parentLockMode!=null) {
| lockMode = LockMode.parse(parentLockMode);
| }
| log.debug("forcing version increment on parent token "+parentToken);
| session.flush(); // here it sometimes crashes, receive StaleObjectStateException
| session.lock(parentToken, lockMode); // here it sometimes crashes, StaleObjectStateException
|
I tried to remove this code (I think I can see why this code is there) just to see if it's only problem. Unfortunately I received another exception related to org.hibernate.StaleObjectStateException
| 16:27:08,826 ERROR [AbstractFlushingEventListener] Could not synchronize database state with session
| org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect):
| xe.Token#67]
| at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1769)
| at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2412)
| at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2312)
| at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2612)
| at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:96)
| at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
| at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)
| at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168)
| at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
| 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:91)
| at org.jbpm.persistence.jta.JtaDbPersistenceService.close(JtaDbPersistenceService.java:61)
| at org.jbpm.svc.Services.close(Services.java:223)
| at org.jbpm.JbpmContext.close(JbpmContext.java:139)
| at org.jbpm.job.executor.JobExecutorThread.executeJob(JobExecutorThread.java:193)
| at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:64)
| 16:27:08,938 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator_2] TwoPhaseCoordinator.beforeCompletion -
| una.ats.internal.jta.resources.arjunacore.SynchronizationImple@1726337
| org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect):
| xe.Token#67]
| at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1769)
| at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2412)
| at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2312)
| at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2612)
| at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:96)
| at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
| at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)
| at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168)
| at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
| 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:91)
| at org.jbpm.persistence.jta.JtaDbPersistenceService.close(JtaDbPersistenceService.java:61)
| at org.jbpm.svc.Services.close(Services.java:223)
| at org.jbpm.JbpmContext.close(JbpmContext.java:139)
| at org.jbpm.job.executor.JobExecutorThread.executeJob(JobExecutorThread.java:193)
| at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:64)
| 16:27:09,056 ERROR [Services] problem closing service 'persistence'
| org.jbpm.JbpmException: couldn't commit JTA transaction
| at org.jbpm.persistence.jta.JtaDbPersistenceService.endJtaTransaction(JtaDbPersistenceService.java:93)
| at org.jbpm.persistence.jta.JtaDbPersistenceService.close(JtaDbPersistenceService.java:61)
| at org.jbpm.svc.Services.close(Services.java:223)
| at org.jbpm.JbpmContext.close(JbpmContext.java:139)
| at org.jbpm.job.executor.JobExecutorThread.executeJob(JobExecutorThread.java:193)
| at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:64)
| Caused by: javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.a
| ansaction.arjunacore.commitwhenaborted] Can't commit because the transaction is in aborted state
| at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1401)
| 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:91)
| ... 5 more
| Caused by: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was
| bpm.graph.exe.Token#67]
| at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1769)
| at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2412)
| at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2312)
| at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2612)
| at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:96)
| at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
| at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)
| at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168)
| at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
| 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)
| ... 9 more
| 16:27:09,195 ERROR [JobExecutorThread] exception in job executor thread. waiting 5000 milliseconds
| org.jbpm.JbpmException: couldn't commit JTA transaction
| at org.jbpm.persistence.jta.JtaDbPersistenceService.endJtaTransaction(JtaDbPersistenceService.java:93)
| at org.jbpm.persistence.jta.JtaDbPersistenceService.close(JtaDbPersistenceService.java:61)
| at org.jbpm.svc.Services.close(Services.java:223)
| at org.jbpm.JbpmContext.close(JbpmContext.java:139)
| at org.jbpm.job.executor.JobExecutorThread.executeJob(JobExecutorThread.java:193)
| at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:64)
| Caused by: javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.a
| ansaction.arjunacore.commitwhenaborted] Can't commit because the transaction is in aborted state
| at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1401)
| 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:91)
| ... 5 more
| Caused by: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was
| bpm.graph.exe.Token#67]
| at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1769)
| at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2412)
| at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2312)
| at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2612)
| at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:96)
| at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
| at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)
| at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168)
| at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
| 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)
| ... 9 more
|
Related JIRA is "concurrent process execution fails"
http://jira.jboss.com/jira/browse/JBPM-983
I have read story about JIRA http://jira.jboss.com/jira/browse/JBPM-995, but I do not have problems with job acquirement.
Thank you for comments
Pavel
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4157051#4157051
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4157051
17 years, 10 months
[JBoss Messaging] - Hot deploy of an ear containing a QueueBrowser showing Class
by knaas
JBM rocks by the way. This is the first big issue we have encountered in months of usage.
We have an application with a QueueBrowser that consumes from a JBM queue that at this point contains only ObjectMessages. The ObjectMessage contains a basic custom class that is part of the ear. The first time the application is deployed, messages are browsed correctly from the queue. After a hot deploy, we can no longer browse the queue.
I am not very familiar with the internals of JBM, but here is what I found while debugging. We are using JBoss 4.2 with JBM 1.4.0-SP3-CP01.
This is the code:
| //various setup code for the session all within a try/finally that ultimately closes the QueueBrowser, QueueSession, and QueueConnection
| final Enumeration enumerator = browser.getEnumeration();
| while (enumerator.hasMoreElements())
| {
| final ObjectMessage message = (ObjectMessage) enumerator.nextElement();
|
| final Object messageObject = message.getObject();
|
| if (messageObject instanceof CustomObject)
| {
| // code path on a fresh server
| }
| else
| {
| // code path after a redeploy
| }
| }
|
1. After a redeploy the messageObject is a CustomObject, but its from a dead ClassLoader (likely the undeployed ear). I think it's dead because when I print it out, it says "org.jboss.mx.loading.UnifiedClassLoader3@a79114{ url=null ,addedOrder=41}". The classloader of CustomObject prints out as "org.jboss.mx.loading.UnifiedClassLoader3@fff327{ url=file:/C:/jboss/jboss-4.2/server/default/tmp/deploy/tmp31717application.ear ,addedOrder=43}". This explains why the else state executes.
2. On a fresh start of the server, if I debug into the "message.getObject()" call, it eventually lands in MessageSupport.getPayload(), which because the payload is null and the payloadAsByteArray is not, goes into StreamUtils.readObject. Eventually the object is deserialized and returned to the client.
3. On a redeploy, when I debug into the "message.getObject()" method, it lands in MessageSupport.getPayload() but now the payload is not null and the payloadAsByteArray is null. It returns the payload that is associated to the dead classloader immediately.
It seems like a cached Message is being returned, one that was previously deserialized with the original deployed ear's ClassLoader. And since it is a different ClassLoader, we end up with the invalid codepath being following.
I could probably code up a workaround that uses reflection to process the Message's object.
Any thoughts as to what is happening?
Is there a way to override the cached payload behavior?
Is there additional work that can be down to shutdown the QueueBrowser/QueueSession such that the Queue is reset to the original state?
Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4157041#4157041
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4157041
17 years, 10 months
[Security & JAAS/JBoss] - Multi-threaded login process causing loss of TLS data
by logicmason
Hi All,
I've been having an issue regarding JBoss spreading the login process over multiple threads (from what I can see), and as a result some thread local storage (TLS) data I save while the first thread is active, then causes me to not be authenticated when the second thread takes over (since it is no longer on that thread).
I've had to implement a client authentication single-sign (SSO) on mechanism for a project I'm working on, and due to a customer requirement, all clients must share the same client certificate, so I can't use the certificate to gain username details. I've worked around this by adding the encrypted username as an attribute in the URL, then decoded this and stored it in TLS using a Valve. Then when JAAS rolls around, I just look in this TLS store and retrieve my username. Now, this has worked fine, and without any issue, until it turns out that some components still need to be username/password authenticated, regardless of the SSO status.
Now, again, I've worked around this by modifying the security domain on the ejb-jars to use the old authentication method (a custom LDAP login module, by the way) and during this authentication process, set up the TLS stores and the like, to mimic the effect of actually having logged using a certificate. This works 95% of the time, but every now and them I can see the TLS store is empty when the callback goes to retrieve the username, and I notice that it is being handled by two separate threads, which would explain why.
My question is - I'm not very sure about the multi-threaded nature of the JBoss/JAAS login process (I always assumed it was a single login thread, indeed, maybe it is and what I'm seeing is related to something else) but does this issue sound familar to anyone, or are there any resources or advice anyone can lend to me?
Cheers,
LM.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4157039#4157039
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4157039
17 years, 10 months
[JBoss Tools (users)] - Bug Highlights in JBoss Tools 2.1.1.GA
by bbeloff
Hi
Plenty of bugs in the project archive parts of JBoss Tools 2.1.1.GA. The following prevent the tools from being usable:
* Corrupted project archive specifications - After an archive is created, it may subsequently be corrupted such that it cannot be viewed in the Project archives window. At this point, it is still visible as deployed under the server, but it is absent.
* Build archive (full) - this sometimes causes a null pointer exception, with no further explanation.
* Failed updates - sometimes changes in the source code trigger redeployment of the archive, but the archive does not appear to contain the updated code.
* Multiple deployments of the same archive? - If you select "Deploy to Server" against an ear file, then it will sometimes be shown correctly under the server(in the servers view). Sometimes it appears twice, with two different icons.
* Spinning ball - sometimes when interrogating an archive or archives, Eclipse becomes unresponsive for long periods, for no apparent reason.
* Installation problems - If you do an Eclipse software update to obtain JBoss Tools 2.1.1.GA, you end up with both the old (in my case JBoss Tools 2.10.1.GA) and new features and plugins elements. The above bugs happen irrespective of whether both or only the new versions are present.
My system: Mac OS X 10.5.3, Eclipse 3.3.2.
I have had similar problems with previous version, but this seems the most unstable.
Does anyone have any comments?
Bruno.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4157026#4157026
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4157026
17 years, 10 months
[Security & JAAS/JBoss] - Multiple Principal not working - JBoss 4.2.1
by jbosexplorer
Hi There,
I'm using JBoss 4.2.1 and doing LDAP Authentication (j_security_check) in my web application. I've the following snippet in web.xml
<security-role>
| <role-name>Admin_View</role-name>
| </security-role>
| <security-role>
| <role-name>AdminStandard</role-name>
| </security-role>...
and, the following in jboss-web.xml.
<security-role>
| <role-name>Admin_View</role-name>
| <principal-name>AdminStandard</principal-name>
| <principal-name>AdminAuthoriser</principal-name>
| <principal-name>AdminSuperUser</principal-name>
| </security-role>
In my java code, I'm doing the following for a user in AdminStandard group in LDAP,
if(this.getRequest().isUserInRole("Admin_View"))
| {
| forward = "adminsuccess";
| }
it's not going thru' the loop. when I debugged, the condn returns false. any idea why?
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4157025#4157025
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4157025
17 years, 10 months
Delivery Status Notification (Failure)
by postmaster@lists.jboss.org
This is an automatically generated Delivery Status Notification.
Unable to deliver message to the following recipients, because the message was forwarded more than the maximum allowed times. This could indicate a mail loop.
syqkqfocabkpnqnrwbw(a)technodom.kz
17 years, 10 months