activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From neek <>
Subject Re: Stomp message from PHP client, "Unsupported message type 'MapMessage'" from Java server
Date Sun, 07 Aug 2011 04:57:08 GMT
I've made some progress.  Now I'm stumbling over the required format of the
map message sent from PHP.  My various combinations of arrays are causing
the xstream processing to throw exceptions and I can't figure out what I'm
doing wrong yet.

For the record:

Getting the activemq source and telling Netbeans to use that as the 'source
directory' for the jars I was running with allows me to set breakpoints in
ActiveMQ and step through the code.  I had missed including jettison-1.2.jar
on my classpath.  The code in JmsFrameTranslator:

				case JMS_MAP_JSON:
					in = new JettisonMappedXmlDriver().createReader(new
					msg = createMapMessage(in);

was throwing a NoClassDefFound exception for
org/codehaus/jettison/mapped/Configuration in the call to createReader ..
however, the catch block just below this code does this:

			} catch (Throwable e) {
				msg = super.convertFrame(converter, command);

This error message was not reaching me, so I had no idea a NoClassDefFound
exception was happening.  Adding jettison-1.2.jar got me past the
createReader() call.

However, the same "Unsupported message type 'MapMessage'" persisted, even
when the unmarshalling was being attempted.  I managed to trace the java
code to the lines in JmsFrameTranslator:

	protected ActiveMQMapMessage createMapMessage(HierarchicalStreamReader in)
throws JMSException {
		ActiveMQMapMessage mapMsg = new ActiveMQMapMessage();
		Map&lt;String, Object&gt; map = (Map&lt;String,

This unmarshallaing is now throwing exceptions.

All this led me back to,
which is verbose and hard to read but does contain working code.  It seems
the exact format of the PHP array you have to send is very particular.

I might just fall back to sending a simple string of json encoded data and
do the unmarshallaing myself.  Stepping through the xstream unmarshalling is
really painful, all for the sake of sending a well formatted MapMessage.


View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message