How can i deliver XML elements through a JMS?

Four Stars

How can i deliver XML elements through a JMS?

Hi all,

we want to deliver XML elements with our Talend job to a JMS endpoint and for this purpose we are using at the moment tJMSOutput as you can see in the picture below:
Bildschirmfoto 2019-01-16 um 14.13.00.png

 

 

 

 

So the idea is first to list the xml elemnts with tFileList and then with tIterateFlow send them into the TJMSOutput. Is correct the way we want to transmit the XML elements into the TJMSOutput? Do we have to use other elements to transmit/read the element through the pipe into the tJMSOutput?

 

When we run our Talend job, we get an error with the next information:

 

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/daniel/Documents/XXX/testDev/.Java/lib/activemq-all-5.10.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/daniel/Documents/XXX/testDev/.Java/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]

 

And the next fatal error:

Exception in component tJMSOutput_2
javax.jms.JMSException: Cannot send, channel has already failed: tcp://X.X.X.X:54706
    at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:72)
    at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1435)
    at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1522)
    at org.apache.activemq.ActiveMQConnection.start(ActiveMQConnection.java:527)
    at ean.ean_110_forecast_to_xml_test_final_v02_0_1.EAN_110_FORECAST_TO_XML_TEST_final_v02.tIterateToFlow_1_AIProcess(EAN_110_FORECAST_TO_XML_TEST_final_v02.java:10607)
    at ean.ean_110_forecast_to_xml_test_final_v02_0_1.EAN_110_FORECAST_TO_XML_TEST_final_v02.tFileList_1Process(EAN_110_FORECAST_TO_XML_TEST_final_v02.java:10336)
    at

 

I'm not quite sure what i'm doing wrong. I would be ver thankful for any help.

 

Greetings,

Daniel

Forteen Stars

Re: How can i deliver XML elements through a JMS?

you do not need tIterateToFlow

but you must read the context of the file and send this data, not the file name

-----------
Four Stars

Re: How can i deliver XML elements through a JMS?

Hi Vapukov,

 

thank you for your answer and apologize for my late reply. I have continue working in this issue and modified the Talend Job. Im still having the next error in tJMSOutput: "Exception in component tJMSOutput_2
java.lang.ClassCastException: routines.system.Document cannot be cast to javax.jms.Message
at "

 

Im trying to read the elements obtained thorugh tFileList with a tFileInputXMl and then sending those xmls into the tJMSOutput

 

tFileList---tFileInputXMl---tJMSOutput

 

Bildschirmfoto 2019-03-05 um 09.58.26.pngBildschirmfoto 2019-03-05 um 09.52.30.png

 

Do i have to use other elements to make this process? I was following the example showed in help.Talend "https://help.talend.com/reader/iYcvdknuprDzYycT3WRU8w/rPN_jV8ZS46PRh1IacipVg?section=jzhang-20120420..."

 

Thanks in advance for your help.

 

Greetings

 

Daniel

Four Stars

Re: How can i deliver XML elements through a JMS?

Okay I have solved now the Problem. I had to use as column in tFileInputXML "messageContent" as string and in tJMSOutput as Processing Mode "Message Content". Im going to check if the results are correct in the ESB but it looks better. Thanks for your help

 

Bildschirmfoto 2019-03-05 um 10.20.39.png

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend

Blog