<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: problem when fetching an ObjectMessage from ActiveMQ with a tMomInput in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/problem-when-fetching-an-ObjectMessage-from-ActiveMQ-with-a/m-p/2236191#M24985</link>
    <description>Hi cj, 
&lt;BR /&gt;thanks for the pointers. 
&lt;BR /&gt;I tried the same today and although its seems quite straightforward, I'm kind of stuck now. 
&lt;BR /&gt;It works in the Java Debug mode but not in Trace Debug and (basic) Run. 
&lt;BR /&gt;In Trace Debug I get the following exception: 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;We will consume messages while they continue to be delivered &lt;BR /&gt;Exception in component tMomInput3_1&lt;BR /&gt;javax.jms.JMSException: Failed to build body from bytes. Reason: java.io.IOException: org.apache.camel.converter.jaxp.StringSource&lt;BR /&gt; at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)&lt;BR /&gt; at org.apache.activemq.command.ActiveMQObjectMessage.getObject(ActiveMQObjectMessage.java:183)&lt;BR /&gt; at testprojekt.dd_0_1.dd.tMomInput3_1Process(dd.java:452)&lt;BR /&gt; at testprojekt.dd_0_1.dd.runJobInTOS(dd.java:817)&lt;BR /&gt; at testprojekt.dd_0_1.dd.main(dd.java:684)&lt;BR /&gt;Caused by: java.io.IOException: org.apache.camel.converter.jaxp.StringSource&lt;BR /&gt; at org.apache.activemq.command.ActiveMQObjectMessage.getObject(ActiveMQObjectMessage.java:179)&lt;BR /&gt; ... 3 more&lt;BR /&gt; disconnected&lt;BR /&gt; disconnected&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;This is the relevant implementation of my tMomInput2_begin.javajet file: 
&lt;BR /&gt; 
&lt;PRE&gt;/*-----------------------------------------------------------4.judge message body type---------------------------------------*/&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;			if ("Text".equals(msgBobyType)) {&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;			} else if ("ActiveMQObjectMessage".equals(msgBobyType)) {&lt;BR /&gt;%&amp;gt;&lt;BR /&gt;				String msg_&amp;lt;%=cid %&amp;gt; = null;&lt;BR /&gt;				if(message_&amp;lt;%=cid%&amp;gt; instanceof org.apache.activemq.command.ActiveMQObjectMessage) {&lt;BR /&gt;				  msg_&amp;lt;%=cid %&amp;gt; = "";&lt;BR /&gt;				  org.apache.activemq.command.ActiveMQObjectMessage  mqmsg_&amp;lt;%=cid %&amp;gt;  = (org.apache.activemq.command.ActiveMQObjectMessage) message_&amp;lt;%=cid%&amp;gt;;&lt;BR /&gt;				  if(mqmsg_&amp;lt;%=cid %&amp;gt;.getObject() instanceof org.apache.camel.converter.jaxp.StringSource) {&lt;BR /&gt;				    org.apache.camel.converter.jaxp.StringSource ssmsg_&amp;lt;%=cid %&amp;gt; =  (org.apache.camel.converter.jaxp.StringSource) mqmsg_&amp;lt;%=cid %&amp;gt;.getObject();&lt;BR /&gt;				    msg_&amp;lt;%=cid %&amp;gt; =  ssmsg_&amp;lt;%=cid %&amp;gt;.getText();&lt;BR /&gt;				  }&lt;BR /&gt;				  &lt;BR /&gt;				} else if (message_&amp;lt;%=cid%&amp;gt; instanceof org.apache.activemq.command.ActiveMQTextMessage) {&lt;BR /&gt;				  org.apache.activemq.command.ActiveMQTextMessage  mqmsg_&amp;lt;%=cid %&amp;gt;  = (org.apache.activemq.command.ActiveMQTextMessage) message_&amp;lt;%=cid%&amp;gt;;&lt;BR /&gt;				  msg_&amp;lt;%=cid %&amp;gt; =  mqmsg_&amp;lt;%=cid %&amp;gt;.getText();&lt;BR /&gt;				}&lt;BR /&gt;&amp;lt;%&lt;BR /&gt;			}&lt;/PRE&gt; 
&lt;BR /&gt;Any help would be really appreciated. 
&lt;BR /&gt;Felix</description>
    <pubDate>Mon, 01 Aug 2011 14:35:47 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2011-08-01T14:35:47Z</dc:date>
    <item>
      <title>problem when fetching an ObjectMessage from ActiveMQ with a tMomInput</title>
      <link>https://community.qlik.com/t5/Talend-Studio/problem-when-fetching-an-ObjectMessage-from-ActiveMQ-with-a/m-p/2236187#M24981</link>
      <description>Hi everyone, 
