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 » Problem putting message to queue using WS AppSrv 6 & MQ

Post new topic  Reply to topic
 Problem putting message to queue using WS AppSrv 6 & MQ « View previous topic :: View next topic » 
Author Message
msascha
PostPosted: Tue Oct 18, 2005 10:57 pm    Post subject: Problem putting message to queue using WS AppSrv 6 & MQ Reply with quote

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
View user's profile Send private message AIM Address
hopsala
PostPosted: Wed Oct 19, 2005 2:13 am    Post subject: Re: Problem putting message to queue using WS AppSrv 6 & Reply with quote

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
View user's profile Send private message
msascha
PostPosted: Wed Oct 19, 2005 7:59 am    Post subject: Re: Problem putting message to queue using WS AppSrv 6 & Reply with quote

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
View user's profile Send private message AIM Address
hopsala
PostPosted: Wed Oct 19, 2005 11:48 am    Post subject: Reply with quote

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
View user's profile Send private message
tingwen
PostPosted: Thu Oct 20, 2005 1:34 pm    Post subject: Reply with quote

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
View user's profile Send private message
msascha
PostPosted: Thu Oct 20, 2005 2:29 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
helping_hand
PostPosted: Fri Oct 21, 2005 1:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
msascha
PostPosted: Sat Oct 22, 2005 5:36 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
fjb_saper
PostPosted: Sat Oct 22, 2005 7:01 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
msascha
PostPosted: Mon Oct 24, 2005 11:41 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
fjb_saper
PostPosted: Tue Oct 25, 2005 2:20 pm    Post subject: Reply with quote

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

MQSeries.net Forum Index » IBM MQ Java / JMS » Problem putting message to queue using WS AppSrv 6 & MQ
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.