activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pepgrifell <>
Subject error "This producer can only send messages to..." in JBoss6 with embedded ActiveMQ4.1.1
Date Mon, 14 May 2012 14:54:52 GMT

We are migrating from JBoss4.2.3 to JBoss6.1.  We have ActiveMQ integrated
in JBoss 4 and it works ok. 
Following this link:  I have migrated to
JBoss 6.  The application is deployed correctly but when I try to send a
message to a queue I get this error:

Caused by: java.lang.UnsupportedOperationException: This producer can only
send messages to: HomeTAOEventsQueue

This error is thrown in the class ActiveMQMessageProducer. I have debbuged
the application and when the method ActiveMQMessageProducer.send is called,
it does this comparation (can't find how to tag code):

            public void send(Destination destination, Message message, int
deliveryMode, int priority, long timeToLive)
            throws JMSException {
        if (destination == null) {
            if( info.getDestination() == null ) {
                throw new UnsupportedOperationException("A destination must
be specified.");
            throw new InvalidDestinationException("Don't understand null

        ActiveMQDestination dest; 
        if( destination == info.getDestination() ) {
            dest = (ActiveMQDestination) destination;
        } else  if ( info.getDestination() == null ) {
            dest = ActiveMQDestination.transform(destination);
        } else {
            throw new UnsupportedOperationException("This producer can only
send messages to: " +;
        if (dest == null) {
            throw new JMSException("No destination specified");
        this.session.send(this, dest, message, deliveryMode, priority,

The code 'destination == info.getDestination()'  returns false !

'info.getDestination()' returns an ActiveMQQueue object instantiaded in
constructor and its physicalName is 'HomeTAOEventsQueue'.  

'destination' is a ActiveMQQueue passed as a parameter when calling the
'sender' method. Its physicalName is 'HomeTAOEventsQueue'.  

In the line I posted above, the comparision returns "false" but I don't know
why ... 

Any help ?
Thanks !

pd: I can post configuration files if needed.

View this message in context:
Sent from the ActiveMQ - User mailing list archive at
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message