Author |
Message
|
preetham |
Posted: Thu May 12, 2005 10:45 am Post subject: JMS with IBM Mqseries as JMS provider error MQJMS2005 |
|
|
Guest
|
I have a startup class which was working fine with server bindings now i changed it to client bindings and when i bring up weblogic with a custom startup class i get the following error
javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager
Any thoughts |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu May 12, 2005 10:50 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Always ALWAYS collect and report the linked exception.
MQJMS errors are practically useless. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
preetham |
Posted: Thu May 12, 2005 10:56 am Post subject: here is the stack trace |
|
|
Guest
|
javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for 'host:queueManager
at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:556)
at com.ibm.mq.jms.MQConnection.createQM(MQConnection.java:2273)
at com.ibm.mq.jms.MQConnection.createQMNonXA(MQConnection.java:1701)
at com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueConnection.java:144)
at com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueConnection.java:54)
at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:106)
at com.spcs.systemcommon.msgreceiver.Startup.register(Startup.java:150)
at com.spcs.systemcommon.msgreceiver.Startup.startup(Startup.java:263)
at weblogic.t3.srvr.StartupClassService.invokeStartup(StartupClassService.java:186)
at weblogic.t3.srvr.StartupClassService.invokeClass(StartupClassService.java:167)
at weblogic.t3.srvr.StartupClassService.access$0(StartupClassService.java:158)
at weblogic.t3.srvr.StartupClassService$1.run(StartupClassService.java:130)
at weblogic.security.service.SecurityServiceManager.contact admin(SecurityServiceManager.java:685)
at weblogic.t3.srvr.StartupClassService.invokeStartupClass(StartupClassService.java:125) |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu May 12, 2005 11:00 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
That's not the linked exception. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
vennela |
Posted: Thu May 12, 2005 11:04 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
For your QCF: what values did you specify for
QMANAGER
hostname
channel
port
transport
Linked Exception would be really helpful. |
|
Back to top |
|
 |
preetham |
Posted: Thu May 12, 2005 11:13 am Post subject: here is the linked exception |
|
|
Guest
|
I have one more questioni was able to sucessfully bring up the server with out specifying the channel, but my mdbs were not responding to the messages arriving in the queue, so added the channel property to connection factory.
here is the linked exception
Linked exception was: com.ibm.mq.MQException: MQJE001: An MQException occurred: Completion Code 2, Reason 2009
MQJE016: MQ queue manager closed channel immediately during connect
Closure reason = 2009
com.ibm.mq.MQException: MQJE001: An MQException occurred: Completion Code 2, Reason 2009
MQJE016: MQ queue manager closed channel immediately during connect
Closure reason = 2009
at com.ibm.mq.MQManagedConnectionJ11.<init>(MQManagedConnectionJ11.java:242)
at com.ibm.mq.MQClientManagedConnectionFactoryJ11._createManagedConnection(MQClientManagedConnectionFactoryJ11.java:276)
at com.ibm.mq.MQClientManagedConnectionFactoryJ11.createManagedConnection(MQClientManagedConnectionFactoryJ11.java:296)
at com.ibm.mq.StoredManagedConnection.<init>(StoredManagedConnection.java:80)
at com.ibm.mq.MQSimpleConnectionManager.allocateConnection(MQSimpleConnectionManager.java:171)
at com.ibm.mq.MQQueueManager.obtainBaseMQQueueManager(MQQueueManager.java:754)
at com.ibm.mq.MQQueueManager.construct(MQQueueManager.java:688)
at com.ibm.mq.MQQueueManager.<init>(MQQueueManager.java:469)
at com.ibm.mq.MQSPIQueueManager.<init>(MQSPIQueueManager.java:52)
at com.ibm.mq.jms.MQConnection.createQM(MQConnection.java:2200)
at com.ibm.mq.jms.MQConnection.createQMNonXA(MQConnection.java:1701)
at com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueConnection.java:144)
at com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueConnection.java:54)
at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:106)
at com.spcs.systemcommon.msgreceiver.Startup.register(Startup.java:151)
at com.spcs.systemcommon.msgreceiver.Startup.startup(Startup.java:272)
at weblogic.t3.srvr.StartupClassService.invokeStartup(StartupClassService.java:186)
at weblogic.t3.srvr.StartupClassService.invokeClass(StartupClassService.java:167)
at weblogic.t3.srvr.StartupClassService.access$0(StartupClassService.java:158)
at weblogic.t3.srvr.StartupClassService$1.run(StartupClassService.java:130)
at weblogic.security.service.SecurityServiceManager.contact admin(SecurityServiceManager.java:685)
at weblogic.t3.srvr.StartupClassService.invokeStartupClass(StartupClassService.java:125)
at weblogic.t3.srvr.StartupClassService.initialize(StartupClassService.java:50)
at weblogic.t3.srvr.ServerLifeCycleList.initialize(ServerLifeCycleList.java:61)
at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:786)
at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:594)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:282)
at weblogic.Server.main(Server.java:32)
thanks for all your help |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu May 12, 2005 11:16 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You *have* to specify a hostname, a port, AND a channel in order to make an MQ client connection. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
preetham |
Posted: Thu May 12, 2005 11:18 am Post subject: |
|
|
Guest
|
yeah after adding the channel property to connection factory i am getting this 2009 error message
thanks all for your help on this. |
|
Back to top |
|
 |
