[jboss-user] [JBoss Messaging] New message: "connect to Jboss Messaging queue remotely"

nie feng do-not-reply at jboss.com
Tue Mar 16 10:42:12 EDT 2010


User development,

A new message was posted in the thread "connect to Jboss Messaging queue remotely":

http://community.jboss.org/message/532298#532298

Author  : nie feng
Profile : http://community.jboss.org/people/niefeng

Message:
--------------------------------------------------------------
Hi all,
 
I am trying to connect from Jboss4.2.2 (JBOSS MQ, act as jms client) to send the jms message to a queue deployed in JBOSS5.1 (Jboss Messaging, act as queue host). I have placed the "jboss-messaging-client.jar" in the JBOSS4.2.2 so that it can establish the connection to the queue in jboss5.
 
|| *Code snippet for the JMS client
* ||
| JNDIFinder jndiFinder = new JNDIFinder(jmsDest.getLookupProperties());
 
conn = createConnection(connFactory, jmsDest);
session = createSession(conn, false, Session.AUTO_ACKNOWLEDGE);
Destination dest = lookupDestination(jmsDest.getJndiName(), jndiFinder);
          
producer = createProducer(session, dest);
.......
.......
TextMessage textMsg = session.createTextMessage();
......
......
producer.send(textMsg ); |
 
*The JNDI lookup and the connection factory JNDI used by the JMS client*
java.naming.provider.url=*remoteHost*:1099
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming
 
connection factory JNDI name   = ConnectionFactory
 
*RemoteQueue JNDI Name*
queue/GtasNotificationReceiveQueue
 
I encountered the following error
 
|| *Header 1* ||
| [16:03:10-17:56:11,041][JMS SessionPool Worker-6][ERROR][APP.ALERT][003.001.006][JmsRetryListenerMDBean.invoke] Error occured while sending the jms msg: Wrong target. class org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate for public org.jboss.jms.delegate.CreateConnectionResult org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.createConnectionDelegate(java.lang.String,java.lang.String,int) throws javax.jms.JMSException
*java.lang.IllegalArgumentException: Wrong target. class org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate for public org.jboss.jms.delegate.CreateConnectionResult org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.createConnectionDelegate(java.lang.String,java.lang.String,int)* throws javax.jms.JMSException
    at org.jboss.aop.joinpoint.MethodInvocation.handleErrors(MethodInvocation.java:141)
    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:116)
    at org.jboss.jms.client.container.StateCreationAspect.handleCreateConnectionDelegate(StateCreationAspect.java:81)
    at org.jboss.aop.advice.org.jboss.jms.client.container.StateCreationAspect0.invoke(StateCreationAspect0.java)
    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
    at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.createConnectionDelegate(ClientConnectionFactoryDelegate.java)
    at org.jboss.jms.client.JBossConnectionFactory.createConnectionInternal(JBossConnectionFactory.java:205)
    at org.jboss.jms.client.JBossConnectionFactory.createConnection(JBossConnectionFactory.java:87)
    at org.jboss.jms.client.JBossConnectionFactory.createConnection(JBossConnectionFactory.java:82) |
 
Could i know why the above error will throw? It should not be due to the multiple +ClientConnectionFactoryDelegate+ class with different version in the same classpath; (i have removed such class from the "jboss-messaging-client.jar", and when i create the connection, i encountered ClassNotFound Error)
 
Thanks
Niefeng

--------------------------------------------------------------

To reply to this message visit the message page: http://community.jboss.org/message/532298#532298




More information about the jboss-user mailing list