PDA

View Full Version : jms string too long error



kbohnenberger
Dec 18th, 2009, 02:56 PM
I'm using SI 1.3

I'm listening to incoming messages using the message-driven-channel adapter.
If the incoming message is too big I get the following:

Caused by: org.springframework.jms.UncategorizedJmsException: Uncategorized exception occured during JMS processing; nested exception is com.sun.messaging.jms.JMSException: [C4001]: Writ\
e packet failed. - cause: java.io.UTFDataFormatException: encoded string too long: 99992 bytes
at org.springframework.jms.support.JmsUtils.convertJm sAccessException(JmsUtils.java:308)
at org.springframework.jms.support.JmsAccessor.conver tJmsAccessException(JmsAccessor.java:168)
at org.springframework.jms.core.JmsTemplate.execute(J msTemplate.java:474)
at org.springframework.jms.core.JmsTemplate.send(JmsT emplate.java:539)
at org.springframework.jms.core.JmsTemplate.convertAn dSend(JmsTemplate.java:617)
at org.springframework.jms.core.JmsTemplate.convertAn dSend(JmsTemplate.java:609)
at org.springframework.integration.jms.JmsSendingMess ageHandler.handleMessage(JmsSendingMessageHandler. java:62)
at org.springframework.integration.dispatcher.Broadca stingDispatcher.invokeHandler(BroadcastingDispatch er.java:119)
at org.springframework.integration.dispatcher.Broadca stingDispatcher.dispatch(BroadcastingDispatcher.ja va:110)
at org.springframework.integration.channel.AbstractSu bscribableChannel.doSend(AbstractSubscribableChann el.java:43)

kbohnenberger
Dec 18th, 2009, 03:43 PM
Looks like this problem is actually happening later in the flow when I'm trying to publish the messages to the JMS queue using the org.springframework.jms.core.JmsTemplate

chudak
Dec 18th, 2009, 04:06 PM
http://stackoverflow.com/questions/1466184/convert-ansi-characters-to-utf-8-in-java

If you are sending this large of a message perhaps you should be using a stream message and not a text message?

kbohnenberger
Dec 18th, 2009, 04:39 PM
I'm still struggling to debug the problem.
If I short circuit the flow and basically connect the outgoing jms publisher to the channel that the incoming message-driven-channel-adapter publishes to I do not get the exception. So it appears that in this case the size of the message is no problem. I'll post more as I close in on the problem.

kbohnenberger
Dec 18th, 2009, 04:42 PM
The intriguing thing is that if I remove the jms publisher at the end of the flow and connect a "do nothing" service adapter, I do not get an exception either. It seems to be a combination of what is happening in the flow, along with the jms publisher at the end of the flow.

kbohnenberger
Dec 18th, 2009, 05:09 PM
OK, Sorry for the post.
I just figured out my problem.
In my flow I set a JMS String property with a list of keys from the incoming message.
It was this property that was getting to big that was causing my error.

iwein
Dec 20th, 2009, 04:29 AM
Don't apologize for saving someone else a few hours of debugging, thanks for sharing.