I get a ClassCastException when attempting to send a MapMessage to a queue.
I'm running JBoss 4.0.0. The same code worked in JBoss 3.2.3.
| MapMessage message = queueSession.createMapMessage();
| for (Iterator iter = messageData.keySet().iterator(); iter.hasNext();)
| {
| String key = (String) iter.next();
| Object value = messageData.get(key);
| message.setObject(key, value);
| }
|
| queueSender.send(message);
|
The ClassCastException occurs on the "queueSender.send" line. See the stack
trace below.
| 14:14:34,538 INFO [STDOUT] org.jboss.mq.SpyJMSException: Cannot send a
message to the JMS server; - nested throwable: (java.lang.ClassCastException:
java.util.HashMap)
| 14:14:34,569 INFO [STDOUT] at
org.jboss.mq.Connection.sendToServer(Connection.java:1028)
| 14:14:34,585 INFO [STDOUT] at
org.jboss.mq.SpySession.sendMessage(SpySession.java:1005)
| 14:14:34,600 INFO [STDOUT] at
org.jboss.mq.SpyMessageProducer.send(SpyMessageProducer.java:265)
| 14:14:34,616 INFO [STDOUT] at
org.jboss.mq.SpyMessageProducer.send(SpyMessageProducer.java:199)
| 14:14:34,631 INFO [STDOUT] at
com.actek.j2ee.common.process.DefaultJMSConnection.sendMessage(DefaultJMSConnection.java:143)
|
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3856952#3856952
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3856952
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user