&lt;BR /&gt;I want to fetch messages from ActiveMQ with a tMomInput. 
&lt;BR /&gt;The problem is that the type of my messages is ActiveMQObjectMessage and the only choices I have in talend 4.0.2 are TextMessage, BytesMessage or MapMessage. 
&lt;BR /&gt; 
&lt;BR /&gt;And if I select these message types I get cast errors : 
&lt;BR /&gt; Exception in component tMomInput_1 
&lt;BR /&gt; java.lang.ClassCastException: org.apache.activemq.command.ActiveMQObjectMessage cannot be cast to javax.jms.TextMessage 
&lt;BR /&gt; at openagro.openagro1_0_1.openagro1.tMomInput_1Process(openagro1.java:423) 
&lt;BR /&gt; at openagro.openagro1_0_1.openagro1.runJobInTOS(openagro1.java:719) 
&lt;BR /&gt; at openagro.openagro1_0_1.openagro1.main(openagro1.java:593) 
&lt;BR /&gt; 
&lt;BR /&gt;Is it possible to use ObjectMessage in talend? 
&lt;BR /&gt;Thanks</description>
      <pubDate>Sat, 16 Nov 2024 13:22:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/problem-when-fetching-an-ObjectMessage-from-ActiveMQ-with-a/m-p/2236187#M24981</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T13:22:57Z</dc:date>
    </item>
    <item>
      <title>Re: problem when fetching an ObjectMessage from ActiveMQ with a tMomInput</title>
      <link>https://community.qlik.com/t5/Talend-Studio/problem-when-fetching-an-ObjectMessage-from-ActiveMQ-with-a/m-p/2236188#M24982</link>
      <description>Hello!
&lt;BR /&gt;I'm running into the same problem. Any news on or ways to work around that?
&lt;BR /&gt;I think its the producer who sets the type of the message. In my case the messages are produced by a Java/Camel adapter which I can't change.
&lt;BR /&gt;And the tMOMInput always fails to process these messages.
&lt;BR /&gt;Thanks,
&lt;BR /&gt;Felix</description>
      <pubDate>Fri, 29 Jul 2011 12:29:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/problem-when-fetching-an-ObjectMessage-from-ActiveMQ-with-a/m-p/2236188#M24982</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-07-29T12:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: problem when fetching an ObjectMessage from ActiveMQ with a tMomInput</title>
      <link>https://community.qlik.com/t5/Talend-Studio/problem-when-fetching-an-ObjectMessage-from-ActiveMQ-with-a/m-p/2236189#M24983</link>
      <description>Hi,
&lt;BR /&gt;I eventually created a new component fitting my needs by copying tMOMInput and changing the previous message types by ObjectMessage in the .javajet files.
&lt;BR /&gt;To understand how the component creation works I read:
&lt;BR /&gt;https://help.talend.com/search/all?query=How+to+create+a+custom+component
&lt;BR /&gt;I hope it can help you.</description>
      <pubDate>Fri, 29 Jul 2011 17:52:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/problem-when-fetching-an-ObjectMessage-from-ActiveMQ-with-a/m-p/2236189#M24983</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-07-29T17:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: problem when fetching an ObjectMessage from ActiveMQ with a tMomInput</title>
      <link>https://community.qlik.com/t5/Talend-Studio/problem-when-fetching-an-ObjectMessage-from-ActiveMQ-with-a/m-p/2236190#M24984</link>
      <description>&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;Hi,&lt;BR /&gt;I eventually created a new component fitting my needs by copying tMOMInput and changing the previous message types by ObjectMessage in the .javajet files.&lt;BR /&gt;To understand how the component creation works I read:&lt;BR /&gt;https://help.talend.com/search/all?query=How+to+create+a+custom+component&lt;BR /&gt;I hope it can help you.&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;Hi Cj 
&lt;BR /&gt;Cool, would you like to share your component on Talend exchange? 
&lt;BR /&gt; 
&lt;A href="http://www.talendforge.org/exchange/index.php" rel="nofollow noopener noreferrer"&gt;http://www.talendforge.org/exchange/index.php&lt;/A&gt; 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Shong</description>
      <pubDate>Sun, 31 Jul 2011 04:36:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/problem-when-fetching-an-ObjectMessage-from-ActiveMQ-with-a/m-p/2236190#M24984</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-07-31T04:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: problem when fetching an ObjectMessage from ActiveMQ with a tMomInput</title>
      <link>https://community.qlik.com/t5/Talend-Studio/problem-when-fetching-an-ObjectMessage-from-ActiveMQ-with-a/m-p/2236191#M24985</link>
      <description>Hi cj, 
