ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » IBM MQ Reason code 2012

Post new topic  Reply to topic
 IBM MQ Reason code 2012 « View previous topic :: View next topic » 
Author Message
TomJarray
PostPosted: Fri Feb 11, 2011 7:04 pm    Post subject: IBM MQ Reason code 2012 Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Fri Feb 11, 2011 7:59 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20698
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
View user's profile Send private message Send e-mail
TomJarray
PostPosted: Fri Feb 11, 2011 10:01 pm    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Sat Feb 12, 2011 6:31 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20698
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
View user's profile Send private message Send e-mail
TomJarray
PostPosted: Sun Feb 13, 2011 7:34 pm    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Sun Feb 13, 2011 8:59 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20698
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
View user's profile Send private message Send e-mail
TomJarray
PostPosted: Sun Feb 13, 2011 10:19 pm    Post subject: Reply with quote

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!
Quote:
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sun Feb 13, 2011 10:31 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20698
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
View user's profile Send private message Send e-mail
TomJarray
PostPosted: Sun Feb 13, 2011 10:58 pm    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Mon Feb 14, 2011 5:07 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » IBM MQ Reason code 2012
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.