[jboss-user] [Messaging, JMS & JBossMQ] Problems getting ConnectionFactory from a standalone client.

Jaime Piñeiro jaime.pinheiro at publicinet.net
Tue Jun 19 11:20:39 EDT 2007


Hi.

I´m using JBoss 4.2.0-GA and i created a new Queue in file
jbossmq-destinations-service.xml with the following lines:

 <mbean code="org.jboss.mq.server.jmx.Queue"
         name="jboss.mq.destination:service=Queue,name=WC">
    <depends
optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
    <depends
optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
    <attribute name="MessageCounterHistoryDayLimit">-1</attribute>
  </mbean>

Then i try to get the ConnectionFactory and the queue from an external
standalone client with this code:


                InitialContext ctx = new InitialContext(properties);
                queue = (Queue) ctx.lookup("queue/WC");
                queueConnectionFactory = (QueueConnectionFactory)
ctx.lookup("java:/ConnectionFactory");  
                connection =
queueConnectionFactory.createQueueConnection();

And i get the following message:

    Exception in thread "main" java.lang.NoClassDefFoundError: Could not
initialize class org.jboss.util.NestedThrowable$Util
        at org.jboss.mq.SpyJMSException.<init>(SpyJMSException.java:110)
        at
org.jboss.mq.SpyJMSException.getAsJMSException(SpyJMSException.java:72)
        at
org.jboss.mq.SpyJMSException.rethrowAsJMSException(SpyJMSException.java:57)
        at org.jboss.mq.Connection.<init>(Connection.java:271)
        at org.jboss.mq.Connection.<init>(Connection.java:323)
        at org.jboss.mq.SpyConnection.<init>(SpyConnection.java:116)
        at
org.jboss.mq.SpyConnectionFactory.internalCreateConnection(SpyConnectionFactory.java:137)
        at
org.jboss.mq.SpyConnectionFactory.createQueueConnection(SpyConnectionFactory.java:108)
        at pruebas.TestJMSClient.send(TestJMSClient.java:82)

I don´t know what am i doing wrong. Could somebody help me?

Regards




More information about the jboss-user mailing list