Author |
Message
|
msascha |
Posted: Tue Oct 18, 2005 10:57 pm Post subject: Problem putting message to queue using WS AppSrv 6 & MQ |
|
|
Newbie
Joined: 18 Oct 2005 Posts: 5
|
Hi,
first my configuration:
I have a Linux box running WebSphere AppServer 6 and WebSphere MQ 6. I installed MQ following the advises in the QuickBeginnings PDF, added a listener (running on port 5414) and a channel (MY.CHANNEL.1). I configured the QueueConnectionFactory in WebSphere using the port und channel mentioned above, set to "Client" mode.
WebSphere can connect to the Listener (the defined ListenerPort starts without problems) and receive messages I put "manually" on my queue.
When I try to put a message on the queue using WebSphere AppServer I get the following error:
javax.jms.JMSException: MQJMS2007: failed to send message to MQ queue
with the nested Exception
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2009
I don't know where to look anymore because the "Postcard" application as well as running IVTRun with my defined port and channel just work fine.
Any ideas? |
|
Back to top |
|
 |
hopsala |
Posted: Wed Oct 19, 2005 2:13 am Post subject: Re: Problem putting message to queue using WS AppSrv 6 & |
|
|
 Guardian
Joined: 24 Sep 2004 Posts: 960
|
msascha wrote: |
Any ideas? |
Yes, search the forums for "2009", or even "MQJE001 2009" (use "search for all items") |
|
Back to top |
|
 |
msascha |
Posted: Wed Oct 19, 2005 7:59 am Post subject: Re: Problem putting message to queue using WS AppSrv 6 & |
|
|
Newbie
Joined: 18 Oct 2005 Posts: 5
|
hopsala wrote: |
Yes, search the forums for "2009", or even "MQJE001 2009" (use "search for all items") |
I did that, but no of the questions/answers fitted the problem. Again "normal" JMS does work, but it is not possible to put messages to the queue using WebSphere ApplicationServer.
Sascha |
|
Back to top |
|
 |
hopsala |
Posted: Wed Oct 19, 2005 11:48 am Post subject: |
|
|
 Guardian
Joined: 24 Sep 2004 Posts: 960
|
Hm, possibly the old CSD08/09 client bug came back to haunt you in MQ6 - did you try this code on MQ5.3?
Post relevant code snippet and we'll have a looksee. |
|
Back to top |
|
 |
tingwen |
Posted: Thu Oct 20, 2005 1:34 pm Post subject: |
|
|
Novice
Joined: 19 Aug 2005 Posts: 24
|
I have similar situation of getting same error code: 2009. This is what I did
1. WAS 6.0 (base, no supportpac) and MQ 6.0 are installed in two different servers.
2. create MDB and deployed under WAS 6.0 using Message Listener. Received messages OK
3. In onMessage(), after receiving msg, tried to send back a reply message
5. send() died w/ 2009 error code. (see codes belows)
Is this more like a problem from WAS or MQ? thanks for reading my post !!
wen
---
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.fscontext.RefFSContextFactory");
env.put(Context.PROVIDER_URL, "file:/tmp/myjndi");
env.put(Context.REFERRAL, "throw");
try {
if ((ctx = new InitialDirContext(env)) == null) {
// log error
System.out.println("InitialDirContext() failed");
return;
}
if ((queueConnFactory = (QueueConnectionFactory) ctx
.lookup("podsQCF")) == null) {
// log error
System.out.println("lookup.qcf() failed");
return;
}
if ((qc = queueConnFactory.createQueueConnection()) == null) {
// log error
System.out.println("createQueueConnection() failed");
return;
}
ctx.close();
} catch (NamingException ex) {
// log error
System.out.println(ex.toString());
return;
} catch (JMSException ex) {
// log error
Exception e = ex.getLinkedException();
System.out.println(e.toString());
return;
} catch (Exception ex) {
System.out.println(ex.toString());
} finally {
}
// add implementation here for processing messages
try {
if (msg instanceof ObjectMessage) {
if ((qs = qc.createQueueSession(false,
javax.jms.Session.AUTO_ACKNOWLEDGE)) == null) {
// log error
System.out.println("createQueueSession() failed");
return;
}
msgID = msg.getJMSMessageID();
des = msg.getJMSReplyTo();
desQueueName = ((Queue) des).getQueueName();
if ((desQueue = qs.createQueue(desQueueName)) == null)
{
System.out.println("createQueue() failed") ;
return ;
}
if ((qSender = qs.createSender(desQueue)) == null)
{
System.out.println("createSender() failed") ;
return ;
}
if ((msg1 = qs.createTextMessage()) == null)
{
System.out.println("createTextMessage() failed") ;
return ;
}
msg1.setText("reply ack");
msg1.setJMSCorrelationID(msgID);
qSender.send(msg1);
qSender.close();
qSender = null;
}
} catch (JMSException ex) {
Exception e = ex.getLinkedException();
System.out.println(e.toString());
return;
} finally {
}
//post
try {
if (qc != null) {
qc.close();
qc = null;
}
} catch (JMSException ex) {
// log error
Exception e = ex.getLinkedException();
System.out.println(e.toString());
return;
} catch (Exception ex) {
System.out.println(ex.toString());
} finally {
} |
|
Back to top |
|
 |
