camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Borner <mark.bor...@zurich.com.au>
Subject Re: Camel Websphere MQ Error 2012
Date Wed, 08 Dec 2010 02:56:11 GMT
I have.  
http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.amqzao.doc/fm12190_.htm

It was no help.  I'm not running on z/OS, therefore the suggested action 
is:

1)  Link the application with the correct libraries (threaded or 
nonthreaded).
        I'm running under WAS using the "WebSphere MQ messaging provider " 
which has no configuration options.  I also have other Spring applications 
running successfully on this environment.

2)  Remove from the application the call that is not supported.
        It's failing on a commit.  Can't really remove that call :-)

I mainly wanted to know if anyone could see something obviously wrong with 
what I was trying to do.

I've traced out the transactions and it looks ok to me.  I've traced out 
MQ and the XACOMMIT call is successful, but the MQCMIT call is failing. 
I'm leaning towards this being a Websphere MQ issue.  I'm going to raise a 
support request when I get back from holidays.

Thanks,
Mark

Mark Borner
Java Developer - ZStream Xpress



From:
Claus Ibsen <claus.ibsen@gmail.com>
To:
users@camel.apache.org
Date:
07/12/2010 07:36 PM
Subject:
Re: Camel Websphere MQ Error 2012



Obviously you should check out first with IBM what that MQ error code 
means.


On Tue, Dec 7, 2010 at 6:03 AM, Mark Borner 
<mark.borner@zurich.com.au>wrote:

>
> Hi all:
>
> I've been reading up on how to configure Camel for use under Websphere 
and
> Websphere MQ.  I've gotten things working except for a nagging error:
>  com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2012
>
> The route that is having the problem is reading from a DB and putting 
the
> messages onto a queue:
>
>
> 
from("jpa:au.com.zurich.phoenix.i90.entity.ExportMessage?consumeDelete=false&transactionManager=#transactionManager&consumer.delay=30000&consumer.namedQuery=received")
>     .routeId("ExportQueueProducerRoute")
>     .transacted()
>     .process(new Processor() {
>         private XMLOutputter outputter = new
> XMLOutputter(Format.getCompactFormat());
>
>         public void process(Exchange exchange) throws Exception {
>             ExportMessage exportMessage =
> exchange.getIn().getBody(ExportMessage.class);
>             // Set the status to Queued so the message doesn't get 
picked
> up again!
>             exportMessage.setStatus(MessageStatuses.QUEUED);
>             // Set out body to the policy XML
>             XmlAttachment attachment = (XmlAttachment)
> exportMessage.getAttachments().iterator().next();
>
> 
exchange.getIn().setBody(outputter.outputString(attachment.getDocument()));
>             // Set all the headers so they end up on the queued message
>             exchange.getIn().setHeader(TRANSACTION_ID,
> exportMessage.getTransactionId());
>             exchange.getIn().setHeader(INTERNAL_ID,
> exportMessage.getInternalId());
>         }
>     })
>     .to(ExchangePattern.InOnly,
> 
"jms:queue:exportQueue?taskExecutor=#taskExecutor&transactionManager=#transactionManager&transacted=true&acknowledgementModeName=TRANSACTED&cacheLevelName=CACHE_NONE");
>
> When the transaction started by the JPA component commits, it throws 
this
> stack trace:
>
> [7/12/10 10:40:46:841 EST] 000000a1 RegisteredSyn E   WTRN0074E: 
Exception
> caught from after_completion synchronization operation:
> 
org.springframework.jms.connection.SynchedLocalTransactionFailedException:
> Local JMS transaction failed to commit; nested exception is
> javax.jms.JMSException: MQJMS2009: MQQueueManager.commit() failed; 
nested
> exception is com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 
2012
>         at
> 
org.springframework.jms.connection.ConnectionFactoryUtils$JmsResourceSynchronization.processResourceAfterCommit(ConnectionFactoryUtils.java:407)
>         at
> 
org.springframework.jms.connection.ConnectionFactoryUtils$JmsResourceSynchronization.processResourceAfterCommit(ConnectionFactoryUtils.java:1)
>         at
> 
org.springframework.transaction.support.ResourceHolderSynchronization.afterCommit(ResourceHolderSynchronization.java:79)
>         at
> 
org.springframework.transaction.support.TransactionSynchronizationUtils.invokeAfterCommit(TransactionSynchronizationUtils.java:133)
>         at
> 
org.springframework.transaction.jta.JtaAfterCompletionSynchronization.afterCompletion(JtaAfterCompletionSynchronization.java:59)
>         at
> 
com.ibm.ws.uow.ComponentContextSynchronizationWrapper.afterCompletion(ComponentContextSynchronizationWrapper.java:84)
>         at
> 
com.ibm.ws.Transaction.JTA.RegisteredSyncs.distributeAfter(RegisteredSyncs.java:424)
>         at
> 
com.ibm.ws.Transaction.JTA.TransactionImpl.distributeAfter(TransactionImpl.java:3890)
>         at
> 
com.ibm.ws.Transaction.JTA.TransactionImpl.postCompletion(TransactionImpl.java:3869)
>         at
> 
com.ibm.ws.Transaction.JTA.TransactionImpl.internalCommit(TransactionImpl.java:2673)
>         at
> 
com.ibm.ws.Transaction.JTA.TransactionImpl.stage2CommitProcessing(TransactionImpl.java:1736)
>         at
> 
com.ibm.ws.Transaction.JTA.TransactionImpl.processCommit(TransactionImpl.java:1616)
>         at
> 
com.ibm.ws.Transaction.JTA.TransactionImpl.commit(TransactionImpl.java:1547)
>         at
> 
com.ibm.ws.Transaction.JTA.TranManagerImpl.commit(TranManagerImpl.java:247)
>         at
> 
com.ibm.ws.Transaction.JTA.TranManagerSet.commit(TranManagerSet.java:166)
>         at
> com.ibm.ws.uow.UOWManagerImpl.uowCommit(UOWManagerImpl.java:1055)
>         at 
com.ibm.ws.uow.UOWManagerImpl.uowEnd(UOWManagerImpl.java:1025)
>         at
> com.ibm.ws.uow.UOWManagerImpl.runUnderNewUOW(UOWManagerImpl.java:975)
>         at
> com.ibm.ws.uow.UOWManagerImpl.runUnderUOW(UOWManagerImpl.java:509)
>         at
> 
org.springframework.transaction.jta.WebSphereUowTransactionManager.execute(WebSphereUowTransactionManager.java:281)
>         at
> 
org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:124)
>         at
> 
org.apache.camel.component.jpa.JpaTemplateTransactionStrategy.execute(JpaTemplateTransactionStrategy.java:78)
>         *at
> org.apache.camel.component.jpa.JpaConsumer.poll(JpaConsumer.java:79)*
>         at
> 
org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:97)
>         at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:432)
>         at
> 
java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:295)
>         at 
java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>         at
> 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:80)
>         at
> 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:157)
>         at
> 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:181)
>         at
> 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
>         at
> 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
>         at java.lang.Thread.run(Thread.java:810)
>         at
> 
au.com.zurich.phoenix.i90.strategy.WebsphereExecutorServiceStrategy$WasWork.run(WebsphereExecutorServiceStrategy.java:313)
>         at
> com.ibm.ws.asynchbeans.J2EEContext$RunProxy.run(J2EEContext.java:257)
>         at
> java.security.AccessController.doPrivileged(AccessController.java:219)
>         at javax.security.auth.Subject.doAs(Subject.java:495)
>         at
> com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:118)
>         at
> com.ibm.ws.asynchbeans.J2EEContext$DoAsProxy.run(J2EEContext.java:328)
>         at
> java.security.AccessController.doPrivileged(AccessController.java:246)
>         at com.ibm.ws.asynchbeans.J2EEContext.run(J2EEContext.java:1111)
>         at
> 
com.ibm.ws.asynchbeans.WorkWithExecutionContextImpl.go(WorkWithExecutionContextImpl.java:195)
>         at
> com.ibm.ws.asynchbeans.CJWorkItemImpl.run(CJWorkItemImpl.java:187)
>         at java.lang.Thread.run(Thread.java:810)
> Caused by: javax.jms.JMSException: MQJMS2009: MQQueueManager.commit()
> failed
>         at
> 
com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:622)
>         at com.ibm.mq.jms.MQSession.commitQ(MQSession.java:3793)
>         at com.ibm.mq.jms.MQSession.commit(MQSession.java:761)
>         at
> com.ibm.ejs.jms.JMSSessionHandle.commit(JMSSessionHandle.java:658)
>         at
> 
org.springframework.jms.connection.JmsResourceHolder.commitAll(JmsResourceHolder.java:181)
>         at
> 
org.springframework.jms.connection.ConnectionFactoryUtils$JmsResourceSynchronization.processResourceAfterCommit(ConnectionFactoryUtils.java:404)
>         ... 43 more
> ---- Begin backtrace for Nested Throwables
> com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2012
>         at com.ibm.mq.MQQueueManager.commit(MQQueueManager.java:2220)
>         at com.ibm.mq.jms.MQSession.commitQ(MQSession.java:3769)
>         at com.ibm.mq.jms.MQSession.commit(MQSession.java:761)
>         at
> com.ibm.ejs.jms.JMSSessionHandle.commit(JMSSessionHandle.java:658)
>         at
> 
org.springframework.jms.connection.JmsResourceHolder.commitAll(JmsResourceHolder.java:181)
>         at
> 
org.springframework.jms.connection.ConnectionFactoryUtils$JmsResourceSynchronization.processResourceAfterCommit(ConnectionFactoryUtils.java:404)
>         at
> 
org.springframework.jms.connection.ConnectionFactoryUtils$JmsResourceSynchronization.processResourceAfterCommit(ConnectionFactoryUtils.java:1)
>         at
> 
org.springframework.transaction.support.ResourceHolderSynchronization.afterCommit(ResourceHolderSynchronization.java:79)
>         at
> 
org.springframework.transaction.support.TransactionSynchronizationUtils.invokeAfterCommit(TransactionSynchronizationUtils.java:133)
>         at
> 
org.springframework.transaction.jta.JtaAfterCompletionSynchronization.afterCompletion(JtaAfterCompletionSynchronization.java:59)
>         at
> 
com.ibm.ws.uow.ComponentContextSynchronizationWrapper.afterCompletion(ComponentContextSynchronizationWrapper.java:84)
>         at
> 
com.ibm.ws.Transaction.JTA.RegisteredSyncs.distributeAfter(RegisteredSyncs.java:424)
>         at
> 
com.ibm.ws.Transaction.JTA.TransactionImpl.distributeAfter(TransactionImpl.java:3890)
>         at
> 
com.ibm.ws.Transaction.JTA.TransactionImpl.postCompletion(TransactionImpl.java:3869)
>         at
> 
com.ibm.ws.Transaction.JTA.TransactionImpl.internalCommit(TransactionImpl.java:2673)
>         at
> 
com.ibm.ws.Transaction.JTA.TransactionImpl.stage2CommitProcessing(TransactionImpl.java:1736)
>         at
> 
com.ibm.ws.Transaction.JTA.TransactionImpl.processCommit(TransactionImpl.java:1616)
>         at
> 
com.ibm.ws.Transaction.JTA.TransactionImpl.commit(TransactionImpl.java:1547)
>         at
> 
com.ibm.ws.Transaction.JTA.TranManagerImpl.commit(TranManagerImpl.java:247)
>         at
> 
com.ibm.ws.Transaction.JTA.TranManagerSet.commit(TranManagerSet.java:166)
>         at
> com.ibm.ws.uow.UOWManagerImpl.uowCommit(UOWManagerImpl.java:1055)
>         at 
com.ibm.ws.uow.UOWManagerImpl.uowEnd(UOWManagerImpl.java:1025)
>         at
> com.ibm.ws.uow.UOWManagerImpl.runUnderNewUOW(UOWManagerImpl.java:975)
>         at
> com.ibm.ws.uow.UOWManagerImpl.runUnderUOW(UOWManagerImpl.java:509)
>         at
> 
org.springframework.transaction.jta.WebSphereUowTransactionManager.execute(WebSphereUowTransactionManager.java:281)
>         at
> 
org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:124)
>         at
> 
org.apache.camel.component.jpa.JpaTemplateTransactionStrategy.execute(JpaTemplateTransactionStrategy.java:78)
>         at
> org.apache.camel.component.jpa.JpaConsumer.poll(JpaConsumer.java:79)
>         at
> 
org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:97)
>         at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:432)
>         at
> 
java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:295)
>         at 
java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>         at
> 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:80)
>         at
> 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:157)
>         at
> 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:181)
>         at
> 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
>         at
> 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
>         at java.lang.Thread.run(Thread.java:810)
>         at
> 
au.com.zurich.phoenix.i90.strategy.WebsphereExecutorServiceStrategy$WasWork.run(WebsphereExecutorServiceStrategy.java:313)
>         at
> com.ibm.ws.asynchbeans.J2EEContext$RunProxy.run(J2EEContext.java:257)
>         at
> java.security.AccessController.doPrivileged(AccessController.java:219)
>         at javax.security.auth.Subject.doAs(Subject.java:495)
>         at
> com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:118)
>         at
> com.ibm.ws.asynchbeans.J2EEContext$DoAsProxy.run(J2EEContext.java:328)
>         at
> java.security.AccessController.doPrivileged(AccessController.java:246)
>         at com.ibm.ws.asynchbeans.J2EEContext.run(J2EEContext.java:1111)
>         at
> 
com.ibm.ws.asynchbeans.WorkWithExecutionContextImpl.go(WorkWithExecutionContextImpl.java:195)
>         at
> com.ibm.ws.asynchbeans.CJWorkItemImpl.run(CJWorkItemImpl.java:187)
>         at java.lang.Thread.run(Thread.java:810)
>
> Funny thing is that the message DOES end up on the queue!  So I'm not 
sure
> why the exception is being thrown.
>
> Here's my Spring config:
>
>     <jee:jndi-lookup id="connectionFactory" 
jndi-name="jms/conn/i90/gtwy"
>                      expected-type="javax.jms.ConnectionFactory"
>                      resource-ref="true"/>
>
>     <jee:jndi-lookup id="exportQueue" 
jndi-name="jms/dest/i90/gtwy/export"
>                      expected-type="javax.jms.Destination"
>                      resource-ref="true"/>
>
>     <jee:jndi-lookup id="deadLetterQueue" 
jndi-name="jms/dest/i90/gtwy/dlq"
>                      expected-type="javax.jms.Destination"
>                      resource-ref="true"/>
>
>     <bean id="taskExecutor"
> 
class="au.com.zurich.phoenix.gateway.jms.WorkManagerTaskExecutorFactoryBean">
>         <property name="workManagerName" value="wm/default"/>
>     </bean>
>
>     <bean id="destinationResolver"
> 
class="org.springframework.jms.support.destination.BeanFactoryDestinationResolver"/>
>
>     <tx:jta-transaction-manager />
>
> Here's my level of code:
>
> Camel 2.5.0
> Spring 3.0.5.RELEASE (I've bumped up this version due to a bug that was
> fixed around CACHE_NONE)
> Websphere 6.1.0.25
> Websphere MQ 6.0.2.1
>
> I have other Spring applications (albeit v2.5.6) working successfully in
> this environment with JMS and Websphere MQ.  So it leads me to believe I
> don't have something setup correctly in Camel.
>
> Does anyone have a suggestion on what I can change to get rid of this
> error?
>
> Thanks,
> Mark
>
> Mark Borner
> Java Developer - ZStream Xpress
>
>
>
>
> ----
> This email is intended for the named recipient only. It may contain
> information which is confidential, commercially sensitive, or
> copyright. If you are not the intended recipient you must not
> reproduce or distribute any part of the email, disclose its contents,
> or take any action in reliance. If you have received this email in
> error, please contact the sender and delete the message. It is your
> responsibility to scan this email and any attachments for viruses and
> other defects. To the extent permitted by law, Zurich and its
> associates will not be liable for any loss or damage arising in any
> way from this communication including any file attachments. We may
> monitor email you send to us, either as a reply to this email or any
> email you send to us, to confirm our systems are protected and for
> compliance with company policies. Although we take reasonable
> precautions to protect the confidentiality of our email systems, we
> do not warrant the confidentiality or security of email or
> attachments we receive.
>
>


-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/



----
This email is intended for the named recipient only. It may contain 
information which is confidential, commercially sensitive, or 
copyright. If you are not the intended recipient you must not 
reproduce or distribute any part of the email, disclose its contents, 
or take any action in reliance. If you have received this email in 
error, please contact the sender and delete the message. It is your 
responsibility to scan this email and any attachments for viruses and 
other defects. To the extent permitted by law, Zurich and its 
associates will not be liable for any loss or damage arising in any 
way from this communication including any file attachments. We may 
monitor email you send to us, either as a reply to this email or any 
email you send to us, to confirm our systems are protected and for 
compliance with company policies. Although we take reasonable 
precautions to protect the confidentiality of our email systems, we 
do not warrant the confidentiality or security of email or 
attachments we receive.
Mime
  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message