[jBPM] New message: "JBPM4.3 jobExecutor threads cause database deadlock exception"
by Zengping Tian
User development,
A new message was posted in the thread "JBPM4.3 jobExecutor threads cause database deadlock exception":
http://community.jboss.org/message/521161#521161
Author : Zengping Tian
Profile : http://community.jboss.org/people/zptian
Message:
--------------------------------------------------------------
Hi
We're trying to run jbpm4.3 + db2, but jobExecutor threads cause database deadlock exception
Any one has similar experience?
Thanks in advice
8:37:17,310 SEV | [AbstractFlushingEventListener] Could not synchronize database state with session
org.hibernate.exception.LockAcquisitionException: pool-1-thread-1: could not update: [org.jbpm.pvm.internal.model.ExecutionImpl#69]
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:105)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2466)
at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2340)
at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2653)
at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:115)
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:321)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1028)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:342)
at $Proxy0.flush(Unknown Source)
at org.jbpm.pvm.internal.tx.HibernateSessionResource.prepare(HibernateSessionResource.java:56)
at org.jbpm.pvm.internal.tx.StandardTransaction.commit(StandardTransaction.java:107)
at org.jbpm.pvm.internal.tx.StandardTransaction.complete(StandardTransaction.java:64)
at org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:61)
at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)
at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)
at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
at org.jbpm.pvm.internal.svc.SkipInterceptor.execute(SkipInterceptor.java:43)
at org.jbpm.pvm.internal.jobexecutor.JobParcel.run(JobParcel.java:48)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
Caused by: com.ibm.db2.jcc.a.SqlException: DB2 SQL error: SQLCODE: -911, SQLSTATE: 40001, SQLERRMC: 2
at com.ibm.db2.jcc.a.lg.e(lg.java:1600)
at com.ibm.db2.jcc.b.gb.s(gb.java:859)
at com.ibm.db2.jcc.b.gb.k(gb.java:387)
at com.ibm.db2.jcc.b.gb.a(gb.java:60)
at com.ibm.db2.jcc.b.w.a(w.java:52)
at com.ibm.db2.jcc.b.wb.b(wb.java:202)
at com.ibm.db2.jcc.a.mg.ab(mg.java:1794)
at com.ibm.db2.jcc.a.mg.d(mg.java:2342)
at com.ibm.db2.jcc.a.mg.W(mg.java:463)
at com.ibm.db2.jcc.a.mg.executeUpdate(mg.java:446)
at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2448)
... 29 more
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/521161#521161
16 years, 3 months
[jBPM] New message: "Re: Ability to configure jBPM in persistence.xml"
by Ronald van Kuijk
User development,
A new message was posted in the thread "Ability to configure jBPM in persistence.xml":
http://community.jboss.org/message/521154#521154
Author : Ronald van Kuijk
Profile : http://community.jboss.org/people/kukeltje
Message:
--------------------------------------------------------------
Marcin,
I currently is not possible out of the box to have jBPM work with JPA. It be done by e.g. changing to using e.g. annotations or a persistence.xml file, but that is probably not all. So unfortunately for the moment it is hibernate (or you have to spend some time on it yourself, we are interested you know ;-)
Btw, is there a specific reason to not wanting to have two config files? Most likely jBPM will have it's own persistence.xml file don't you think so, maybe even it's own datasource so it is replacing one file for another. Or do you want to ditch hibernate complete in favour op TopLink, OracleLink EclipseLink or some other framework :-)
Regarding your second question (next time post it in a new topic please, easer to find then for others based on the subject.
jBPM does not deploy processdefinitions on it's own. Yes it is done trough the jBPM api but that has to be triggered somewhere (e.g. Seam) so find the source of what is triggering the deployment and fix it there.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/521154#521154
16 years, 3 months
[jBPM] New message: "Strange Fork Behavior"
by Andre Muniz
User development,
A new message was posted in the thread "Strange Fork Behavior":
http://community.jboss.org/message/521151#521151
Author : Andre Muniz
Profile : http://community.jboss.org/people/andre.muniz
Message:
--------------------------------------------------------------
Hi!
I'm getting an unexpected behavior on the following test process:
http://community.jboss.org/servlet/JiveServlet/showImage/1815/forkTest.jpg
When task2 is completed and the execution reaches fork2, JBPM 4.3 is duplicating task3, and I'm getting 3 pending tasks instead of two.
Here is the unit test for this process.
package test2;
import java.util.List;
import org.jbpm.api.task.Task;
import org.jbpm.test.JbpmTestCase;
public class ForkTest extends JbpmTestCase {
/** Deployment id. */
String deploymentId;
/**
* Set up.
* @throws Exception exception
*/
protected void setUp() throws Exception {
super.setUp();
// XML definition
StringBuilder jpdl = new StringBuilder();
jpdl.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
jpdl.append("<process key=\"forkTest\" name=\"Fork Test\" xmlns=\"http://jbpm.org/4.3/jpdl\">");
jpdl.append(" <start g=\"7,137,48,48\" name=\"Lease Termination\">");
jpdl.append(" <transition g=\"-43,-18\" name=\"to fork1\" to=\"fork1\"/>");
jpdl.append(" </start>");
jpdl.append(" <end g=\"841,83,48,48\" name=\"end1\"/>");
jpdl.append(" <fork g=\"118,140,48,48\" name=\"fork1\">");
jpdl.append(" <transition g=\"-44,-18\" name=\"to task1\" to=\"task1\"/>");
jpdl.append(" <transition g=\"-44,-18\" name=\"to task2\" to=\"task2\"/>");
jpdl.append(" </fork>");
jpdl.append(" <task candidate-groups=\"leasing\" g=\"231,71,92,52\" name=\"task1\">");
jpdl.append(" <transition name=\"to join2\" to=\"join2\" g=\"-41,-18\"/>");
jpdl.append(" </task>");
jpdl.append(" <task candidate-groups=\"leasing\" g=\"230,225,92,52\" name=\"task2\">");
jpdl.append(" <transition name=\"to fork2\" to=\"fork2\" g=\"-43,-18\"/>");
jpdl.append(" </task>");
jpdl.append(" <task candidate-groups=\"leasing\" g=\"507,188,92,52\" name=\"task3\">");
jpdl.append(" <transition g=\"-41,-18\" name=\"to join1\" to=\"join1\"/>");
jpdl.append(" </task>");
jpdl.append(" <task candidate-groups=\"leasing\" g=\"511,306,92,52\" name=\"task4\">");
jpdl.append(" <transition g=\"-41,-18\" name=\"to join1\" to=\"join1\"/>");
jpdl.append(" </task>");
jpdl.append(" <join g=\"653,244,48,48\" name=\"join1\">");
jpdl.append(" <transition g=\"-44,-18\" name=\"to task5\" to=\"task5\"/>");
jpdl.append(" </join>");
jpdl.append(" <task candidate-groups=\"leasing\" g=\"781,237,92,52\" name=\"task5\">");
jpdl.append(" <transition g=\"-41,-18\" name=\"to join2\" to=\"join2\"/>");
jpdl.append(" </task>");
jpdl.append(" <join g=\"674,80,48,48\" name=\"join2\">");
jpdl.append(" <transition g=\"-42,-18\" name=\"to end1\" to=\"end1\"/>");
jpdl.append(" </join>");
jpdl.append(" <fork g=\"402,232,48,48\" name=\"fork2\">");
jpdl.append(" <transition g=\"-44,-18\" name=\"to task3\" to=\"task3\"/>");
jpdl.append(" <transition g=\"-44,-18\" name=\"to task4\" to=\"task4\"/>");
jpdl.append(" </fork>");
jpdl.append("</process>");
// Deploys the process
deploymentId =
repositoryService.createDeployment().addResourceFromString("forkTest.jpdl.xml", jpdl.toString())
.deploy();
}
/**
* Tear down.
* @throws Exception exception
*/
protected void tearDown() throws Exception {
repositoryService.deleteDeploymentCascade(deploymentId);
super.tearDown();
}
/**
* Tests the process.
*/
public void testProcess() {
// Starts a new process instance
executionService.startProcessInstanceByKey("forkTest");
// Collection to store the pending tasks
List < Task > taskList = null;
// Sets if it's to check the number of tasks after the fork2 (2 tasks - task3 and task4)
boolean checkNumberOfTasks = false;
// Loop
do {
// Gets the pending tasks
taskList = taskService.createTaskQuery().list();
// If it's to check the number of tasks, do it
if (checkNumberOfTasks) {
assertEquals(2, taskList.size());
break;
}
// Iterates the tasks list
for (Task t : taskList) {
// If the execution reaches the task2, changes the boolean, so the next iteration checks the number of tasks
if ("task2".equals(t.getName()))
checkNumberOfTasks = true;
// Completes the task
taskService.completeTask(t.getId());
}
} while (taskList != null && taskList.size() > 0);
}
}
Does anyone have any idea what is going on? Thanks!
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/521151#521151
16 years, 3 months
[jBPM] New message: "Ability to configure jBPM in persistence.xml"
by Marcin Zaj?czkowski
User development,
A new message was posted in the thread "Ability to configure jBPM in persistence.xml":
http://community.jboss.org/message/521148#521148
Author : Marcin Zaj?czkowski
Profile : http://community.jboss.org/people/Szpak
Message:
--------------------------------------------------------------
Hello,
I'm using jBPM 3.3.1 with Seam 2.2.0, JSF 1.2 and Richfaces 3.3.1.
I would like to ask about the following:
is it possible to use jBPM without hibernate.cfg.xml file? I mean, can I configure everything in persistence.xml?
Currently I'm using both files:
- hibernate.cfg.xml for jBPM table mappings + some core hibernate properties
- persistence.xml for other JPA classes
Staying with hibernate.cfg.xml only is an option, be we would prefer to stay with persistence.xml only.
The second question is about startup jBPM configuration processing. After Tomcat startup jBPM loads process definitions. It results in some
database entries. How can we achieve processing this definitions only the first time and than if this definitions are present just skip it?
This causes some problems with process resuming (I have multiple the same process definitions after subsequent Tomcat startups).
Kind regards
Marcin
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/521148#521148
16 years, 3 months
[EJB 3.0] New message: "Get and control the methods list of an ejb at the client side"
by amar slimane
User development,
A new message was posted in the thread "Get and control the methods list of an ejb at the client side":
http://community.jboss.org/message/521138#521138
Author : amar slimane
Profile : http://community.jboss.org/people/slimamar
Message:
--------------------------------------------------------------
Hi,
We 're using JBoss AS 5.1.0.GA and we have several deployed servers but not with the same version.
And when we invoke a method which does not exist in a server we 've got a NullPointer exception :
java.lang.NullPointerException
at org.jboss.ejb3.service.ServiceContainer.dynamicInvoke(ServiceContainer.java:477)
at org.jboss.ejb3.session.InvokableContextClassProxyHack._dynamicInvoke(InvokableContextClassProxyHack.java:53)
at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:91)
at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:891)
at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:744)
at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:697)
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:551)
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:232)
at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:211)
at org.jboss.remoting.Client.invoke(Client.java:1724)
at org.jboss.remoting.Client.invoke(Client.java:629)
at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.security.client.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at rte.gsr.app.jboss.ClientIntercepteur.invoke(ClientIntercepteur.java:114)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)
at $Proxy3.invoke(Unknown Source)
at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:207)
at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:164)
at $Proxy2.toto(Unknown Source)
Is it possible to get and control the methods list of an ejb with the proxy
at the client side (in a interceptor for example).
Thanks in advance.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/521138#521138
16 years, 3 months