I created a ticket https://issues.apache.org/jira/browse/CAMEL-18764
On Sun, Nov 27, 2022 at 1:49 PM Claus Ibsen <claus.ib...@gmail.com> wrote: > Hi > > Okay I can also reproduce this, so the problem is that the java routes are > initialized before the xml. > This new templatedRoute from a RouteBuilder is problematic as it's a > chicken and egg situation. > > > On Sat, Nov 26, 2022 at 1:43 PM Svend Ole Nielsen < > svend-ole.niel...@addsecure.com> wrote: > >> Oki doki - will do. Thanks. >> >> Sendt fra Outlook til iOS <https://aka.ms/o0ukef> >> >> >> >> >> Svend Ole Nielsen Office +4596962640 >> Developer svend-ole.niel...@addsecure.com >> www.addsecure.com >> <http://www.addsecure.com/> <https://www.facebook.com/AddSecure/> >> <https://www.linkedin.com/company/addsecure/> >> <https://www.youtube.com/channel/UC9RMhgoc3z23vy93yBRAygA> >> *For a safer and smarter world* >> NOTE: This e-mail (including any attachments) is for the sole use of the >> intended recipient(s) and may contain information that confidential and/or >> protected by legal privilege. Any unauthorized review, use, copy, >> disclosure or distribution of this e-mail is strictly prohibited. If you >> are not the intended recipient, please notify AddSecure immediately and >> destroy all copies of this e-mail. AddSecure does not accept any liability >> for breach of security, error or virus that may result from the >> transmission of this message. >> >> ------------------------------ >> *Fra:* Claus Ibsen <claus.ib...@gmail.com> >> *Sendt:* Saturday, November 26, 2022 1:40:10 PM >> *Til:* users@camel.apache.org <users@camel.apache.org> >> *Emne:* Re: Templates mix xml and java builder >> >> CAUTION: External email >> Hi >> >> Okay you are welcome to create a JIRA ticket and if you have a sample >> project that reproduces this then its easier for us to use to tackle this. >> >> On Sat, Nov 26, 2022 at 1:04 PM Svend Ole Nielsen < >> svend-ole.niel...@addsecure.com> wrote: >> >> Have tried with 3.19.0 and 3.20.0-SNAPSHOT - same result. >> >> >> >> >> Svend Ole Nielsen Office +4596962640 >> Developer svend-ole.niel...@addsecure.com >> www.addsecure.com >> <http://www.addsecure.com/> <https://www.facebook.com/AddSecure/> >> <https://www.linkedin.com/company/addsecure/> >> <https://www.youtube.com/channel/UC9RMhgoc3z23vy93yBRAygA> >> *For a safer and smarter world* >> NOTE: This e-mail (including any attachments) is for the sole use of the >> intended recipient(s) and may contain information that confidential and/or >> protected by legal privilege. Any unauthorized review, use, copy, >> disclosure or distribution of this e-mail is strictly prohibited. If you >> are not the intended recipient, please notify AddSecure immediately and >> destroy all copies of this e-mail. AddSecure does not accept any liability >> for breach of security, error or virus that may result from the >> transmission of this message. >> >> ------------------------------ >> *Fra:* Claus Ibsen <claus.ib...@gmail.com> >> *Sendt:* 26. november 2022 12:52 >> *Til:* users@camel.apache.org <users@camel.apache.org> >> *Emne:* Re: Templates mix xml and java builder >> >> CAUTION: External email >> What version of Camel do you use? >> >> On Sat, Nov 26, 2022 at 12:44 PM Svend Ole Nielsen < >> svend-ole.niel...@addsecure.com> wrote: >> >> Hi again >> >> Problem is - it does not work (at least here) >> >> Taking the routetemplate-xml example and adding a RouteBuilder with >> >> templatedRoute("myXmlTemplate") >> .parameter("name", "Name") >> .parameter("greeting", "Hello there"); >> >> will throw an exception -> Caused by: java.lang.IllegalArgumentException: >> Cannot find RouteTemplate with id myXmlTemplate. >> >> Same goes for the other example in the routetemplate example - same >> situation. However the java created templates can be instantiated using >> yaml. So this leads me to believe that using XML defined templates can not >> be used from Java but the opposite is possible. >> >> >> >> >> Svend Ole Nielsen Office +4596962640 >> Developer svend-ole.niel...@addsecure.com >> www.addsecure.com >> <http://www.addsecure.com/> <https://www.facebook.com/AddSecure/> >> <https://www.linkedin.com/company/addsecure/> >> <https://www.youtube.com/channel/UC9RMhgoc3z23vy93yBRAygA> >> *For a safer and smarter world* >> NOTE: This e-mail (including any attachments) is for the sole use of the >> intended recipient(s) and may contain information that confidential and/or >> protected by legal privilege. Any unauthorized review, use, copy, >> disclosure or distribution of this e-mail is strictly prohibited. If you >> are not the intended recipient, please notify AddSecure immediately and >> destroy all copies of this e-mail. AddSecure does not accept any liability >> for breach of security, error or virus that may result from the >> transmission of this message. >> >> ------------------------------ >> *Fra:* Claus Ibsen <claus.ib...@gmail.com> >> *Sendt:* 26. november 2022 08:37 >> *Til:* users@camel.apache.org <users@camel.apache.org> >> *Emne:* Re: Templates mix xml and java builder >> >> CAUTION: External email >> Hi >> >> You can mix any kind of DSLs you like. >> >> This example uses route configuration (but should work for route template >> as well), and have different DSLs >> >> https://github.com/apache/camel-examples/tree/main/examples/routes-configuration >> >> >> >> >> On Sat, Nov 26, 2022 at 12:28 AM Svend Ole Nielsen < >> svend-ole.niel...@addsecure.com> wrote: >> >> Hi - I have been looking all over the documentation and been at Google, >> but nowhere has it been possible to dig some info up, so here goes: >> >> Would it be possible to define a template in XML and load it in a Java >> Routebuilder? Or is it xml only both template definition and route building? >> >> Regards, >> Svend O. >> >> >> >> >> Svend Ole Nielsen Office +4596962640 >> Developer svend-ole.niel...@addsecure.com >> www.addsecure.com >> <http://www.addsecure.com/> <https://www.facebook.com/AddSecure/> >> <https://www.linkedin.com/company/addsecure/> >> <https://www.youtube.com/channel/UC9RMhgoc3z23vy93yBRAygA> >> *For a safer and smarter world* >> NOTE: This e-mail (including any attachments) is for the sole use of the >> intended recipient(s) and may contain information that confidential and/or >> protected by legal privilege. Any unauthorized review, use, copy, >> disclosure or distribution of this e-mail is strictly prohibited. If you >> are not the intended recipient, please notify AddSecure immediately and >> destroy all copies of this e-mail. AddSecure does not accept any liability >> for breach of security, error or virus that may result from the >> transmission of this message. >> >> >> >> -- >> Claus Ibsen >> ----------------- >> @davsclaus >> Camel in Action 2: >> https://eu01.l.antigena.com/l/PiOZ6Ydkm99aHdQRnPlg90mGU9D9mtvdWbqWyAo4ubdeA7je1QE8scT3-HQ2H-xqUJks_eX2nRbYazK19e0M2oQYmBvJkmvdd3z22uYuk6aGZjHz7LwLaSLxgBPfkSZ~WsQHlyRS9W >> >> >> >> >> -- >> Claus Ibsen >> ----------------- >> @davsclaus >> Camel in Action 2: >> https://eu01.l.antigena.com/l/dQFwy7PkH9V_zWbcB_NkGoTmAkAJOP7lbP_T2r3jTi15qfo-sQYV8NByYJXoJrrCzXeuSafNTXzE91AFdJvkPcdbdHTVGbC_gG2_TGA-lYrf5R5HK2vwTAgbGnsFGGIGR7NUqeL >> >> >> >> >> -- >> Claus Ibsen >> ----------------- >> @davsclaus >> Camel in Action 2: >> https://eu01.l.antigena.com/l/DuXnLqGULzvE6xIaSBIXZ4B55JHUzqyVmyps-Q94A-l_PQf6MQIpFaxq3BBJlYtplf_a_xGo_~tV8RuuyjCjyFQTrZIJw34GgxmGbXGTPKL0lgDfhgi0jk4Hci4O9J4tOWtAEISW8fx9 >> >> > > > -- > Claus Ibsen > ----------------- > @davsclaus > Camel in Action 2: https://www.manning.com/ibsen2 > -- Claus Ibsen ----------------- @davsclaus Camel in Action 2: https://www.manning.com/ibsen2