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 » MQJMS2005: failed to create MQQueueM

Post new topic  Reply to topic
 MQJMS2005: failed to create MQQueueM « View previous topic :: View next topic » 
Author Message
Itchy
PostPosted: Tue Mar 18, 2003 7:29 pm    Post subject: MQJMS2005: failed to create MQQueueM Reply with quote

Newbie

Joined: 16 Mar 2003
Posts: 8

hi,

I am getting this error -
javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for ''

When I run my following servlet code on WAS v4.0.3 using MQSeries v5.2 and MA88. (Win 2K)

import javax.servlet.*;
import javax.servlet.http.*;
import javax.jms.*;
import com.ibm.mq.jms.*;
import javax.naming.*;
import java.util.Hashtable;

public
class SendMQJMSMessage extends HttpServlet {

public final String JNDI_FACTORY="com.ibm.ejs.ns.jndi.CNInitialContextFactory";

public void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException
{
try{
InitialContext ctx = new InitialContext();
Context env = (Context)ctx.lookup("java:comp/env");
QueueConnectionFactory qcf = (QueueConnectionFactory)env.lookup("myQCF");
QueueConnection qc = qcf.createQueueConnection();
QueueSession session = qc.createQueueSession(true, Session.AUTO_ACKNOWLEDGE);
Queue q = (Queue)ctx.lookup("myQ");
QueueSender sender = session.createSender(q);
Message message = (Message)session.createTextMessage("Test Message 11212");
sender.send(message);
}catch(NamingException ne){
ne.printStackTrace();
}catch(JMSException jmse){
jmse.printStackTrace();
}
}

public InitialContext getInitialContext(String str) throws NamingException{
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, JNDI_FACTORY);
env.put(Context.PROVIDER_URL, str);
return new InitialContext(env);
}

}


Let me know where I am wrong?
My default queue manager is up and running.

Thanks in advance.

regards.
Itchy.
Back to top
View user's profile Send private message
EddieA
PostPosted: Thu Mar 20, 2003 5:10 pm    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Extract the 'Linked Exception' from the JMSException. That will give you the MQSeries Completion and Reason codes. They should help to pin-point the problem.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
nimconsult
PostPosted: Thu Mar 20, 2003 11:43 pm    Post subject: Reply with quote

Master

Joined: 22 May 2002
Posts: 268
Location: NIMCONSULT - Belgium

Follow the advice of EddieA

Check that you have a default queue manager (apparently the application connects with an empty queue manager)

A usual problem on AIX is the segment 8 problem. Execute:

Code:
export LDR_CNTRL=MAXDATA=0x30000000


before starting the java virtual machine and see if it works (do not run other application with this variable set, in particular, do not run MQ Series commands).
_________________
Nicolas Maréchal
Senior Architect - Partner

NIMCONSULT Software Architecture Services (Belgium)
http://www.nimconsult.be
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » MQJMS2005: failed to create MQQueueM
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.