You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Benoitx <be...@yahoo.com> on 2009/04/23 14:24:00 UTC

Re: Cannot cast to Command...

Hi

Thanks for the link...  Unfortunately, the "cannot cast" exception still
happens on Ubuntu Server 8.10 32b, even with 5.3-SNAPSHOT.

The app is well behaved on OpenSolaris, XP 32, Vista, etc but the following
seems to happen EVERY MINUTE with AciveMQ trying to establish a
connection...

We're trying to establish a TCP connection on a port but (catch-22) the
second application is not there initially.  This is working fine in many
environment but not Ubuntu apperently... unless it is due to us using
VMWare?

Any suggestion would be greatly appreciated...

1/ What is the root cause of that problem?
2/ Is there a patch?
3/ If the app was not logging an ERROR for each of those... would it work
when all apps are running?

Thanks!

Benoit

2009-04-23 13:03:53,776 INFO  [network.DiscoveryNetworkConnector#?] (Simple
Discovery Agent: java.util.concurrent.ThreadPoolExecutor$Worker@139d891:)
Establishing network connection from vm://appendium-jboss-server to
tcp://localhost:27000
2009-04-23 13:03:53,778 DEBUG [tcp.TcpTransport#?] (Simple Discovery Agent:
java.util.concurrent.ThreadPoolExecutor$Worker@139d891:) Stopping transport
tcp://null:0
2009-04-23 13:03:53,779 DEBUG [broker.TransportConnection#?] (ActiveMQ
Transport Initiator: vm://appendium-jboss-server#18:) stop() called in the
middle of start(). Delaying...
2009-04-23 13:03:53,792 WARN  [network.DiscoveryNetworkConnector#?] (Simple
Discovery Agent: java.util.concurrent.ThreadPoolExecutor$Worker@139d891:)
Could not start network bridge between: vm://appendium-jboss-server and:
tcp://localhost:27000 due to: java.net.ConnectException: Connection refused
2009-04-23 13:03:53,792 DEBUG [network.DiscoveryNetworkConnector#?] (Simple
Discovery Agent: java.util.concurrent.ThreadPoolExecutor$Worker@139d891:)
Start failure exception: java.net.ConnectException: Connection refused
java.net.ConnectException: Connection refused
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
        at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
        at java.net.Socket.connect(Socket.java:519)
        at
org.apache.activemq.transport.tcp.TcpTransport.connect(TcpTransport.java:435)
        at
org.apache.activemq.transport.tcp.TcpTransport.doStart(TcpTransport.java:401)
        at
org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:53)
        at
org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:57)
        at
org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:57)
        at
org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:72)
        at
org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:57)
        at
org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:57)
        at
org.apache.activemq.network.DemandForwardingBridgeSupport.start(DemandForwardingBridgeSupport.java:225)
        at
org.apache.activemq.network.DiscoveryNetworkConnector.onServiceAdd(DiscoveryNetworkConnector.java:114)
        at
org.apache.activemq.transport.discovery.simple.SimpleDiscoveryAgent$1.run(SimpleDiscoveryAgent.java:165)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)
2009-04-23 13:03:53,792 DEBUG [network.DemandForwardingBridge#?] (Simple
Discovery Agent: java.util.concurrent.ThreadPoolExecutor$Worker@139d891:) 
stopping appendium-jboss-server bridge to Unknown is disposed already ?
false
2009-04-23 13:03:53,793 DEBUG [network.DemandForwardingBridge#?]
(NetworkBridge:) Caught exception sending shutdown
org.apache.activemq.transport.TransportDisposedIOException: Transport
disposed.
        at
org.apache.activemq.transport.vm.VMTransport.oneway(VMTransport.java:74)
        at
org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:40)
        at
org.apache.activemq.transport.ResponseCorrelator.oneway(ResponseCorrelator.java:60)
        at
