<?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 CatchDefinition cannot be cast to ChoiceDefinition cTry/cMessageRouter in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/CatchDefinition-cannot-be-cast-to-ChoiceDefinition-cTry/m-p/2355372#M121142</link>
    <description>Hi, 
&lt;BR /&gt;I have a route where I want to execute a job and fallback to a second job if the first one fails. If both fail a custom error message should be returned to the client. If the client request doesn't fulfill certain conditions, an error message will be returned without trying. 
&lt;BR /&gt; 
&lt;A href="https://community.talend.com/legacyfs/online/membersTempo/218761/ctry-messaging.png" target="_blank"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MElI.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/143224iFF4D8B8231CFBD35/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MElI.png" alt="0683p000009MElI.png" /&gt;&lt;/span&gt; &lt;/A&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;I get a ClassCastException: 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;&lt;B&gt;org.apache.camel.model.CatchDefinition cannot be cast to org.apache.camel.model.ChoiceDefinition&lt;BR /&gt;java.lang.ClassCastException: org.apache.camel.model.CatchDefinition cannot be cast to org.apache.camel.model.ChoiceDefinition&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.camel.model.ProcessorDefinition.endChoice(ProcessorDefinition.java:1316)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at esb_workshop.trycatchroute_0_1.TryCatchRoute.configure(TryCatchRoute.java:118)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.camel.builder.RouteBuilder.checkInitialized(RouteBuilder.java:322)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.camel.builder.RouteBuilder.configureRoutes(RouteBuilder.java:276)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.camel.builder.RouteBuilder.addRoutesToCamelContext(RouteBuilder.java:262)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.camel.impl.DefaultCamelContext.addRoutes(DefaultCamelContext.java:677)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.camel.main.MainSupport.postProcessCamelContext(MainSupport.java:471)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.camel.main.MainSupport.postProcessContext(MainSupport.java:406)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at esb_workshop.trycatchroute_0_1.TryCatchRoute$1.doStart(TryCatchRoute.java:180)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)&lt;/B&gt;&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;Activating "Append endChoice()" on the when condition doesn't help. Should I open a JIRA issue for it? What's the recommend workaround in this case? 
&lt;BR /&gt;I'm using TOS 5.5.1. 
&lt;BR /&gt;Cheers 
&lt;BR /&gt;Dennis</description>
    <pubDate>Sat, 16 Nov 2024 11:30:18 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T11:30:18Z</dc:date>
    <item>
      <title>CatchDefinition cannot be cast to ChoiceDefinition cTry/cMessageRouter</title>
      <link>https://community.qlik.com/t5/Talend-Studio/CatchDefinition-cannot-be-cast-to-ChoiceDefinition-cTry/m-p/2355372#M121142</link>
      <description>Hi, 
&lt;BR /&gt;I have a route where I want to execute a job and fallback to a second job if the first one fails. If both fail a custom error message should be returned to the client. If the client request doesn't fulfill certain conditions, an error message will be returned without trying. 
&lt;BR /&gt; 
&lt;A href="https://community.talend.com/legacyfs/online/membersTempo/218761/ctry-messaging.png" target="_blank"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MElI.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/143224iFF4D8B8231CFBD35/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MElI.png" alt="0683p000009MElI.png" /&gt;&lt;/span&gt; &lt;/A&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;I get a ClassCastException: 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;&lt;B&gt;org.apache.camel.model.CatchDefinition cannot be cast to org.apache.camel.model.ChoiceDefinition&lt;BR /&gt;java.lang.ClassCastException: org.apache.camel.model.CatchDefinition cannot be cast to org.apache.camel.model.ChoiceDefinition&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.camel.model.ProcessorDefinition.endChoice(ProcessorDefinition.java:1316)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at esb_workshop.trycatchroute_0_1.TryCatchRoute.configure(TryCatchRoute.java:118)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.camel.builder.RouteBuilder.checkInitialized(RouteBuilder.java:322)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.camel.builder.RouteBuilder.configureRoutes(RouteBuilder.java:276)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.camel.builder.RouteBuilder.addRoutesToCamelContext(RouteBuilder.java:262)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.camel.impl.DefaultCamelContext.addRoutes(DefaultCamelContext.java:677)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.camel.main.MainSupport.postProcessCamelContext(MainSupport.java:471)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.camel.main.MainSupport.postProcessContext(MainSupport.java:406)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at esb_workshop.trycatchroute_0_1.TryCatchRoute$1.doStart(TryCatchRoute.java:180)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)&lt;/B&gt;&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;Activating "Append endChoice()" on the when condition doesn't help. Should I open a JIRA issue for it? What's the recommend workaround in this case? 
&lt;BR /&gt;I'm using TOS 5.5.1. 
&lt;BR /&gt;Cheers 
&lt;BR /&gt;Dennis</description>
      <pubDate>Sat, 16 Nov 2024 11:30:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/CatchDefinition-cannot-be-cast-to-ChoiceDefinition-cTry/m-p/2355372#M121142</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T11:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: CatchDefinition cannot be cast to ChoiceDefinition cTry/cMessageRouter</title>
      <link>https://community.qlik.com/t5/Talend-Studio/CatchDefinition-cannot-be-cast-to-ChoiceDefinition-cTry/m-p/2355373#M121143</link>
      <description>This Camel FAQ entry is helpful: &lt;A href="https://camel.apache.org/why-can-i-not-use-when-or-otherwise-in-a-java-camel-route.html" rel="nofollow noopener noreferrer"&gt;https://camel.apache.org/why-can-i-not-use-when-or-otherwise-in-a-java-camel-route.html&lt;/A&gt;&lt;BR /&gt;Of course it works if I split up the route in multiple routes but in my view the TOS should not produce invalid code.</description>
      <pubDate>Tue, 16 Sep 2014 16:11:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/CatchDefinition-cannot-be-cast-to-ChoiceDefinition-cTry/m-p/2355373#M121143</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-16T16:11:42Z</dc:date>
    </item>
  </channel>
</rss>