&lt;BR /&gt;thanks for the pointers. 
&lt;BR /&gt;I tried the same today and although its seems quite straightforward, I'm kind of stuck now. 
&lt;BR /&gt;It works in the Java Debug mode but not in Trace Debug and (basic) Run. 
&lt;BR /&gt;In Trace Debug I get the following exception: 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;We will consume messages while they continue to be delivered &lt;BR /&gt;Exception in component tMomInput3_1&lt;BR /&gt;javax.jms.JMSException: Failed to build body from bytes. Reason: java.io.IOException: org.apache.camel.converter.jaxp.StringSource&lt;BR /&gt; at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)&lt;BR /&gt; at org.apache.activemq.command.ActiveMQObjectMessage.getObject(ActiveMQObjectMessage.java:183)&lt;BR /&gt; at testprojekt.dd_0_1.dd.tMomInput3_1Process(dd.java:452)&lt;BR /&gt; at testprojekt.dd_0_1.dd.runJobInTOS(dd.java:817)&lt;BR /&gt; at testprojekt.dd_0_1.dd.main(dd.java:684)&lt;BR /&gt;Caused by: java.io.IOException: org.apache.camel.converter.jaxp.StringSource&lt;BR /&gt; at org.apache.activemq.command.ActiveMQObjectMessage.getObject(ActiveMQObjectMessage.java:179)&lt;BR /&gt; ... 3 more&lt;BR /&gt; disconnected&lt;BR /&gt; disconnected&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;This is the relevant implementation of my tMomInput2_begin.javajet file: 
&lt;BR /&gt; 
&lt;PRE&gt;/*-----------------------------------------------------------4.judge message body type---------------------------------------*/&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;			if ("Text".equals(msgBobyType)) {&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;			} else if ("ActiveMQObjectMessage".equals(msgBobyType)) {&lt;BR /&gt;%&amp;gt;&lt;BR /&gt;				String msg_&amp;lt;%=cid %&amp;gt; = null;&lt;BR /&gt;				if(message_&amp;lt;%=cid%&amp;gt; instanceof org.apache.activemq.command.ActiveMQObjectMessage) {&lt;BR /&gt;				  msg_&amp;lt;%=cid %&amp;gt; = "";&lt;BR /&gt;				  org.apache.activemq.command.ActiveMQObjectMessage  mqmsg_&amp;lt;%=cid %&amp;gt;  = (org.apache.activemq.command.ActiveMQObjectMessage) message_&amp;lt;%=cid%&amp;gt;;&lt;BR /&gt;				  if(mqmsg_&amp;lt;%=cid %&amp;gt;.getObject() instanceof org.apache.camel.converter.jaxp.StringSource) {&lt;BR /&gt;				    org.apache.camel.converter.jaxp.StringSource ssmsg_&amp;lt;%=cid %&amp;gt; =  (org.apache.camel.converter.jaxp.StringSource) mqmsg_&amp;lt;%=cid %&amp;gt;.getObject();&lt;BR /&gt;				    msg_&amp;lt;%=cid %&amp;gt; =  ssmsg_&amp;lt;%=cid %&amp;gt;.getText();&lt;BR /&gt;				  }&lt;BR /&gt;				  &lt;BR /&gt;				} else if (message_&amp;lt;%=cid%&amp;gt; instanceof org.apache.activemq.command.ActiveMQTextMessage) {&lt;BR /&gt;				  org.apache.activemq.command.ActiveMQTextMessage  mqmsg_&amp;lt;%=cid %&amp;gt;  = (org.apache.activemq.command.ActiveMQTextMessage) message_&amp;lt;%=cid%&amp;gt;;&lt;BR /&gt;				  msg_&amp;lt;%=cid %&amp;gt; =  mqmsg_&amp;lt;%=cid %&amp;gt;.getText();&lt;BR /&gt;				}&lt;BR /&gt;&amp;lt;%&lt;BR /&gt;			}&lt;/PRE&gt; 
&lt;BR /&gt;Any help would be really appreciated. 
&lt;BR /&gt;Felix</description>
      <pubDate>Mon, 01 Aug 2011 14:35:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/problem-when-fetching-an-ObjectMessage-from-ActiveMQ-with-a/m-p/2236191#M24985</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-08-01T14:35:47Z</dc:date>
    </item>
    <item>
      <title>Re: problem when fetching an ObjectMessage from ActiveMQ with a tMomInput</title>
      <link>https://community.qlik.com/t5/Talend-Studio/problem-when-fetching-an-ObjectMessage-from-ActiveMQ-with-a/m-p/2236192#M24986</link>
      <description>Hi everyone,
&lt;BR /&gt;I'm running the same problem. Any news on your ways?
&lt;BR /&gt;Thanks,
&lt;BR /&gt;Trinh</description>
      <pubDate>Wed, 06 Jul 2016 14:34:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/problem-when-fetching-an-ObjectMessage-from-ActiveMQ-with-a/m-p/2236192#M24986</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-07-06T14:34:33Z</dc:date>
    </item>
  </channel>
</rss>