org.apache.activemq.network.DemandForwardingBridgeSupport$5.run(DemandForwardingBridgeSupport.java:371)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)
2009-04-23 13:03:53,795 INFO  [network.DemandForwardingBridge#?] (Simple
Discovery Agent: java.util.concurrent.ThreadPoolExecutor$Worker@139d891:)
appendium-jboss-server bridge to Unknown stopped
2009-04-23 13:03:53,793 DEBUG [broker.TransportConnection#?] (ActiveMQ
Transport Initiator: vm://appendium-jboss-server#18:) Calling the delayed
stop()
2009-04-23 13:03:53,797 DEBUG [simple.SimpleDiscoveryAgent#?] (Simple
Discovery Agent: java.util.concurrent.ThreadPoolExecutor$Worker@32cd7f:)
Failure occured soon after the discovery event was generated.  It will be
clasified as a connection failure:
org.apache.activemq.transport.discovery.simple.SimpleDiscoveryAgent$SimpleDiscoveryEvent@122e0b3
2009-04-23 13:03:53,824 DEBUG [simple.SimpleDiscoveryAgent#?] (Simple
Discovery Agent: java.util.concurrent.ThreadPoolExecutor$Worker@32cd7f:)
Waiting 30000 ms before attepting to reconnect.
2009-04-23 13:03:53,824 DEBUG [broker.TransportConnection#?] (ActiveMQ
Transport Stopper: vm://appendium-jboss-server#18:) Stopping connection:
vm://appendium-jboss-server#18
2009-04-23 13:03:53,859 DEBUG [broker.TransportConnection#?] (ActiveMQ
Transport Stopper: vm://appendium-jboss-server#18:) Stopped transport:
vm://appendium-jboss-server#18
2009-04-23 13:03:53,862 DEBUG [broker.TransportConnection#?] (ActiveMQ
Transport Stopper: vm://appendium-jboss-server#18:) Connection Stopped:
vm://appendium-jboss-server#18
2009-04-23 13:03:53,863 ERROR [broker.TransportConnector#?] (ActiveMQ
Transport Initiator: vm://appendium-jboss-server#18:) Could not accept
connection : java.lang.Object cannot be cast to
org.apache.activemq.command.Command
2009-04-23 13:03:53,863 DEBUG [broker.TransportConnector#?] (ActiveMQ
Transport Initiator: vm://appendium-jboss-server#18:) Reason:
java.lang.Object cannot be cast to org.apache.activemq.command.Command
java.lang.ClassCastException: java.lang.Object cannot be cast to
org.apache.activemq.command.Command
        at
org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:89)
        at
org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68)
        at
org.apache.activemq.transport.vm.VMTransport.start(VMTransport.java:126)
        at
org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:57)
        at
org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:57)
        at
org.apache.activemq.broker.TransportConnection.start(TransportConnection.java:880)
        at
org.apache.activemq.broker.TransportConnector$1$1.run(TransportConnector.java:213)





Dejan Bosanac wrote:
> 
> Hi Benoit,
> 
> try this location
> https://repository.apache.org/content/repositories/snapshots/org/apache/activemq/activemq-ra/5.3-SNAPSHOT/
> 
> Cheers
> --
> Dejan Bosanac
> 
> Open Source Integration - http://fusesource.com/
> ActiveMQ in Action - http://www.manning.com/snyder/
> Blog - http://www.nighttale.net
> 
> 
> On Wed, Apr 22, 2009 at 7:38 PM, Benoitx <be...@yahoo.com> wrote:
> 
>>
>> Hi
>>
>> We've installed our application on Ubuntu Server 8.10; our app uses
>> ActiveMQ
>> 5.2 and was well behaved so far...
>>
>> The Ubuntu environment seems to throw an awful lot of unhelpful messages:
>>
>> Could not accept connection : java.lang.Object cannot be cast to
>> org.apache.activemq.command.Command
>>
>> I have noticed the JIRA 2092
>> https://issues.apache.org/activemq/browse/AMQ-2092
>> Which seems to imply that a better error message is possible.
>>
>> It may help us to figure out what is happening and why we suddenly get
>> all
>> those errors (1 every minute!)  Has anyone experienced these on Ubuntu
>> server?
>>
>> We're using JDK 1.6.0_10.
>>
>> So I decided to try 5.3-SNAPSHOT and downloaded the app here:
>>
>> https://repository.apache.org/content/repositories/snapshots/org/apache/activemq/apache-activemq/5.3-SNAPSHOT/
>>
>> It does not however seem to contain the activemq-ra-5.3-SNAPSHOT.jar
>> which
>> I
>> need for embedding ActiveMQ in my JBoss.
>>
>> Where could I find it without having to rebuild the lot...
>>
>> Thanks
>>
>> Benoit.
>>
>> -----
>> Thanks & Regards,
>>
>> Benoit
>>
>> http://www.Appendium.com   http://objectlab.blogspot.com
>>
>> --
>> View this message in context:
>> http://www.nabble.com/where-is-activemq-ra-fro-5.3-SNAPSHOT--tp23175779p23175779.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -----
> Dejan Bosanac
> 
> Open Source Integration - http://fusesource.com/
> ActiveMQ in Action - http://www.manning.com/snyder/
> Blog - http://www.nighttale.net
> 


-----
Thanks & Regards,

Benoit

http://www.Appendium.com   http://objectlab.blogspot.com

-- 
View this message in context: http://www.nabble.com/where-is-activemq-ra-fro-5.3-SNAPSHOT--tp23175779p23195819.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.