preetham |
Posted: Thu May 12, 2005 11:20 am Post subject: |
|
|
Guest
|
This is the sequence of methods i am calling in my weblogic startup class
MQQueueConnectionFactory factory = new MQQueueConnectionFactory();
factory.setHostName(hostName);
factory.setQueueManager(queueManager);
factory.setPort(mqPort);
factory.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP);
factory.setChannel(mqChannel);
QueueConnection connection = factory.createQueueConnection();
here i get the error message |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu May 12, 2005 11:20 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Are you specifying ALL THREE?
Are they correct? Are they in the correct case?
Is the listener running on the qmgr?
Can you otherwise establish an MQ Client connection from the same machine to the queue manager using the same information? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
preetham |
Posted: Thu May 12, 2005 11:25 am Post subject: |
|
|
Guest
|
yes I was able to use the same information to connect to the same queue manager using amqsputc after exporting the environment varaible , and all the information is correct.
I was able to connect to same queue and queue manager without specifying the channel also, but i learned that i should mention the channel, so i did and here i am stuck with 2009.
I dont have any listener on the queue manager, i am using this in weblogic so my mdbs will act as listener.
this problem is while connecting to the MQ-Series queue from a weblogic startup class. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu May 12, 2005 11:34 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You do have a listener on your queue manager if amqsputc is able to connect...
It's just not an MDB listener...
Sometimes when a client throws a 2009, there is an error that is logged on the queue manager. Check there to see if there's more information.
I can't help much with WebLogic. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
vennela |
Posted: Thu May 12, 2005 1:54 pm Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Most likely the number of channels that a QMGR can accpet has been reached.
See how many SVRCONN channels are running on the machine.
If you have created the QMGR with default values and haven't touched qm.ini, and you have arount 100 incoming channels running then that is your problem.
If you don't have a listener then you would get a 2059. |
|
Back to top |
|
 |
shantha |
Posted: Fri Jun 10, 2005 3:44 am Post subject: |
|
|
Apprentice
Joined: 11 Dec 2003 Posts: 41
|
Hi
Do you still have this problem?
If not could you please let me know as to how you solved it
regards
Shantha |
|
Back to top |
|
 |
jsanza@terra.es |
Posted: Mon Sep 05, 2005 1:50 am Post subject: |
|
|
Newbie
Joined: 28 Jul 2005 Posts: 7
|
I've tried with the following code and it works !
I got the same problems, but, i've change my classpath
adding connecto.jar and it works !
I know that is ridiculous, but that's it ...
Try with/Without the connector.jar ....
// -------------------------- begin copy & paste ---------------------------
import javax.jms.*;
import com.ibm.mq.jms.*;
public class mqtest2
{
// ADD connector.jar to classpath .. if not. .. it doesn't work !!
// Try withoutconnector.jar ... throwable exception was launched !
public static void main(String[] args) throws Exception
{
QueueSession session = null;
QueueConnection connection = null;
MQQueueConnectionFactory factory = null;
try
{
factory = new MQQueueConnectionFactory();
factory.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP);
factory.setQueueManager("QMDESMX");
factory.setHostName("10.33.3.63");
factory.setPort(1414);
factory.setChannel("SYSTEM.DEF.SVRCONN");
//factory.setTransportType(1);
connection = factory.createQueueConnection();
session =
connection.createQueueSession(true, Session.AUTO_ACKNOWLEDGE);
Queue q1 = session.createQueue("COLA_FATAL");
QueueReceiver receiver =
session.createReceiver(q1, "JMSCorrelationID IS NULL");
connection.start();
while ( true )
{
System.out.println(
"Receive the message: " + receiver.receiveNoWait());
session.commit();
}
//session.rollback();
}
catch (JMSException jmse)
{
Exception le = jmse.getLinkedException();
System.out.println(le.getMessage());
}
catch (Throwable e)
{
e.printStackTrace();
}
finally
{
if ( session != null )
{
session.close();
}
if ( connection != null )
{
connection.close();
}
}
}
}
// ------------------------- end paste --------------------------------- |
|
Back to top |
|
 |
|