2 Replies Latest reply on Apr 13, 2005 10:46 AM by Jesse McConnell

    SpyMapMessage: java.lang.ClassCastException: java.util.HashM

    Jesse McConnell Newbie

      annot create a ConnectionReceiver; - nested throwable: (java.lang.ClassCastException: java.util.HashMap)
      ERROR [UIL2.SocketManager.ReadTask#27] (SocketManager.java:389) - Exiting on unexpected error in read task
      java.lang.ClassCastException: java.util.HashMap
      at org.jboss.mq.SpyMapMessage.readExternal(SpyMapMessage.java:426)
      at org.jboss.mq.SpyMessage.readMessage(SpyMessage.java:726)
      at org.jboss.mq.il.uil2.msgs.ReceiveMsg.read(ReceiveMsg.java:70)
      at org.jboss.mq.il.uil2.SocketManager$ReadTask.run(SocketManager.java:304)
      at java.lang.Thread.run(Thread.java:595)

      env:
      Linux ideation 2.4.28 #6 SMP Mon Mar 14 09:25:03 CST 2005 i686 Intel(R) XEON(TM) CPU 2.00GHz GenuineIntel GNU/Linux

      16:58:13,896 INFO [Server] Release ID: JBoss [Zion] 4.0.2RC1 (build: CVSTag=JBoss_4_0_2_RC1 date=200503140913)


      I have jboss running on jdk14 with an internal message queue. Previously the only thing being inserted into it was TextMessages but I appear to have run across a size restricton on the length of Strings for StringProperties. I am converting one of the messages that goes into the queue to a MapMessage to get those long strings into the body the message.

      I have a consumer sitting an external tomcat (jakarta-tomcat-5.5.7) instance running on jdk 1.5 trying to consume messages out of that queue.

      Looking through the SpyMapMessage source it would appear that we are getting in a object and just trying to cast it to a HashMap and that is kicking out that class cast exception.

      I am sure that the message going into the queue is a MapMessage and we seem to be trying to pull a map message out of it...

      anyone have suggestions? I was about to submit a bug to jira but figured I would give this a shot first.