-
1. Re: Can not publish a MapMessage
gmand Oct 27, 2004 2:15 PM (in response to gmand)Anyone? Ideas?
-
2. Re: Can not publish a MapMessage
kturner75 Nov 30, 2004 4:27 PM (in response to gmand)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)
-
3. Re: Can not publish a MapMessage
kturner75 Nov 30, 2004 5:48 PM (in response to gmand)Apparently, the MapMessage is not compatible with different versions of JBoss. The ClassCastException occurred when sending a MapMessage from JBoss 4.0.0 server to JBoss 3.2.3 server. The error does not occur when sending a MapMessage among JBoss 4.0.0 servers.
-
4. Re: Can not publish a MapMessage
genman Nov 30, 2004 11:52 PM (in response to gmand)
Probably versions 3.2.6+ and 4.0 are serializable compatible. -
5. Re: Can not publish a MapMessage
starksm64 Dec 2, 2004 1:41 PM (in response to gmand)The jms MapMessage implementation changed between 3.2.3 and 3.2.6 such that its not serializable compatible, but the serialVersionUID was not changed.
-
6. Re: Can not publish a MapMessage
paul_adp Mar 28, 2005 11:59 AM (in response to gmand)Unfortunately our environment has a number of JMS clients talking to a 3.2.3 JMS server. We had planned to update SOME of the the JMS clients to 3.2.6 when we experienced this class compatibility problem.
My question is can we RELIABLY backport the MQ version in 3.2.3 to the 3.2.6 version? I was able to get our 3.2.6 clients to work by overlaying the 3.2.6 version of server\APP\lib\jboss-mq.jar with the one from 3.2.3. I'm just wondering if anyone else has done this with good results.
Thanks in advance. -
7. Re: Can not publish a MapMessage
genman Mar 28, 2005 3:01 PM (in response to gmand)
I would just overlay the class (MapMessage) itself from 3.2.3 in the 3.2.6 classfile. This would probably the most trouble free. Your milage may vary, however.