<strong>JMS & MQSeries:</strong> NoSuchMethod Error in createQueueConnection.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ignacio_Lacosta
Posted On:   Monday, March 11, 2002 07:51 AM

We try to write our "Hello World!" with JMS and MQSeries and we get the error "No Such Method (createQueueConnection)" when we want create the connection: "QueueConnection connection; connection = factory.createQueueConnection();" The sample program retrieves the Connection factory and Queue from an LDAP server and make a connection to MQSeries Manager. We checked the configuration and the connection to LDAP server and are OK. We use the MQSeries support pack MA88. JDK version: 1.3.1_01. (The original sample program from IBM doesn't work too) import javax.jms.*; import javax.naming.*; import javax.namin   More>>

We try to write our "Hello World!" with JMS and MQSeries and we get the error "No Such Method (createQueueConnection)" when we want create the connection: "QueueConnection connection;

connection = factory.createQueueConnection();"


The sample program retrieves the Connection factory and Queue from an LDAP server and make a connection to MQSeries Manager. We checked the configuration and the connection to LDAP server and are OK.

We use the MQSeries support pack MA88.

JDK version: 1.3.1_01.


(The original sample program from IBM doesn't work too)


import javax.jms.*;

import javax.naming.*;

import javax.naming.directory.*;


public class test5

{

public static void main( String[] args )

{

System.out.println ("JMS & MQSeries Test");

java.util.Hashtable env = new java.util.Hashtable();

String icf = "com.sun.jndi.ldap.LdapCtxFactory";

String url = "ldap://192.168.1.55:389/ou=MQSeries,o=ACME";



try {

env.put(Context.INITIAL_CONTEXT_FACTORY,icf);

env.put(Context.PROVIDER_URL,url);

env.put(Context.REFERRAL,"throw");

env.put(Context.SECURITY_AUTHENTICATION, "none"
);


Context ctx = new InitialDirContext(env);


QueueConnectionFactory factory;

factory = (QueueConnectionFactory)ctx.lookup("HERMES");


QueueConnection connection;

// In the next line a NoSuchMethod occurs

connection = factory.createQueueConnection();




connection.close();

}

catch( Exception e ) {

System.out.println ("Fallo: "+e);


}

System.out.println ("End of Test");


}

}



Thanks in advance.



Ignacio Lacosta
   <<Less

Re: <strong>JMS & MQSeries:</strong> NoSuchMethod Error in createQueueConnection.

Posted By:   Brian_McCarty  
Posted On:   Saturday, March 16, 2002 08:43 AM

I can't remember the reason that this happens, but the order of your classpath needs to change.

Put all of the MA88 classes in your classpath first before the WAS ones or SDK.

Let me know if that doesn't work and I will refer to the person that has the documentation the last time we had this problem.

BMMc.
About | Sitemap | Contact