msascha |
Posted: Thu Oct 20, 2005 2:29 pm Post subject: |
|
|
Newbie
Joined: 18 Oct 2005 Posts: 5
|
tingwen wrote: |
Is this more like a problem from WAS or MQ?
|
It's definitely an IBM problem .
Sascha
Btw.: I don't found a solution yet. To post source code would be a little bit useless because in my MDB I don't do any MQ specific thing. I just get a QueueConnectionFactory from JNDI and go on from there. |
|
Back to top |
|
 |
helping_hand |
Posted: Fri Oct 21, 2005 1:53 pm Post subject: |
|
|
 Novice
Joined: 28 Jul 2005 Posts: 14
|
Did MQ PUT(ENABLED) on the queue on which u wanna put message?
and Plz
check the XmitQ's has put enabled and the channels are running properly |
|
Back to top |
|
 |
msascha |
Posted: Sat Oct 22, 2005 5:36 am Post subject: |
|
|
Newbie
Joined: 18 Oct 2005 Posts: 5
|
helping_hand wrote: |
Did MQ PUT(ENABLED) on the queue on which u wanna put message? |
Sure, would the Postcard or IVTRun JMS sample applications work if not? |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Oct 22, 2005 7:01 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Have you checked that WAS is not trying to post to the internal provider first and not finding the corresponding one, nor finding a default way to route to the external MQ it throws the blasted 2009 ?
Enjoy  |
|
Back to top |
|
 |
msascha |
Posted: Mon Oct 24, 2005 11:41 pm Post subject: |
|
|
Newbie
Joined: 18 Oct 2005 Posts: 5
|
fjb_saper wrote: |
Have you checked that WAS is not trying to post to the internal provider first and not finding the corresponding one, nor finding a default way to route to the external MQ it throws the blasted 2009 ? |
WebSphere AppServer 6.0 doesn't have an internal JMS Provider... That's why I installed a separate MQ in the first place. Furthermore WebSphere is able to receive messages from the queue (in a MDB), but fails to send it. Put is definitly enabled:
DISPLAY QUEUE (PPS.BRIDGE.SENDER) 1 : DISPLAY QUEUE (PPS.BRIDGE.SENDER)AMQ8409: Display Queue details. QUEUE(PPS.BRIDGE.SENDER) TYPE(QLOCAL) ACCTQ(QMGR) ALTDATE(2005-10-19) ALTTIME(02.20.27) BOQNAME( ) BOTHRESH(0) CLUSNL( ) CLUSTER( ) CLWLPRTY(0) CLWLRANK(0) CLWLUSEQ(QMGR) CRDATE(2005-10-19) CRTIME(00.08.27) CURDEPTH(2) DEFBIND(OPEN) DEFPRTY(0) DEFPSIST(NO) DEFSOPT(SHARED) DEFTYPE(PREDEFINED) DESCR( ) DISTL(NO) GET(ENABLED) HARDENBO INITQ( ) IPPROCS(0) MAXDEPTH(50000) MAXMSGL(50000000) MONQ(QMGR) MSGDLVSQ(PRIORITY) NOTRIGGER NPMCLASS(NORMAL) OPPROCS(0) PROCESS( ) PUT(ENABLED) QDEPTHHI(80) QDEPTHLO(20) QDPHIEV(DISABLED) QDPLOEV(DISABLED) QDPMAXEV(ENABLED) QSVCIEV(NONE) QSVCINT(999999999) RETINTVL(999999999) SCOPE(QMGR) SHARE STATQ(QMGR) TRIGDATA( ) TRIGDPTH(1) TRIGMPRI(0) TRIGTYPE(FIRST) USAGE(NORMAL) |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Oct 25, 2005 2:20 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
msascha wrote: |
WebSphere AppServer 6.0 doesn't have an internal JMS Provider... That's why I installed a separate MQ in the first place. Furthermore WebSphere is able to receive messages from the queue (in a MDB), but fails to send it. Put is definitly enabled: |
Not quite true... Check out the chapter about SOA. The "internal" JMS MQ provider for WAS 6.0 uses a DB and connects to "traditional" MQ via SNDR/RCVR channel pairs...
As for reading using an MDB, it really depends on how you set your environment up. This can be done in "traditional" 5.3 form (also with a 6.0 manager) or using the activation class (See J2EE patterns and WAS 6.0 manuals).
So really I believe it warrants a bit more explanations as to how you did your setup including JNDI... and how you made sure that WAS is not looking for the internal provider first...
Enjoy  |
|
Back to top |
|
 |
|