activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lernit2007 <>
Subject ClassCastException
Date Fri, 02 Jul 2010 10:25:09 GMT


I have a following interface:

public interface Test extends Message {

public void testMessage();

public void getString();


If I get a Message I want to cast the Message in Test:

public void onMessage(Message message) {
   Test test = (Test) message;


But I get the following Exception:

org.apache.activemq.command.ActiveMQTextMessage cannot be cast to Test.

Can you help me further please? I don't know, what the problem is.
View this message in context:
Sent from the ActiveMQ - Dev mailing list archive at

View raw message