Я работаю над миграцией Mule с 3.9 на 4.1.4, пытаюсь опубликовать ArrayList, преобразованный в JSON, затем отправить в очередь JMS (используя ActiveMQ), получая сообщение об ошибке ниже
Код:
<sub-flow name="xxxx_part_data_to_messaging_system_flow">
<logger level="INFO" doc:name="Logger" doc:id="0607190d-f3ed-4b1b-a5b4-3572c08cf2d5" message='[vars.correlationId ++ "" ++ vars.batch_id]'/>
<jms:publish doc:name="xxxx-part-data-jms-queue" doc:id="b44b1880-7374-4e4d-a0e0-1b4ab193ade4" config-ref="transactional_data_jms_connection_config" destination="${ld.transaction.xxxx.part.messaging.queue}">
<jms:message >
<jms:body ><![CDATA[#[[payload]]]]></jms:body>
</jms:message>
</jms:publish>
<logger message="#[" $(vars.correlationId)-$(vars.batch_id) xxxx part posted successfully into transaction data queue ${ld.transaction.xxxx.part.messaging.queue}"]" level="INFO" doc:name="Logger" />
</sub-flow>
Ошибка:
the data fetched from DB is ArrayList
An error occurred while sending a message to the QUEUE: [ld.stock.part.queue]:
Invalid type passed to StreamMessage: java.util.ArrayList . Allowed types are:
Boolean, Byte, Short, Character, Integer, Long, Float, Double,String and
byte[]. Invalid type passed to StreamMessage: java.util.ArrayList . Allowed
types are: Boolean, Byte, Short, Character, Integer, Long, Float, Double,String
and byte[].
Error type : JMS:ILLEGAL_BODY