activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Mielke <tors...@fusesource.com>
Subject Re: error "This producer can only send messages to..." in JBoss6 with embedded ActiveMQ4.1.1
Date Mon, 21 May 2012 14:51:17 GMT
Hello,

Not sure about your problem but ActiveMQ 4.1 is really old. You may want to consider upgrading
to the latest version of ActiveMQ 5.5.1.

If the same destination is used to create the ActiveMQMessageProducer as well as when sending
a message, this should not cause any problems. 


Torsten Mielke
torsten@fusesource.com
tmielke@blogspot.com


On May 14, 2012, at 4:54 PM, pepgrifell wrote:

> hi,
> 
> We are migrating from JBoss4.2.3 to JBoss6.1.  We have ActiveMQ integrated
> in JBoss 4 and it works ok. 
> Following this link:  http://activemq.apache.org/outbound-communication.html
> http://activemq.apache.org/outbound-communication.html  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
> 	at
> org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:459)
> [:4.1.1]
> 	at
> org.apache.activemq.ActiveMQQueueSender.send(ActiveMQQueueSender.java:139)
> [:4.1.1]
> 
> This error is thrown in the class ". 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 {
>        checkClosed();
>        if (destination == null) {
>            if( info.getDestination() == null ) {
>                throw new UnsupportedOperationException("A destination must
> be specified.");
>            }
>            throw new InvalidDestinationException("Don't understand null
> destinations");
>        }
> 
>        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: " + this.info.getDestination().getPhysicalName());
>        }
>        if (dest == null) {
>            throw new JMSException("No destination specified");
>        }
> 
>        this.session.send(this, dest, message, deliveryMode, priority,
> timeToLive);
>        stats.onMessage();            
>    }
> 
> 
> 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: http://activemq.2283324.n4.nabble.com/error-This-producer-can-only-send-messages-to-in-JBoss6-with-embedded-ActiveMQ4-1-1-tp4632351.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.




Mime
View raw message