Author |
Message
|
TomJarray |
Posted: Fri Feb 11, 2011 7:04 pm Post subject: IBM MQ Reason code 2012 |
|
|
Newbie
Joined: 11 Jan 2011 Posts: 6
|
Hi, Can anyone help?
I have a jboss/jms app which run with MQv6 server.
I find this error in server.log:
Code: |
2011-02-12 00:39:25,969 WARN [JCA PoolFiller] [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Unable to fill pool
javax.resource.ResourceException: MQJCA1011:Failed to allocate a JMS connection.
at com.ibm.mq.connector.services.JCAExceptionBuilder.buildException(JCAExceptionBuilder.java:101)
at com.ibm.mq.connector.ConnectionBuilder.createConnection(ConnectionBuilder.java:169)
at com.ibm.mq.connector.outbound.ManagedQueueConnectionFactoryImpl
.createConnection(ManagedQueueConnectionFactoryImpl.java:151)
at com.ibm.mq.connector.outbound.ManagedConnectionImpl.<init>(ManagedConnectionImpl.java:108)
at com.ibm.mq.connector.outbound.ManagedQueueConnectionImpl.<init>(ManagedQueueConnectionImpl.java:55)
at com.ibm.mq.connector.outbound.ManagedQueueConnectionFactoryImpl.
createManagedConnection(ManagedQueueConnectionFactoryImpl.java:123)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.
createConnectionEventListener(InternalManagedConnectionPool.java:577)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool
.fillToMin(InternalManagedConnectionPool.java:524)
at org.jboss.resource.connectionmanager.PoolFiller.run(PoolFiller.java:74)
at java.lang.Thread.run(Thread.java:619)
Caused by: javax.jms.JMSException: MQJMS2005: 未能为 '192.168.6.12:QM.GX2' 创建 MQQueueManager
at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:614)
at com.ibm.mq.jms.MQConnection.createQM(MQConnection.java:2480)
at com.ibm.mq.jms.MQConnection.createQMXA(MQConnection.java:1783)
at com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueConnection.java:110)
at com.ibm.mq.jms.MQXAQueueConnection.<init>(MQXAQueueConnection.java:67)
at com.ibm.mq.jms.MQXAQueueConnectionFactory
.createXAQueueConnection(MQXAQueueConnectionFactory.java:167)
at com.ibm.mq.connector.ConnectionBuilder.createConnection(ConnectionBuilder.java:136)
|
and I find follow error in MQ/errors/AMQERR01.LOG:
Code: |
----- amqrmrsa.c : 487 --------------------------------------------------------
02/12/2011 12:39:25 AM - Process(30826.30) User(mqm) Program(amqrmppa)
AMQ9508: Program cannot connect to the queue manager.
EXPLANATION:
The connection attempt to queue manager 'QM.GX1' failed with reason code 2012.
ACTION:
Ensure that the queue manager is available and operational.
----- amqrmsaa.c : 463 --------------------------------------------------------
02/12/2011 12:39:25 AM - Process(30826.30) User(mqm) Program(amqrmppa)
AMQ9999: Channel program ended abnormally.
EXPLANATION:
Channel program 'SYSTEM.ADMIN.SVRCONN' ended abnormally.
ACTION:
Look at previous error messages for channel program 'SYSTEM.ADMIN.SVRCONN' in
the error files to determine the cause of the failure. |
|
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Feb 11, 2011 7:59 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
So you got a 2012 reason code.
As per the infocenter:
Quote: |
On HP OpenVMS, OS/2, i5/OS, Start of changeHP NonStop ServerEnd of change, UNIX systems, and Windows, one of the following applies:
* The application is linked to the wrong libraries (threaded or nonthreaded).
* An MQBEGIN, MQCMIT, or MQBACK call was issued, but an external unit-of-work manager is in use. For example, this reason code occurs on Windows when an MTS object is running as a DTC transaction. This reason code also occurs if the queue manager does not support units of work.
* The MQBEGIN call was issued in an MQ client environment.
* An MQXCLWLN call was issued, but the call did not originate from a cluster workload exit.
|
So which part of this did you not understand?
Are you trying to define an XAConnectionFactory and the MQServer is not on the same box as your JBoss server?
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
TomJarray |
Posted: Fri Feb 11, 2011 10:01 pm Post subject: |
|
|
Newbie
Joined: 11 Jan 2011 Posts: 6
|
Thanks fjb_saper for the info.
I'm using IBM WebSphere MQ resource adapter in jboss, and message driven beans (MDBs), running in an application server(JBoss), to access the resources of a WebSphere MQ queue manager.
The application can receive message from queue correctly, but the error occurred occasionally in the server.log. I use the latest jar of wmq.jmsra.rar.
The mq configuration in the ibm-ds.xml as follow:
Code: |
<tx-connection-factory>
<jndi-name>/wmq/XAQueueConnectionFactory</jndi-name>
<xa-transaction>
</xa-transaction>
<rar-name>wmq.jmsra.rar</rar-name>
<connection-definition>javax.jms.QueueConnectionFactory</connection-definition>
<config-property name="channel" type="java.lang.String">SYSTEM.ADMIN.SVRCONN</config-property>
<config-property name="hostName" type="java.lang.String">192.168.6.11</config-property>
<config-property name="port" type="java.lang.String">1415</config-property>
<config-property name="queueManager" type="java.lang.String">QM.GX1</config-property>
<track-connection-by-tx>
</track-connection-by-tx>
<min-pool-size>5</min-pool-size>
<max-pool-size>50</max-pool-size>
</tx-connection-factory> |
|
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Feb 12, 2011 6:31 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Please answer the question. It is not trivial:
fjb_saper wrote: |
Are you trying to define an XAConnectionFactory and the MQServer is not on the same box as your JBoss server? |
Are you licensed for the ETC? (Extended Transactional Client). Do you have the corresponding jar on your classpath?
And please use an appropriate SVRCONN application channel. Don't use SYSTEM.ADMIN.SVRCONN. Typically this channel is blocked by admins.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
TomJarray |
Posted: Sun Feb 13, 2011 7:34 pm Post subject: |
|
|
Newbie
Joined: 11 Jan 2011 Posts: 6
|
I am a novice for MQ, I'am not define an XAConnectionFactory in code.
I do not understand what it means "the MQServer is not on the same box as your JBoss server?". Can you explain it in detail?
I use one jboss connecting two MQ while are on a different machine.
Thanks! |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Feb 13, 2011 8:59 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
TomJarray wrote: |
I use one JBoss connecting two MQ while are on a different machine.
Thanks! |
your error shows:
Quote: |
at com.ibm.mq.jms.MQConnection.createQMXA(MQConnection.java:1783) |
This means that you have defined an XA Connection Factory, or in layman's term you want to do a 2 phase commit.
However you also say that the WMQ server is not on the same machine as your JBoss server. As such you need to have the Extended Transactional Client (ETC) and be licensed for it.
Do you have that license and do you have the corresponding Jar file on your classpath? If this is not so, you cannot use a 2 phase commit and this is what is giving you this particular error.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
TomJarray |
Posted: Sun Feb 13, 2011 10:19 pm Post subject: |
|
|
Newbie
Joined: 11 Jan 2011 Posts: 6
|
I have the license and the corresponding Jar file on my jboss classpath.
Quote: |
Do you have that license and do you have the corresponding Jar file on your classpath? |
what does the "classpath" refer to, jboss or MQ?
I put the file "wmq.jmsra.rar" into the "jboss/server/default/deploy/" directory.
The "wmq.jmsra.rar" contains following files:
META-INF/ra.xml
dhbcore.jar
com.ibm.mq.jar
com.ibm.mqjms.jar
com.ibm.mqetclient.jar
mqconnector.jar
It does not install the "Extended Transactional Client" in production machine ;
Do you mean I need to install Extended Transactional Client?
Thanks!
|
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Feb 13, 2011 10:31 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
TomJarray wrote: |
I have the license and the corresponding Jar file on my jboss classpath.
I put the file "wmq.jmsra.rar" into the "jboss/server/default/deploy/" directory.
The "wmq.jmsra.rar" contains following files:
META-INF/ra.xml
dhbcore.jar
com.ibm.mq.jar
com.ibm.mqjms.jar
com.ibm.mqetclient.jar
mqconnector.jar
It does not install the "Extended Transactional Client" in production machine ;
Do you mean I need to install Extended Transactional Client?
Thanks! |
You seem to have the ETC client installed see com.ibm.mqetclient.jar
So you should be able to use a 2 phase commit. Open a PMR with IBM and ask for help.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
TomJarray |
Posted: Sun Feb 13, 2011 10:58 pm Post subject: |
|
|
Newbie
Joined: 11 Jan 2011 Posts: 6
|
The com.ibm.mqetclient.jar in production machine is copied from my PC, not installed by installing ETC client for MQ.
Do you mean I need to install Extended Transactional Client? |
|
Back to top |
|
 |
Vitor |
Posted: Mon Feb 14, 2011 5:07 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
TomJarray wrote: |
Do you mean I need to install Extended Transactional Client? |
If you want to use XA in client mode, yes.
If you don't, the standard client will do. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|