The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

Don Stadler (74) [Avatar] Offline
#1
I started the mule transaction example. I tried testing it with the junit test, but there was no sign of anything happening on the mule trace.

So I ran the test client. The positive test seemed to work, but the negative test failed to get anything on the DLQ.transaction.in queue. The mule trace is as follows:






[java] TransactionService received message bad transaction
[java] ERROR - DefaultServiceExceptionStrategy -
[java] ********************************************************************
************
[java] Message : Component that caused exception is: Transact
ionalJMSService. Message payload is of type: String
[java] Type : org.mule.api.service.ServiceException
[java] Code : MULE_ERROR--2
[java] Payload : bad transaction
[java] JavaDoc : http://mule.mulesource.org/docs/apidocs/org/
mule/api/service/ServiceException.html
[java] ********************************************************************
************
[java] Exception stack is:
[java] 1. The transaction will fail (java.lang.Exception)
[java] esb.chapter8.transaction.service.TransactionService:10 (null)
[java] 2. Component that caused exception is: TransactionalJMSService. Mess
age payload is of type: String (org.mule.api.service.ServiceException)
[java] org.mule.component.DefaultLifecycleAdapter:214 (http://mule.muleso
urce.org/docs/apidocs/org/mule/api/service/ServiceException.html)
[java] ********************************************************************
************
[java] Root Exception stack trace:
[java] java.lang.Exception: The transaction will fail
[java] at esb.chapter8.transaction.service.TransactionService.processMe
ssage(TransactionService.java:10)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
sorImpl.java:39)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
hodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:597)
[java] at org.mule.model.resolvers.AbstractEntryPointResolver.invokeMet
hod(AbstractEntryPointResolver.java:147)
[java] at org.mule.model.resolvers.ReflectionEntryPointResolver.invoke(
ReflectionEntryPointResolver.java:127)
[java] at org.mule.model.resolvers.DefaultEntryPointResolverSet.invoke(
DefaultEntryPointResolverSet.java:50)
[java] at org.mule.component.DefaultLifecycleAdapter.intercept(DefaultL
ifecycleAdapter.java:202)
[java] at org.mule.component.AbstractJavaComponent.invokeComponentInsta
nce(AbstractJavaComponent.java:84)
[java] at org.mule.component.AbstractJavaComponent.doOnCall(AbstractJav
aComponent.java:75)
[java] at org.mule.component.AbstractComponent.onCall(AbstractComponent
.java:96)
[java] at org.mule.model.seda.SedaService.doSend(SedaService.java:237)
[java] at org.mule.service.AbstractService.sendEvent(AbstractService.ja
va:510)
[java] at org.mule.DefaultMuleSession.sendEvent(DefaultMuleSession.java
:354)
[java] at org.mule.routing.inbound.DefaultInboundRouterCollection.send(
DefaultInboundRouterCollection.java:221)
[java] at org.mule.routing.inbound.DefaultInboundRouterCollection.route
(DefaultInboundRouterCollection.java:181)
[java] at org.mule.transport.AbstractMessageReceiver$DefaultInternalMes
sageListener.onMessage(AbstractMessageReceiver.java:603)
[java] at org.mule.transport.AbstractMessageReceiver.routeMessage(Abstr
actMessageReceiver.java:346)
[java] at org.mule.transport.AbstractReceiverWorker$1.doInTransaction(A
bstractReceiverWorker.java:114)
[java] at org.mule.transaction.TransactionTemplate.execute(TransactionT
emplate.java:99)
[java] at org.mule.transport.AbstractReceiverWorker.doRun(AbstractRecei
verWorker.java:131)
[java] at org.mule.transport.AbstractReceiverWorker.run(AbstractReceive
rWorker.java:62)
[java] at org.mule.work.WorkerContext.run(WorkerContext.java:310)
[java] at org.mule.work.SyncWorkExecutor.doExecute(SyncWorkExecutor.jav
a:41)
[java] at org.mule.work.MuleWorkManager.executeWork(MuleWorkManager.jav
a:269)
[java] at org.mule.work.MuleWorkManager.doWork(MuleWorkManager.java:157
)
[java] at org.mule.transport.jms.MultiConsumerJmsMessageReceiver$SubRec
eiver.onMessage(MultiConsumerJmsMessageReceiver.java:264)
[java] at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQ
MessageConsumer.java:854)
[java] at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQ
SessionExecutor.java:104)
[java] at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQS
essionExecutor.java:171)
[java] at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTas
kRunner.java:120)
[java] at org.apache.activemq.thread.PooledTaskRunner.access$100(Pooled
TaskRunner.java:26)
[java] at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskR
unner.java:47)
[java] at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExec
utor.runWorker(ThreadPoolExecutor.java:1061)
[java] at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExec
utor$Worker.run(ThreadPoolExecutor.java:575)
[java] at java.lang.Thread.run(Thread.java:619)
[java]
[java] ********************************************************************
************
[java]
[java] TransactionService received message bad transaction
[java] ERROR - DefaultServiceExceptionStrategy -
[java] ********************************************************************
************
[java] Message : Component that caused exception is: Transact
ionalJMSService. Message payload is of type: String
[java] Type : org.mule.api.service.ServiceException
[java] Code : MULE_ERROR--2
[java] Payload : bad transaction
[java] JavaDoc : http://mule.mulesource.org/docs/apidocs/org/
mule/api/service/ServiceException.html
[java] ********************************************************************
************
[java] Exception stack is:
[java] 1. The transaction will fail (java.lang.Exception)
[java] esb.chapter8.transaction.service.TransactionService:10 (null)
[java] 2. Component that caused exception is: TransactionalJMSService. Mess
age payload is of type: String (org.mule.api.service.ServiceException)
[java] org.mule.component.DefaultLifecycleAdapter:214 (http://mule.muleso
urce.org/docs/apidocs/org/mule/api/service/ServiceException.html)
[java] ********************************************************************
************
[java] Root Exception stack trace:
[java] java.lang.Exception: The transaction will fail
[java] at esb.chapter8.transaction.service.TransactionService.processMe
ssage(TransactionService.java:10)
[java] at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
hodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:597)
[java] at org.mule.model.resolvers.AbstractEntryPointResolver.invokeMet
hod(AbstractEntryPointResolver.java:147)
[java] at org.mule.model.resolvers.ReflectionEntryPointResolver.invoke(
ReflectionEntryPointResolver.java:127)
[java] at org.mule.model.resolvers.DefaultEntryPointResolverSet.invoke(
DefaultEntryPointResolverSet.java:50)
[java] at org.mule.component.DefaultLifecycleAdapter.intercept(DefaultL
ifecycleAdapter.java:202)
[java] at org.mule.component.AbstractJavaComponent.invokeComponentInsta
nce(AbstractJavaComponent.java:84)
[java] at org.mule.component.AbstractJavaComponent.doOnCall(AbstractJav
aComponent.java:75)
[java] at org.mule.component.AbstractComponent.onCall(AbstractComponent
.java:96)
[java] at org.mule.model.seda.SedaService.doSend(SedaService.java:237)
[java] at org.mule.service.AbstractService.sendEvent(AbstractService.ja
va:510)
[java] at org.mule.DefaultMuleSession.sendEvent(DefaultMuleSession.java
:354)
[java] at org.mule.routing.inbound.DefaultInboundRouterCollection.send(
DefaultInboundRouterCollection.java:221)
[java] at org.mule.routing.inbound.DefaultInboundRouterCollection.route
(DefaultInboundRouterCollection.java:181)
[java] at org.mule.transport.AbstractMessageReceiver$DefaultInternalMes
sageListener.onMessage(AbstractMessageReceiver.java:603)
[java] at org.mule.transport.AbstractMessageReceiver.routeMessage(Abstr
actMessageReceiver.java:346)
[java] at org.mule.transport.AbstractReceiverWorker$1.doInTransaction(A
bstractReceiverWorker.java:114)
[java] at org.mule.transaction.TransactionTemplate.execute(TransactionT
emplate.java:99)
[java] at org.mule.transport.AbstractReceiverWorker.doRun(AbstractRecei
verWorker.java:131)
[java] at org.mule.transport.AbstractReceiverWorker.run(AbstractReceive
rWorker.java:62)
[java] at org.mule.work.WorkerContext.run(WorkerContext.java:310)
[java] at org.mule.work.SyncWorkExecutor.doExecute(SyncWorkExecutor.jav
a:41)
[java] at org.mule.work.MuleWorkManager.executeWork(MuleWorkManager.jav
a:269)
[java] at org.mule.work.MuleWorkManager.doWork(MuleWorkManager.java:157
)
[java] at org.mule.transport.jms.MultiConsumerJmsMessageReceiver$SubRec
eiver.onMessage(MultiConsumerJmsMessageReceiver.java:264)
[java] at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQ
MessageConsumer.java:854)
[java] at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQ
SessionExecutor.java:104)
[java] at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQS
essionExecutor.java:171)
[java] at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTas
kRunner.java:120)
[java] at org.apache.activemq.thread.PooledTaskRunner.access$100(Pooled
TaskRunner.java:26)
[java] at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskR
unner.java:47)
[java] at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExec
utor.runWorker(ThreadPoolExecutor.java:1061)
[java] at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExec
utor$Worker.run(ThreadPoolExecutor.java:575)
[java] at java.lang.Thread.run(Thread.java:619)
[java]
[java] ********************************************************************
************
[java]
[java] TransactionService received message bad transaction
[java] ERROR - DefaultServiceExceptionStrategy -
[java] ********************************************************************
************
[java] Message : Component that caused exception is: Transact
ionalJMSService. Message payload is of type: String
[java] Type : org.mule.api.service.ServiceException
[java] Code : MULE_ERROR--2
[java] Payload : bad transaction
[java] JavaDoc : http://mule.mulesource.org/docs/apidocs/org/
mule/api/service/ServiceException.html
[java] ********************************************************************
************
[java] Exception stack is:
[java] 1. The transaction will fail (java.lang.Exception)
[java] esb.chapter8.transaction.service.TransactionService:10 (null)
[java] 2. Component that caused exception is: TransactionalJMSService. Mess
age payload is of type: String (org.mule.api.service.ServiceException)
[java] org.mule.component.DefaultLifecycleAdapter:214 (http://mule.muleso
urce.org/docs/apidocs/org/mule/api/service/ServiceException.html)
[java] ********************************************************************
************
[java] Root Exception stack trace:
[java] java.lang.Exception: The transaction will fail
[java] at esb.chapter8.transaction.service.TransactionService.processMe
ssage(TransactionService.java:10)
[java] at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
hodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:597)
[java] at org.mule.model.resolvers.AbstractEntryPointResolver.invokeMet
hod(AbstractEntryPointResolver.java:147)
[java] at org.mule.model.resolvers.ReflectionEntryPointResolver.invoke(
ReflectionEntryPointResolver.java:127)
[java] at org.mule.model.resolvers.DefaultEntryPointResolverSet.invoke(
DefaultEntryPointResolverSet.java:50)
[java] at org.mule.component.DefaultLifecycleAdapter.intercept(DefaultL
ifecycleAdapter.java:202)
[java] at org.mule.component.AbstractJavaComponent.invokeComponentInsta
nce(AbstractJavaComponent.java:84)
[java] at org.mule.component.AbstractJavaComponent.doOnCall(AbstractJav
aComponent.java:75)
[java] at org.mule.component.AbstractComponent.onCall(AbstractComponent
.java:96)
[java] at org.mule.model.seda.SedaService.doSend(SedaService.java:237)
[java] at org.mule.service.AbstractService.sendEvent(AbstractService.ja
va:510)
[java] at org.mule.DefaultMuleSession.sendEvent(DefaultMuleSession.java
:354)
[java] at org.mule.routing.inbound.DefaultInboundRouterCollection.send(
DefaultInboundRouterCollection.java:221)
[java] at org.mule.routing.inbound.DefaultInboundRouterCollection.route
(DefaultInboundRouterCollection.java:181)
[java] at org.mule.transport.AbstractMessageReceiver$DefaultInternalMes
sageListener.onMessage(AbstractMessageReceiver.java:603)
[java] at org.mule.transport.AbstractMessageReceiver.routeMessage(Abstr
actMessageReceiver.java:346)
[java] at org.mule.transport.AbstractReceiverWorker$1.doInTransaction(A
bstractReceiverWorker.java:114)
[java] at org.mule.transaction.TransactionTemplate.execute(TransactionT
emplate.java:99)
[java] at org.mule.transport.AbstractReceiverWorker.doRun(AbstractRecei
verWorker.java:131)
[java] at org.mule.transport.AbstractReceiverWorker.run(AbstractReceive
rWorker.java:62)
[java] at org.mule.work.WorkerContext.run(WorkerContext.java:310)
[java] at org.mule.work.SyncWorkExecutor.doExecute(SyncWorkExecutor.jav
a:41)
[java] at org.mule.work.MuleWorkManager.executeWork(MuleWorkManager.jav
a:269)
[java] at org.mule.work.MuleWorkManager.doWork(MuleWorkManager.java:157
)
[java] at org.mule.transport.jms.MultiConsumerJmsMessageReceiver$SubRec
eiver.onMessage(MultiConsumerJmsMessageReceiver.java:264)
[java] at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQ
MessageConsumer.java:854)
[java] at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQ
SessionExecutor.java:104)
[java] at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQS
essionExecutor.java:171)
[java] at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTas
kRunner.java:120)
[java] at org.apache.activemq.thread.PooledTaskRunner.access$100(Pooled
TaskRunner.java:26)
[java] at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskR
unner.java:47)
[java] at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExec
utor.runWorker(ThreadPoolExecutor.java:1061)
[java] at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExec
utor$Worker.run(ThreadPoolExecutor.java:575)
[java] at java.lang.Thread.run(Thread.java:619)
[java]
[java] ********************************************************************
************
[java]
[java] TransactionService received message bad transaction
[java] ERROR - DefaultServiceExceptionStrategy -
[java] ********************************************************************
************
[java] Message : Component that caused exception is: Transact
ionalJMSService. Message payload is of type: String
[java] Type : org.mule.api.service.ServiceException
[java] Code : MULE_ERROR--2
[java] Payload : bad transaction
[java] JavaDoc : http://mule.mulesource.org/docs/apidocs/org/
mule/api/service/ServiceException.html
[java] ********************************************************************
************
[java] Exception stack is:
[java] 1. The transaction will fail (java.lang.Exception)
[java] esb.chapter8.transaction.service.TransactionService:10 (null)
[java] 2. Component that caused exception is: TransactionalJMSService. Mess
age payload is of type: String (org.mule.api.service.ServiceException)
[java] org.mule.component.DefaultLifecycleAdapter:214 (http://mule.muleso
urce.org/docs/apidocs/org/mule/api/service/ServiceException.html)
[java] ********************************************************************
************
[java] Root Exception stack trace:
[java] java.lang.Exception: The transaction will fail
[java] at esb.chapter8.transaction.service.TransactionService.processMe
ssage(TransactionService.java:10)
[java] at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
hodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:597)
[java] at org.mule.model.resolvers.AbstractEntryPointResolver.invokeMet
hod(AbstractEntryPointResolver.java:147)
[java] at org.mule.model.resolvers.ReflectionEntryPointResolver.invoke(
ReflectionEntryPointResolver.java:127)
[java] at org.mule.model.resolvers.DefaultEntryPointResolverSet.invoke(
DefaultEntryPointResolverSet.java:50)
[java] at org.mule.component.DefaultLifecycleAdapter.intercept(DefaultL
ifecycleAdapter.java:202)
[java] at org.mule.component.AbstractJavaComponent.invokeComponentInsta
nce(AbstractJavaComponent.java:84)
[java] at org.mule.component.AbstractJavaComponent.doOnCall(AbstractJav
aComponent.java:75)
[java] at org.mule.component.AbstractComponent.onCall(AbstractComponent
.java:96)
[java] at org.mule.model.seda.SedaService.doSend(SedaService.java:237)
[java] at org.mule.service.AbstractService.sendEvent(AbstractService.ja
va:510)
[java] at org.mule.DefaultMuleSession.sendEvent(DefaultMuleSession.java
:354)
[java] at org.mule.routing.inbound.DefaultInboundRouterCollection.send(
DefaultInboundRouterCollection.java:221)
[java] at org.mule.routing.inbound.DefaultInboundRouterCollection.route
(DefaultInboundRouterCollection.java:181)
[java] at org.mule.transport.AbstractMessageReceiver$DefaultInternalMes
sageListener.onMessage(AbstractMessageReceiver.java:603)
[java] at org.mule.transport.AbstractMessageReceiver.routeMessage(Abstr
actMessageReceiver.java:346)
[java] at org.mule.transport.AbstractReceiverWorker$1.doInTransaction(A
bstractReceiverWorker.java:114)
[java] at org.mule.transaction.TransactionTemplate.execute(TransactionT
emplate.java:99)
[java] at org.mule.transport.AbstractReceiverWorker.doRun(AbstractRecei
verWorker.java:131)
[java] at org.mule.transport.AbstractReceiverWorker.run(AbstractReceive
rWorker.java:62)
[java] at org.mule.work.WorkerContext.run(WorkerContext.java:310)
[java] at org.mule.work.SyncWorkExecutor.doExecute(SyncWorkExecutor.jav
a:41)
[java] at org.mule.work.MuleWorkManager.executeWork(MuleWorkManager.jav
a:269)
[java] at org.mule.work.MuleWorkManager.doWork(MuleWorkManager.java:157
)
[java] at org.mule.transport.jms.MultiConsumerJmsMessageReceiver$SubRec
eiver.onMessage(MultiConsumerJmsMessageReceiver.java:264)
[java] at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQ
MessageConsumer.java:854)
[java] at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQ
SessionExecutor.java:104)
[java] at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQS
essionExecutor.java:171)
[java] at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTas
kRunner.java:120)
[java] at org.apache.activemq.thread.PooledTaskRunner.access$100(Pooled
TaskRunner.java:26)
[java] at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskR
unner.java:47)
[java] at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExec
utor.runWorker(ThreadPoolExecutor.java:1061)
[java] at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExec
utor$Worker.run(ThreadPoolExecutor.java:575)
[java] at java.lang.Thread.run(Thread.java:619)
[java]
[java] ********************************************************************
************
[java]