Hide Forgot
Date of First Response: 2010-03-18 05:33:42 project_key: SOA http://localhost:8080/seam-dvdstore/ shop for a DVD, process all the way through checkout application is nearly identical to the one shown here: http://www.redhat.com/v/webcast/SOAdemo2/SOADemo2.html DVDStore comes from the Seam directory but is modified with an interceptor to "wiretap" the shopping cart and route orders to a JMS queue which is picked up by the ESB. Error message is: 11:30:22,832 ERROR [JmsServerSession] Unexpected error delivering message delegator->JBossMessage[5196460123226116]:PERSISTENT, deliveryId=0 org.jbpm.JbpmException: cannot mark externally managed transaction for rollback at org.jbpm.persistence.db.DbPersistenceService.endTransaction(DbPersistenceService.java:129) at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:201) at org.jbpm.svc.Services.close(Services.java:247) at org.jbpm.JbpmContext.close(JbpmContext.java:131) at org.jbpm.command.impl.CommandServiceImpl.execute(CommandServiceImpl.java:79) at org.jboss.soa.esb.services.jbpm.cmd.CommandExecutor.executeJbpmCommand(CommandExecutor.java:279) at org.jboss.soa.esb.services.jbpm.cmd.CommandExecutor.access$100(CommandExecutor.java:51) at org.jboss.soa.esb.services.jbpm.cmd.CommandExecutor$3.execute(CommandExecutor.java:136) at org.jboss.soa.esb.services.jbpm.actions.JBpmCallback.process(JBpmCallback.java:68) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.jboss.soa.esb.listeners.message.ActionProcessorMethodInfo.processMethods(ActionProcessorMethodInfo.java:102) at org.jboss.soa.esb.listeners.message.OverriddenActionLifecycleProcessor.process(OverriddenActionLifecycleProcessor.java:74) at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:634) at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:588) at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:419) at org.jboss.soa.esb.listeners.jca.JcaMessageAwareListener.process(JcaMessageAwareListener.java:163) at org.jboss.soa.esb.listeners.jca.JcaJMSInflowMessageProcessorAdapter.onMessage(JcaJMSInflowMessageProcessorAdapter.java:44) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.jboss.soa.esb.listeners.jca.BaseJcaInflow$1.invoke(BaseJcaInflow.java:205) at org.jboss.soa.esb.listeners.jca.EndpointProxy.delivery(EndpointProxy.java:258) at org.jboss.soa.esb.listeners.jca.EndpointProxy.invoke(EndpointProxy.java:150) at $Proxy225.onMessage(Unknown Source) at org.jboss.resource.adapter.jms.inflow.JmsServerSession.onMessage(JmsServerSession.java:179) at org.jboss.jms.client.container.ClientConsumer.callOnMessageStatic(ClientConsumer.java:160) at org.jboss.jms.client.container.SessionAspect.handleRun(SessionAspect.java:831) at org.jboss.aop.advice.org.jboss.jms.client.container.SessionAspect_z_handleRun_16177011.invoke(SessionAspect_z_handleRun_16177011.java) at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java) at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170) at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86) at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java) at org.jboss.jms.client.delegate.ClientSessionDelegate.run(ClientSessionDelegate.java) at org.jboss.jms.client.JBossSession.run(JBossSession.java:199) at org.jboss.resource.adapter.jms.inflow.JmsServerSession.run(JmsServerSession.java:236) at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:205) at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:260) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
boot.log and server.log after clean installation, installation of the demo app and execution to show the error messages
Attachment: Added: log.zip
DVD Store binary - drop 3 files into your deploy directory
Attachment: Added: dvdstore-orders-queue-service.xml Attachment: Added: jboss-seam-dvdstore-ds.xml Attachment: Added: jboss-seam-dvdstore.ear
JBoss ESB application The attached zip should be unzipped and dropped into deploy directory
Attachment: Added: DVD_Pet_StoreDemo_5.0.0.esb.zip
Attached an image of the deploy directory
Attachment: Added: Demo_deploy.png
JBDS3 Project attached as DVD_Pet_StoreDemo_5.0.0.zip
Attachment: Added: DVD_Pet_StoreDemo_5.0.0.zip
Attach is a zipped JBDS 3.0 CR2 Project. unzip and then use File-Import The way to operate the demo is to place a copy of file_sample_order.xml into /tmp/inboundOrders for the File_Stater_Service - it will transform and route to Starter_Service which is normally how DVDStore starts this up. and don't forget to first deploy the jBPM Process (similar to bpm_orchestration4) via JBDS Graphical Process Designer ERROR [JmsServerSession] Unexpected error delivering message delegator->JBossMessage[5196979216547898]:PERSISTENT, deliveryId=8 org.jbpm.JbpmException: cannot mark externally managed transaction for rollback at org.jbpm.persistence.db.DbPersistenceService.endTransaction(DbPersistenceService.java:129) at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:201) at org.jbpm.svc.Services.close(Services.java:247) at org.jbpm.JbpmContext.close(JbpmContext.java:131) at org.jbpm.command.impl.CommandServiceImpl.execute(CommandServiceImpl.java:79) at org.jboss.soa.esb.services.jbpm.cmd.CommandExecutor.executeJbpmCommand(CommandExecutor.java:279) at org.jboss.soa.esb.services.jbpm.cmd.CommandExecutor.access$100(CommandExecutor.java:51) at org.jboss.soa.esb.services.jbpm.cmd.CommandExecutor$3.execute(CommandExecutor.java:136) at org.jboss.soa.esb.services.jbpm.actions.JBpmCallback.process(JBpmCallback.java:68)
Attachment: Added: DVD_Pet_StoreDemo_5.0.0_broken3.zip
The exception is a bug in the jBPM class but it occurs because the encompassing transaction has been marked for rollback. There are, therefore, two issues - fix the bug in the jBPM codebase - find out why the transaction has been marked for roll back. My guess for the second is that there has been a hibernate 'stale state' issue and that the jBPM codebase should just be rolling back the transaction and allowing the JCA inflow to redeliver.
Also, it appears from the exception that this is being reported by the JCA inflow. If that is the case then the message should have been redelivered, do we know if this happens?
The logs would suggest it is being retried, eventually ending up in the DLQ. If this was just a 'stale state' exception then I would expect one of the retries to have succeeded. As there are multiple jBPM classes then another possibility could be that something has 'leaked' out of the DVD store into the external process, probably a class loaded with a separate classloader.
The issue (as I'm seeing it in a debugger) is that the JbpmCallBack service is trying to deserialize an OrderHeader object instance from the ESB message (as part of a process of mapping objects from the message and into jBPM for process execution I think) and is choking because it doesn't have access to the OrderHeader type (CNF Exception).
Is this already captured in documentation? If not, check back with Kevin and he will help write something up. Candidate for SOA 5.1.0
This is a nice to have for SOA 5.1.0. Kevin to provide docs input.
This is a docs issue, I will provide some input.
Link: Added: This issue depends JBESB-3579
Added a warning to the section within Services Guide
David can you get these changes merged in and staged today please
Release Notes Docs Status: Added: Not Required Release Notes Text: Added: Merged into downstream product document.
Writer: Added: dlesage