activemq-dev mailing list archives

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

Hello,

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:

java.lang.ClassCastException:
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: http://old.nabble.com/ClassCastException-tp29054743p29054743.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Mime
View raw message