Author |
Message
|
just_a_kid |
Posted: Thu Jul 27, 2006 12:20 am Post subject: javax.jms.JMSException: MQJMS2008: failed to open MQ queue |
|
|
Apprentice
Joined: 25 Jul 2006 Posts: 28
|
Hi,
Now after resolving MQJMS2005 error , i hit another error which MQJMS2008.
It Seems whenever i try to read QRemote it will throw this exception
but it was working okay wheneever i try to establish connection with qLocal but my receiver hang.. it just stays there forever but i already put the message to the queue.. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Jul 27, 2006 3:01 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
This is how MQ works.
You can't GET from anything that is not a qlocal.
If you have data that an application needs to read, then you configure the MQ network so that the data ends up on a qlocal for the application. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
just_a_kid |
Posted: Thu Jul 27, 2006 3:39 am Post subject: |
|
|
Apprentice
Joined: 25 Jul 2006 Posts: 28
|
Hi,
then what is the purpose of RemoteQ if we cant read it in the first place?
In Which Scenario we can use RemoteQ.
Can we put messages into QRemote??
Sorry because i am new to MQ
And Regarding my QLOCAL Seems i can put the message to the queue but when i create receiver it hangs
Code: |
Queue ioQueue;
ioQueue = (Queue)ctx.lookup("cn="+queue);
QueueSender queueSender = sess.createSender(ioQueue);
System.out.println( "Creating a TextMessage" );
TextMessage outMessage = sess.createTextMessage();
System.out.println("Adding Text");
String outString = "TEST";
outMessage.setText(outString);
queueSender.send(outMessage);
System.out.println("Message has been sent");
System.out.println("Creating receiver ");
QueueReceiver queueReceiver = sess.createReceiver(ioQueue);
Message inMessage = queueReceiver.receiveNoWait();
System.out.println("Receiver Done");
String replyString = ((TextMessage) inMessage).getText();
System.out.println("Received Message ===>"+replyString); |
It will throw nullPointer Exception because the GetText is NULL
cant extract anything from the same queue..
Thanks. |
|
Back to top |
|
 |
mvic |
Posted: Thu Jul 27, 2006 3:56 am Post subject: |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jul 27, 2006 1:58 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Quote: |
And Regarding my QLOCAL Seems i can put the message to the queue but when i create receiver it hangs
|
Did you ever start the connection before calling the receive method?
You can only receive while the connection is in started/running state
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
just_a_kid |
Posted: Thu Jul 27, 2006 5:33 pm Post subject: |
|
|
Apprentice
Joined: 25 Jul 2006 Posts: 28
|
Yes i finally solved it..
Big thanks...
When u send u dont have to start connection
but when u receive u have to receive connectionn
Now i am able to send and receive messages from my Queue Local..
But I can't establish even connection / send to Queue Remote because of
MQJMS2088 : unable to open MQ Queue.
Any idea ??
Code: |
sess = connection.createQueueSession(false,Session.AUTO_ACKNOWLEDGE);
//String queue="TestQ"; ===> my QLOCAL works perfectly
String queue = "RemoteQ"; ===> my RemoteQ
ioQueue = (Queue)ctx.lookup("cn="+queue);
System.out.println("Getting QUEUE DONE");
System.out.println("QUEUE NAME "+ioQueue.getQueueName());
QueueSender queueSender = sess.createSender(ioQueue); |
It throw and exception when it try to create A Sender... |
|
Back to top |
|
 |
