[JBoss Cache] - org.jboss.cache.lock.TimeoutException: Unable to acquire lock on Fqn after [0] milliseconds- when trying to do evict on read-only cached Entity
by Vikram Murugesan
Vikram Murugesan [https://community.jboss.org/people/vikrammurugesan] created the discussion
"org.jboss.cache.lock.TimeoutException: Unable to acquire lock on Fqn after [0] milliseconds- when trying to do evict on read-only cached Entity"
To view the discussion, visit: https://community.jboss.org/message/778702#778702
--------------------------------------------------------------
Hello,
We are using JBoss Cache to cache our entities in a clustered JBoss Environment (with 6 nodes mostly. sometimes use 8 nodes). We have JTA configured and most of our ENTITIES are cached in transactional strategy. But there is this one entity that is cached in read-only strategy.
This Entity is mapped to kind of a key/value pair table with just 2 columns (key and value). We maintain this entity in read-only cache intstead of transactional mode because the values in this table are being accessed multiple times. We also performed some JMeter load tests on our application and proved that transactional mode was expensive than readonly.
As this entity is marked readonly, whenever the value of one of this entity is changed, we have a inbuilt framework that does a evict on this entity on all the other JBoss nodes. This way we ensure that the value of the modified entity is the same across all nodes. But here is where we are getting a org.jboss.cache.lock.TimeoutException. If my understanding is right, this exception is thrown as all the JBoss nodes are trying to acquire a lock on the node at the same time when our inbuillt framework tries to evict the node.
To add - we use the default mvcc-entity cache config
*Version Details :*
*
*
JBoss EAP 5.1.2*
*
jbosscache - 3.2.8.GA
hibernate-jbosscache2 - 3.3.2.GA_CP04
*Here is the stacktrace :*
{code}
14:41:10,696 WARN [InvalidationInterceptor] Unable to broadcast evicts as a part of the prepare phase. Rolling back.
org.jboss.cache.lock.TimeoutException: Unable to acquire lock on Fqn [/path/to/entity/ENTITY/path.to.entity.ApplicationProperty#property.key.value] after [0] milliseconds for requestor [Thread[Incoming-19,135.215.109.38:55300,10,Thread Pools]]! Lock held by [GlobalTransaction:<135.215.109.38:55300>:19]
at org.jboss.cache.mvcc.MVCCNodeHelper.acquireLock(MVCCNodeHelper.java:159)
at org.jboss.cache.mvcc.MVCCNodeHelper.wrapNodesRecursivelyForRemoval(MVCCNodeHelper.java:339)
at org.jboss.cache.interceptors.MVCCLockingInterceptor.handleInvalidateCommand(MVCCLockingInterceptor.java:203)
at org.jboss.cache.interceptors.base.PrePostProcessingCommandInterceptor.visitInvalidateCommand(PrePostProcessingCommandInterceptor.java:203)
at org.jboss.cache.commands.write.InvalidateCommand.acceptVisitor(InvalidateCommand.java:125)
at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.jboss.cache.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:131)
at org.jboss.cache.commands.AbstractVisitor.visitInvalidateCommand(AbstractVisitor.java:90)
at org.jboss.cache.commands.write.InvalidateCommand.acceptVisitor(InvalidateCommand.java:125)
at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.jboss.cache.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:131)
at org.jboss.cache.commands.AbstractVisitor.visitInvalidateCommand(AbstractVisitor.java:90)
at org.jboss.cache.commands.write.InvalidateCommand.acceptVisitor(InvalidateCommand.java:125)
at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.jboss.cache.interceptors.TxInterceptor.visitInvalidateCommand(TxInterceptor.java:269)
at org.jboss.cache.commands.write.InvalidateCommand.acceptVisitor(InvalidateCommand.java:125)
at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.jboss.cache.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:131)
at org.jboss.cache.commands.AbstractVisitor.visitInvalidateCommand(AbstractVisitor.java:90)
at org.jboss.cache.commands.write.InvalidateCommand.acceptVisitor(InvalidateCommand.java:125)
at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.jboss.cache.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:178)
at org.jboss.cache.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:130)
at org.jboss.cache.commands.AbstractVisitor.visitInvalidateCommand(AbstractVisitor.java:90)
at org.jboss.cache.commands.write.InvalidateCommand.acceptVisitor(InvalidateCommand.java:125)
at org.jboss.cache.interceptors.InterceptorChain.invokeRemote(InterceptorChain.java:316)
at org.jboss.cache.commands.remote.ReplicateCommand.processSingleCommand(ReplicateCommand.java:139)
at org.jboss.cache.commands.remote.ReplicateCommand.perform(ReplicateCommand.java:115)
at org.jboss.cache.marshall.CommandAwareRpcDispatcher.executeCommand(CommandAwareRpcDispatcher.java:319)
at org.jboss.cache.marshall.InactiveRegionAwareRpcDispatcher.handle(InactiveRegionAwareRpcDispatcher.java:95)
at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:637)
at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:545)
at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:368)
at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:775)
at org.jgroups.JChannel.up(JChannel.java:1336)
at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:454)
at org.jgroups.protocols.pbcast.FLUSH.up(FLUSH.java:490)
at org.jgroups.protocols.pbcast.STATE_TRANSFER.up(STATE_TRANSFER.java:153)
at org.jgroups.protocols.FRAG2.up(FRAG2.java:188)
at org.jgroups.protocols.FC.up(FC.java:473)
at org.jgroups.protocols.pbcast.GMS.up(GMS.java:821)
at org.jgroups.protocols.VIEW_SYNC.up(VIEW_SYNC.java:192)
at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:233)
at org.jgroups.protocols.UNICAST.up(UNICAST.java:328)
at org.jgroups.protocols.pbcast.NAKACK.handleMessage(NAKACK.java:895)
at org.jgroups.protocols.pbcast.NAKACK.up(NAKACK.java:708)
at org.jgroups.protocols.BARRIER.up(BARRIER.java:136)
at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:167)
at org.jgroups.protocols.FD.up(FD.java:284)
at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:328)
at org.jgroups.protocols.MERGE2.up(MERGE2.java:144)
at org.jgroups.protocols.Discovery.up(Discovery.java:264)
at org.jgroups.protocols.PING.up(PING.java:273)
at org.jgroups.protocols.TP$ProtocolAdapter.up(TP.java:2319)
at org.jgroups.protocols.TP.passMessageUp(TP.java:1253)
at org.jgroups.protocols.TP.access$100(TP.java:50)
at org.jgroups.protocols.TP$IncomingPacket.handleMyMessage(TP.java:1830)
at org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1809)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
14:41:10,704 WARN [TxInterceptor] Caught exception, will now set transaction to roll back
org.jboss.cache.lock.TimeoutException: Unable to acquire lock on Fqn [/path/to/entity/ENTITY/path.to.entity.ApplicationProperty#property.key.value] after [0] milliseconds for requestor [Thread[Incoming-19,135.215.109.38:55300,10,Thread Pools]]! Lock held by [GlobalTransaction:<135.215.109.38:55300>:19]
at org.jboss.cache.mvcc.MVCCNodeHelper.acquireLock(MVCCNodeHelper.java:159)
at org.jboss.cache.mvcc.MVCCNodeHelper.wrapNodesRecursivelyForRemoval(MVCCNodeHelper.java:339)
at org.jboss.cache.interceptors.MVCCLockingInterceptor.handleInvalidateCommand(MVCCLockingInterceptor.java:203)
at org.jboss.cache.interceptors.base.PrePostProcessingCommandInterceptor.visitInvalidateCommand(PrePostProcessingCommandInterceptor.java:203)
at org.jboss.cache.commands.write.InvalidateCommand.acceptVisitor(InvalidateCommand.java:125)
at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.jboss.cache.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:131)
at org.jboss.cache.commands.AbstractVisitor.visitInvalidateCommand(AbstractVisitor.java:90)
at org.jboss.cache.commands.write.InvalidateCommand.acceptVisitor(InvalidateCommand.java:125)
at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.jboss.cache.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:131)
at org.jboss.cache.commands.AbstractVisitor.visitInvalidateCommand(AbstractVisitor.java:90)
at org.jboss.cache.commands.write.InvalidateCommand.acceptVisitor(InvalidateCommand.java:125)
at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.jboss.cache.interceptors.TxInterceptor.visitInvalidateCommand(TxInterceptor.java:269)
at org.jboss.cache.commands.write.InvalidateCommand.acceptVisitor(InvalidateCommand.java:125)
at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.jboss.cache.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:131)
at org.jboss.cache.commands.AbstractVisitor.visitInvalidateCommand(AbstractVisitor.java:90)
at org.jboss.cache.commands.write.InvalidateCommand.acceptVisitor(InvalidateCommand.java:125)
at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.jboss.cache.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:178)
at org.jboss.cache.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:130)
at org.jboss.cache.commands.AbstractVisitor.visitInvalidateCommand(AbstractVisitor.java:90)
at org.jboss.cache.commands.write.InvalidateCommand.acceptVisitor(InvalidateCommand.java:125)
at org.jboss.cache.interceptors.InterceptorChain.invokeRemote(InterceptorChain.java:316)
at org.jboss.cache.commands.remote.ReplicateCommand.processSingleCommand(ReplicateCommand.java:139)
at org.jboss.cache.commands.remote.ReplicateCommand.perform(ReplicateCommand.java:115)
at org.jboss.cache.marshall.CommandAwareRpcDispatcher.executeCommand(CommandAwareRpcDispatcher.java:319)
at org.jboss.cache.marshall.InactiveRegionAwareRpcDispatcher.handle(InactiveRegionAwareRpcDispatcher.java:95)
at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:637)
at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:545)
at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:368)
at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:775)
at org.jgroups.JChannel.up(JChannel.java:1336)
at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:454)
at org.jgroups.protocols.pbcast.FLUSH.up(FLUSH.java:490)
at org.jgroups.protocols.pbcast.STATE_TRANSFER.up(STATE_TRANSFER.java:153)
at org.jgroups.protocols.FRAG2.up(FRAG2.java:188)
at org.jgroups.protocols.FC.up(FC.java:473)
at org.jgroups.protocols.pbcast.GMS.up(GMS.java:821)
at org.jgroups.protocols.VIEW_SYNC.up(VIEW_SYNC.java:192)
at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:233)
at org.jgroups.protocols.UNICAST.up(UNICAST.java:328)
at org.jgroups.protocols.pbcast.NAKACK.handleMessage(NAKACK.java:895)
at org.jgroups.protocols.pbcast.NAKACK.up(NAKACK.java:708)
at org.jgroups.protocols.BARRIER.up(BARRIER.java:136)
at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:167)
at org.jgroups.protocols.FD.up(FD.java:284)
at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:328)
at org.jgroups.protocols.MERGE2.up(MERGE2.java:144)
at org.jgroups.protocols.Discovery.up(Discovery.java:264)
at org.jgroups.protocols.PING.up(PING.java:273)
at org.jgroups.protocols.TP$ProtocolAdapter.up(TP.java:2319)
at org.jgroups.protocols.TP.passMessageUp(TP.java:1253)
at org.jgroups.protocols.TP.access$100(TP.java:50)
at org.jgroups.protocols.TP$IncomingPacket.handleMyMessage(TP.java:1830)
at org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1809)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
14:41:10,727 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator_2] TwoPhaseCoordinator.beforeCompletion - failed for com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple@e97df0 Drive beforeCompletion participants.
org.jboss.cache.lock.TimeoutException: Unable to acquire lock on Fqn [/path/to/entity/ENTITY/path.to.entity.ApplicationProperty#property.key.value] after [0] milliseconds for requestor [Thread[Incoming-19,135.215.109.38:55300,10,Thread Pools]]! Lock held by [GlobalTransaction:<135.215.109.38:55300>:19]
at org.jboss.cache.mvcc.MVCCNodeHelper.acquireLock(MVCCNodeHelper.java:159)
at org.jboss.cache.mvcc.MVCCNodeHelper.wrapNodesRecursivelyForRemoval(MVCCNodeHelper.java:339)
at org.jboss.cache.interceptors.MVCCLockingInterceptor.handleInvalidateCommand(MVCCLockingInterceptor.java:203)
at org.jboss.cache.interceptors.base.PrePostProcessingCommandInterceptor.visitInvalidateCommand(PrePostProcessingCommandInterceptor.java:203)
at org.jboss.cache.commands.write.InvalidateCommand.acceptVisitor(InvalidateCommand.java:125)
at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.jboss.cache.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:131)
at org.jboss.cache.commands.AbstractVisitor.visitInvalidateCommand(AbstractVisitor.java:90)
at org.jboss.cache.commands.write.InvalidateCommand.acceptVisitor(InvalidateCommand.java:125)
at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.jboss.cache.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:131)
at org.jboss.cache.commands.AbstractVisitor.visitInvalidateCommand(AbstractVisitor.java:90)
at org.jboss.cache.commands.write.InvalidateCommand.acceptVisitor(InvalidateCommand.java:125)
at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.jboss.cache.interceptors.TxInterceptor.visitInvalidateCommand(TxInterceptor.java:269)
at org.jboss.cache.commands.write.InvalidateCommand.acceptVisitor(InvalidateCommand.java:125)
at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.jboss.cache.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:131)
at org.jboss.cache.commands.AbstractVisitor.visitInvalidateCommand(AbstractVisitor.java:90)
at org.jboss.cache.commands.write.InvalidateCommand.acceptVisitor(InvalidateCommand.java:125)
at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.jboss.cache.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:178)
at org.jboss.cache.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:130)
at org.jboss.cache.commands.AbstractVisitor.visitInvalidateCommand(AbstractVisitor.java:90)
at org.jboss.cache.commands.write.InvalidateCommand.acceptVisitor(InvalidateCommand.java:125)
at org.jboss.cache.interceptors.InterceptorChain.invokeRemote(InterceptorChain.java:316)
at org.jboss.cache.commands.remote.ReplicateCommand.processSingleCommand(ReplicateCommand.java:139)
at org.jboss.cache.commands.remote.ReplicateCommand.perform(ReplicateCommand.java:115)
at org.jboss.cache.marshall.CommandAwareRpcDispatcher.executeCommand(CommandAwareRpcDispatcher.java:319)
at org.jboss.cache.marshall.InactiveRegionAwareRpcDispatcher.handle(InactiveRegionAwareRpcDispatcher.java:95)
at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:637)
at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:545)
at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:368)
at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:775)
at org.jgroups.JChannel.up(JChannel.java:1336)
at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:454)
at org.jgroups.protocols.pbcast.FLUSH.up(FLUSH.java:490)
at org.jgroups.protocols.pbcast.STATE_TRANSFER.up(STATE_TRANSFER.java:153)
at org.jgroups.protocols.FRAG2.up(FRAG2.java:188)
at org.jgroups.protocols.FC.up(FC.java:473)
at org.jgroups.protocols.pbcast.GMS.up(GMS.java:821)
at org.jgroups.protocols.VIEW_SYNC.up(VIEW_SYNC.java:192)
at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:233)
at org.jgroups.protocols.UNICAST.up(UNICAST.java:328)
at org.jgroups.protocols.pbcast.NAKACK.handleMessage(NAKACK.java:895)
at org.jgroups.protocols.pbcast.NAKACK.up(NAKACK.java:708)
at org.jgroups.protocols.BARRIER.up(BARRIER.java:136)
at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:167)
at org.jgroups.protocols.FD.up(FD.java:284)
at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:328)
at org.jgroups.protocols.MERGE2.up(MERGE2.java:144)
at org.jgroups.protocols.Discovery.up(Discovery.java:264)
at org.jgroups.protocols.PING.up(PING.java:273)
at org.jgroups.protocols.TP$ProtocolAdapter.up(TP.java:2319)
at org.jgroups.protocols.TP.passMessageUp(TP.java:1253)
at org.jgroups.protocols.TP.access$100(TP.java:50)
at org.jgroups.protocols.TP$IncomingPacket.handleMyMessage(TP.java:1830)
at org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1809)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
{code}
*Code :*
{code} HibernateUtil.getSessionFactory().evict(ApplicationProperty.class, aPropertyKey); {code}
The above code is being executed by all 6 JBoss nodes simultaneously.
Please provide your thoughts and appreciate if you can help fixing this. I would be glad to provide more info if I have missed any.
Thanks!
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/778702#778702]
Start a new discussion in JBoss Cache at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 12 months
[jBPM] - JBPM TASK ID
by tmmaluleke
tmmaluleke [https://community.jboss.org/people/tmmaluleke] created the discussion
"JBPM TASK ID"
To view the discussion, visit: https://community.jboss.org/message/778584#778584
--------------------------------------------------------------
Hello,
What may be the cause of this of this error of TaskId and where can I find the Task? Please help
at org.jbpm.task.service.TaskServiceSession.getEntity(TaskServiceSession.java:944)
0 27/11 15:00:46,062[Thread-3] ERROR task.service.TaskServerHandler.messageReceived - No Task with ID 1 was found!
javax.persistence.EntityNotFoundException: No Task with ID 1 was found!
at org.jbpm.task.service.TaskServiceSession.getEntity(TaskServiceSession.java:944)
at org.jbpm.task.service.TaskServiceSession.getTask(TaskServiceSession.java:527)
at org.jbpm.task.service.TaskServiceSession.taskOperation(TaskServiceSession.java:406)
at org.jbpm.task.service.TaskServerHandler.messageReceived(TaskServerHandler.java:92)
at org.jbpm.task.service.hornetq.HornetQTaskServerHandler.messageReceived(HornetQTaskServerHandler.java:44)
at org.jbpm.task.service.hornetq.BaseHornetQTaskServer.run(BaseHornetQTaskServer.java:85)
at java.lang.Thread.run(Unknown Source)
at org.jbpm.task.service.TaskServiceSession.getTask(TaskServiceSession.java:527)
at org.jbpm.task.service.TaskServiceSession.taskOperation(TaskServiceSession.java:406)
at org.jbpm.task.service.TaskServerHandler.messageReceived(TaskServerHandler.java:92)
at org.jbpm.task.service.hornetq.HornetQTaskServerHandler.messageReceived(HornetQTaskServerHandler.java:44)
at org.jbpm.task.service.hornetq.BaseHornetQTaskServer.run(BaseHornetQTaskServer.java:85)
at java.lang.Thread.run(Unknown Source)
Cheers
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/778584#778584]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 12 months
[jBPM] - Handle Human Task with custom HumanTaskHandler
by Laura delli Paoli
Laura delli Paoli [https://community.jboss.org/people/lauradp] created the discussion
"Handle Human Task with custom HumanTaskHandler"
To view the discussion, visit: https://community.jboss.org/message/778526#778526
--------------------------------------------------------------
Hello everybody,
I was trying to run a human task with a custom handler, but my handler doesn't work.
Can anyone help me?
Laura
public class TestHumanTask {
public static final void main(String[] args) throws Exception {
startUp();
// load up the knowledge base
KnowledgeBase kbase = readKnowledgeBase();
StatefulKnowledgeSession ksession = JBPMHelper.newStatefulKnowledgeSession(kbase);
//StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
CommandHumanTaskHandler handler = new CommandHumanTaskHandler();
ksession.getWorkItemManager().registerWorkItemHandler("RunAction", handler);
//params
// start a new process instance
ksession.startProcess("com.sample.bpmn.hello");
System.out.println("Process started ...");
}
private static KnowledgeBase readKnowledgeBase() throws Exception {
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add(ResourceFactory.newClassPathResource("sample.bpmn"), ResourceType.BPMN2);
return kbuilder.newKnowledgeBase();
}
private static void startUp() {
JBPMHelper.startH2Server();
JBPMHelper.setupDataSource();
// please comment this line if you already have the task service running,
// for example when running the jbpm-installer
JBPMHelper.startTaskService();
}
}
public class CommandHumanTaskHandler extends HumanTaskHandler{
private static final long serialVersionUID = 1L;
public CommandHumanTaskHandler () {
super();
System.out.println("NEW");
}
public void executeWorkItem(WorkItem workItem, WorkItemManager manager) {
//super.executeWorkItem(workItem, manager);
System.out.println("executing....");
manager.completeWorkItem(workItem.getId(), null);
}
public void complete(WorkItem workItem, Map<String,Object> results){
System.out.println("Completing...");
//super.complete(workItem, results);
}
@Override
public void abortWorkItem(WorkItem arg0, WorkItemManager arg1) {
// TODO Auto-generated method stub
System.out.println("Aborting....");
}
}
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/778526#778526]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 12 months
[Beginner's Corner] - Re: datasource MySql
by Vladica Maric
Vladica Maric [https://community.jboss.org/people/vmaric] created the discussion
"Re: datasource MySql"
To view the discussion, visit: https://community.jboss.org/message/778555#778555
--------------------------------------------------------------
I just deleted -ds.xml file and sed dodeploy. Now I have following logs:
I copied earlier derbyclient.jar file in /WEB-INF/lib/ dir in eclipse is that wrong???
*********And what mean bolded message:
*12:01:03,536 WARN [org.jboss.as.ee] (MSC service thread 1-4) JBAS011001: Could not resolve resource-env-ref java:/MyDerby*
********and another message:
*12:01:05,630 WARNING [javax.enterprise.resource.webcontainer.jsf.managedbean] (MSC service thread 1-1) JSF1074: Managed bean named 'customerBean' has already been registered. Replacing existing managed bean class type corejsf.CustomerBean with corejsf.CustomerBean.*
********My logs as they are in the console:
12:01:02,036 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "BaseProba1.war"
12:01:02,599 WARN [org.jboss.as.server.deployment] (MSC service thread 1-1) Class Path entry derbyLocale_cs.jar in "/C:/jboss-as-7.1.1.Final/standalone/deployments/BaseProba1.war/WEB-INF/lib/derbyclient.jar" does not point to a valid jar for a Class-Path reference.
12:01:02,614 WARN [org.jboss.as.server.deployment] (MSC service thread 1-1) Class Path entry derbyLocale_de_DE.jar in "/C:/jboss-as-7.1.1.Final/standalone/deployments/BaseProba1.war/WEB-INF/lib/derbyclient.jar" does not point to a valid jar for a Class-Path reference.
12:01:02,614 WARN [org.jboss.as.server.deployment] (MSC service thread 1-1) Class Path entry derbyLocale_es.jar in "/C:/jboss-as-7.1.1.Final/standalone/deployments/BaseProba1.war/WEB-INF/lib/derbyclient.jar" does not point to a valid jar for a Class-Path reference.
12:01:02,614 WARN [org.jboss.as.server.deployment] (MSC service thread 1-1) Class Path entry derbyLocale_fr.jar in "/C:/jboss-as-7.1.1.Final/standalone/deployments/BaseProba1.war/WEB-INF/lib/derbyclient.jar" does not point to a valid jar for a Class-Path reference.
12:01:02,614 WARN [org.jboss.as.server.deployment] (MSC service thread 1-1) Class Path entry derbyLocale_hu.jar in "/C:/jboss-as-7.1.1.Final/standalone/deployments/BaseProba1.war/WEB-INF/lib/derbyclient.jar" does not point to a valid jar for a Class-Path reference.
12:01:02,630 WARN [org.jboss.as.server.deployment] (MSC service thread 1-1) Class Path entry derbyLocale_it.jar in "/C:/jboss-as-7.1.1.Final/standalone/deployments/BaseProba1.war/WEB-INF/lib/derbyclient.jar" does not point to a valid jar for a Class-Path reference.
12:01:02,630 WARN [org.jboss.as.server.deployment] (MSC service thread 1-1) Class Path entry derbyLocale_ja_JP.jar in "/C:/jboss-as-7.1.1.Final/standalone/deployments/BaseProba1.war/WEB-INF/lib/derbyclient.jar" does not point to a valid jar for a Class-Path reference.
12:01:02,630 WARN [org.jboss.as.server.deployment] (MSC service thread 1-1) Class Path entry derbyLocale_ko_KR.jar in "/C:/jboss-as-7.1.1.Final/standalone/deployments/BaseProba1.war/WEB-INF/lib/derbyclient.jar" does not point to a valid jar for a Class-Path reference.
12:01:02,630 WARN [org.jboss.as.server.deployment] (MSC service thread 1-1) Class Path entry derbyLocale_pl.jar in "/C:/jboss-as-7.1.1.Final/standalone/deployments/BaseProba1.war/WEB-INF/lib/derbyclient.jar" does not point to a valid jar for a Class-Path reference.
12:01:02,630 WARN [org.jboss.as.server.deployment] (MSC service thread 1-1) Class Path entry derbyLocale_pt_BR.jar in "/C:/jboss-as-7.1.1.Final/standalone/deployments/BaseProba1.war/WEB-INF/lib/derbyclient.jar" does not point to a valid jar for a Class-Path reference.
12:01:02,630 WARN [org.jboss.as.server.deployment] (MSC service thread 1-1) Class Path entry derbyLocale_ru.jar in "/C:/jboss-as-7.1.1.Final/standalone/deployments/BaseProba1.war/WEB-INF/lib/derbyclient.jar" does not point to a valid jar for a Class-Path reference.
12:01:02,630 WARN [org.jboss.as.server.deployment] (MSC service thread 1-1) Class Path entry derbyLocale_zh_CN.jar in "/C:/jboss-as-7.1.1.Final/standalone/deployments/BaseProba1.war/WEB-INF/lib/derbyclient.jar" does not point to a valid jar for a Class-Path reference.
12:01:02,630 WARN [org.jboss.as.server.deployment] (MSC service thread 1-1) Class Path entry derbyLocale_zh_TW.jar in "/C:/jboss-as-7.1.1.Final/standalone/deployments/BaseProba1.war/WEB-INF/lib/derbyclient.jar" does not point to a valid jar for a Class-Path reference.
12:01:02,927 WARN [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015893: Encountered invalid class name 'com.sun.faces.vendor.Tomcat6InjectionProvider:org.apache.catalina.util.DefaultAnnotationProcessor' for service type 'com.sun.faces.spi.injectionprovider'
12:01:02,927 WARN [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015893: Encountered invalid class name 'com.sun.faces.vendor.Jetty6InjectionProvider:org.mortbay.jetty.plus.annotation.InjectionCollection' for service type 'com.sun.faces.spi.injectionprovider'
*12:01:03,536 WARN [org.jboss.as.ee] (MSC service thread 1-4) JBAS011001: Could not resolve resource-env-ref java:/MyDerby*
12:01:03,786 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-4) JBAS010403: Deploying JDBC-compliant driver class org.apache.derby.jdbc.ClientDriver (version 10.9)
12:01:03,911 INFO [org.apache.catalina.core.StandardContext] (MSC service thread 1-1) The listener "com.sun.faces.config.ConfigureListener" is already configured for this context. The duplicate definition has been ignored.
12:01:03,958 INFO [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-1) Initializing Mojarra 2.1.7-jbossorg-1 (20120227-1401) for context '/BaseProba1'
12:01:05,521 INFO [org.hibernate.validator.util.Version] (MSC service thread 1-1) Hibernate Validator 4.2.0.Final
*12:01:05,630 WARNING [javax.enterprise.resource.webcontainer.jsf.managedbean] (MSC service thread 1-1) JSF1074: Managed bean named 'customerBean' has already been registered. Replacing existing managed bean class type corejsf.CustomerBean with corejsf.CustomerBean.*
12:01:06,021 INFO [org.jboss.web] (MSC service thread 1-1) JBAS018210: Registering web context: /BaseProba1
12:01:06,177 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "BaseProba1.war"
******Thanks again.....!!!!!
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/778555#778555]
Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 12 months
[jBPM] - I am facing dealock in concurrent scenarios
by Sachin Francis
Sachin Francis [https://community.jboss.org/people/sachin.francis] created the discussion
"I am facing dealock in concurrent scenarios"
To view the discussion, visit: https://community.jboss.org/message/778546#778546
--------------------------------------------------------------
I am doing create and start of a process, with persistence enabled, in tomcat 7 and oracle DB.
I am doing the operation in 300 concurrent threads.
Randomly i get the following error.
Could someone help me in this?
Please find the trace below
63670 27/11 17:11:02,138[http-8080-Processor1236] ERROR drools.persistence.SingleSessionCommandService.rollbackTransaction - Could not commit session
java.lang.RuntimeException: Unable to commit transaction
at org.drools.persistence.jta.JtaTransactionManager.commit(JtaTransactionManager.java:182)
at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:348)
at org.drools.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:223)
at com.xxxxx.bpm.test.util.JBPMManager.createAndProcessWithSetVariable(JBPMManager.java:63)
at org.apache.jsp.jsp.createProcess_jsp._jspService(createProcess_jsp.java:82)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:662)
Caused by: javax.persistence.PersistenceException: org.hibernate.exception.LockAcquisitionException: Could not execute JDBC batch update
at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:614)
at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:513)
at bitronix.tm.BitronixTransaction.fireBeforeCompletionEvent(BitronixTransaction.java:478)
at bitronix.tm.BitronixTransaction.commit(BitronixTransaction.java:193)
at bitronix.tm.BitronixTransactionManager.commit(BitronixTransactionManager.java:120)
at org.drools.persistence.jta.JtaTransactionManager.commit(JtaTransactionManager.java:179)
... 24 more
Caused by: org.hibernate.exception.LockAcquisitionException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:110)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:266)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167)
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 org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:366)
at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:504)
... 28 more
Caused by: java.sql.BatchUpdateException: ORA-00060: deadlock detected while waiting for resource
at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:674)
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:9394)
at oracle.jdbc.driver.OracleStatementWrapper.executeBatch(OracleStatementWrapper.java:211)
at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:294)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
... 35 more
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/778546#778546]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 12 months
[jBPM] - Installing jbpm 5.3 with guvnor 5.4 issue under jboss 5.1
by Miloud Haimoune
Miloud Haimoune [https://community.jboss.org/people/milhaim] created the discussion
"Installing jbpm 5.3 with guvnor 5.4 issue under jboss 5.1"
To view the discussion, visit: https://community.jboss.org/message/739346#739346
--------------------------------------------------------------
Hi all,
I 'm migrating to jbpm 5.3 witch uses guvnor 5.4
I tried to use jbpm installer and I got the following error :
Caused by: java.lang.ClassNotFoundException: javax.validation.MessageInterpolator$Context
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
I downloaded the jar and added validation-api-1.0.0.GA.jar I got this exception :
javax.inject.DefinitionException: Can't determine type of element <modifies> in bean 'GuvnorBootstrapConfiguration'
at org.jboss.webbeans.xml.checker.beanchildren.ext.AbstractBeanChildrenChecker.checkBeanChild(AbstractBeanChildrenChecker.java:134)
at org.jboss.webbeans.xml.checker.beanchildren.ext.AbstractBeanChildrenChecker.checkChildren(AbstractBeanChildrenChecker.java:89)
......
java.lang.RuntimeException: mapped-name is required for BeanManager of deployment guvnor-5.4.0.Final-jboss-eap-5.1.war
at org.jboss.web.tomcat.service.injection.WebResourceHandler.loadXmlResourceEnvRefs(WebResourceHandler.java:287)
at org.jboss.web.tomcat.service.injection.WebResourceHandler.loadXml(WebResourceHandler.java:325)
at org.jboss.web.tomcat.service.TomcatInjectionContainer.processMetadata(TomcatInjectionContainer.java:550)
at org.jboss.web.tomcat.service.WebCtxLoader.start(WebCtxLoader.java:158)
did anyone had this issue or if you have a solution ?
(I don't want to use tomcat server since my application is running under Jboss 5.1)
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/739346#739346]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 12 months