1 Reply Latest reply on Apr 25, 2006 6:34 AM by Anders Thörnström

    java.lang.ClassCastException: org.jboss.mq.SpyQueue when cas

    Anders Thörnström Newbie

      i have put up a simple message driven bean on AS 4.0.4rc2

      @MessageDriven(activationConfig =
      public class PositioningListner implements MessageListener{
       public void onMessage(Message message) {
       TextMessage textMessage = (TextMessage)message;
       System.out.println("Recived Positioning Request for:" +textMessage);

      this gets deployed fine and the queue gets auto created but when i try to acces it with
      InitialContext ctx = new InitialContext();
       Object obj = ctx.lookup("queue/PositioningRequests");
       javax.jms.Queue queue = (javax.jms.Queue)obj;

      i get java.lang.ClassCastException: org.jboss.mq.SpyQueue
      could it be a classloader problem ?