just_a_kid |
Posted: Thu Jul 27, 2006 5:54 pm Post subject: |
|
|
Apprentice
Joined: 25 Jul 2006 Posts: 28
|
QUEUE NAME ==========queue://ils.queue.manager/Q_AIDC_ISS_OUT?targetClient=1
JMSException.............MQJMS2008: failed to open MQ queue
javax.jms.JMSException: MQJMS2008: failed to open MQ queue
at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:418)
at com.ibm.mq.jms.MQQueueSession.getOutputQueue(MQQueueSession.java:728)
at com.ibm.mq.jms.MQQueueSession.createSender(MQQueueSession.java:181)
at mqTest.main(mqTest.java:99)
linked exception: com.ibm.mq.MQException: Completion Code 2, Reason 2092
I have the linked exception 2092
Below are my queue definition from runmqsc
AMQ8409: Display Queue details.
DESCR(Queue for sending messages to AIDC Goods Issue Module)
RNAME(Q_ILSAIDC5) RQMNAME(QM_AIDC1)
XMITQ(TQ_ILSAIDC1) CLUSTER( )
CLUSNL( ) QUEUE(Q_AIDC_ISS_OUT)
ALTDATE(2006-06-15) ALTTIME(11.30.49)
PUT(ENABLED) DEFPRTY(0)
DEFPSIST(NO) SCOPE(QMGR)
DEFBIND(OPEN) TYPE(QREMOTE)
Anything wrong with it??
Thanks =)
This setting works in another environment.. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Jul 27, 2006 6:25 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
just_a_kid wrote: |
I have the linked exception 2092 |
http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.amqzao.doc/csq05rea3.htm
Quote: |
2092 (X'082C')
MQRC_XMIT_Q_USAGE_ERROR
Explanation:
On an MQOPEN or MQPUT1 call, a message is to be sent to a remote queue manager, but one of the following occurred:
* ObjectQMgrName specifies the name of a local queue, but it does not have a Usage attribute of MQUS_TRANSMISSION.
* The ObjectName or ObjectQMgrName field in the object descriptor specifies the name of a local definition of a remote queue but one of the following applies to the XmitQName attribute of the definition:
o XmitQName is not blank, but specifies a queue that does not have a Usage attribute of MQUS_TRANSMISSION
o XmitQName is blank, but RemoteQMgrName specifies a queue that does not have a Usage attribute of MQUS_TRANSMISSION
o XmitQName specifies the queue SYSTEM.QSG.TRANSMIT.QUEUE the IGQ queue manager attribute indicates that IGQ is DISABLED.
* The queue name is resolved through a cell directory, and the remote queue manager name obtained from the cell directory is the name of a local queue, but it does not have a Usage attribute of MQUS_TRANSMISSION.
Completion Code:
MQCC_FAILED
Programmer Response:
Check the values specified for ObjectName and ObjectQMgrName. If these are correct, check the queue definitions. For more information on transmission queues, see the WebSphere MQ Application Programming Guide. |
just_a_kid wrote: |
Below are my queue definition from runmqsc
AMQ8409: Display Queue details.
DESCR(Queue for sending messages to AIDC Goods Issue Module)
RNAME(Q_ILSAIDC5) RQMNAME(QM_AIDC1)
XMITQ(TQ_ILSAIDC1) CLUSTER( )
CLUSNL( ) QUEUE(Q_AIDC_ISS_OUT)
ALTDATE(2006-06-15) ALTTIME(11.30.49)
PUT(ENABLED) DEFPRTY(0)
DEFPSIST(NO) SCOPE(QMGR)
DEFBIND(OPEN) TYPE(QREMOTE)
Anything wrong with it?? |
Yes. The XMITQ is not an XMITQ. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
just_a_kid |
Posted: Thu Jul 27, 2006 7:42 pm Post subject: |
|
|
Apprentice
Joined: 25 Jul 2006 Posts: 28
|
Hi
what do u meant by that?
I think it might be because of the channel problem as
the channel status is not RUNNING and i cant even start the channel
CHANNEL(CH_ILS_TO_AIDC1) CHLTYPE(SDR)
TRPTYPE(TCP) DESCR( )
XMITQ(TQ_ILSAIDC1) MCANAME( )
MODENAME( ) TPNAME( )
BATCHSZ(50) DISCINT(6000)
SHORTRTY(10) SHORTTMR(60)
LONGRTY(999999999) LONGTMR(1200)
SCYEXIT( ) SEQWRAP(999999999)
MAXMSGL(4194304) CONVERT(NO)
SCYDATA( ) USERID( )
PASSWORD( ) MCATYPE(PROCESS)
CONNAME(localhost(1414)) HBINT(300)
BATCHINT(0) NPMSPEED(FAST)
SSLCIPH( ) BATCHHB(0)
LOCLADDR( ) MCAUSER( )
ALTDATE(2006-07-2 ALTTIME(11.06.42)
SSLPEER()
MSGEXIT( )
SENDEXIT( )
RCVEXIT( )
MSGDATA( )
SENDDATA( )
RCVDATA( )
Above is my channel definition
when i start chl
start chl(CH_ILS_TO_AIDC1)
4 : start chl(CH_ILS_TO_AIDC1)
AMQ9531: Transmission queue specification error.
I get Above errror message. |
|
Back to top |
|
 |
just_a_kid |
Posted: Thu Jul 27, 2006 9:59 pm Post subject: |
|
|
Apprentice
Joined: 25 Jul 2006 Posts: 28
|
Hi Guys,
Finnaly after try and error i managed to solved the problem and all now my MQ is up and running
Transmission Queue Error Because i didn't specify USAGE(XMITQ) for my QLocal that will be referenced by QRemote
Thats why in runmqsc throwing error Transmission Queue Error
Whereas in the java application throwin MQJMS2008
Thanks guys... |
|
Back to top |
|
 |
|