[ 
https://issues.apache.org/jira/browse/CAMEL-14969?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17093620#comment-17093620
 ] 

Nenad Nesovanovic commented on CAMEL-14969:
-------------------------------------------

Here are the two failing and two working rest definitions from the project 
[^CAMEL-14969-Eclipse-Project.zip]

 
{noformat}

<?xml version="1.0" encoding="UTF-8"?><?xml version="1.0" encoding="UTF-8"?>
<rests xmlns="http://camel.apache.org/schema/spring"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
 xsi:schemaLocation="
    http://camel.apache.org/schema/spring 
https://camel.apache.org/schema/spring/camel-spring-3.2.0.xsd
    ">
 <!-- fail1 -->
 <!-- rest path="/test">
 <get uri="/nenad">
 <to uri="direct:test_nenad" />
 </get>
 </rest-->
 <!-- fail2 -->
 <rest id="d1" path="/test">
 <get id="d2" uri="/nenad">
 <to id="d3" uri="direct:test_nenad" />
 </get>
 </rest>
 <!-- works1 -->
 <!--rest path="/test">
 <get uri="/nenad">
 <route id="test_nenad_rest_get_route_id">
 <to uri="direct:test_nenad" />
 </route>
 </get>
 </rest-->
 <!-- works2 -->
 <!--rest id="d1" path="/test">
 <get id="d2" uri="/nenad">
 <route id="test_nenad_rest_get_route_id">
 <to id="d3" uri="direct:test_nenad" />
 </route>
 </get>
 </rest-->
</rests>{noformat}
 

> Failed to start route [A] because of duplicate id detected: [B]
> ---------------------------------------------------------------
>
>                 Key: CAMEL-14969
>                 URL: https://issues.apache.org/jira/browse/CAMEL-14969
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-spring-boot
>    Affects Versions: 3.2.0
>            Reporter: Nenad Nesovanovic
>            Priority: Major
>         Attachments: CAMEL-14969-Eclipse-Project.zip, 
> eclipse1_compare_by_ref.PNG, eclipse2_causes_duplicate.PNG, 
> eclipse3-two-routes.PNG, eclipse4-comparison-conflict.PNG, 
> eclipse5-comparison-conflict.PNG, trace_log1.zip, trace_log2.zip
>
>
> When loading rest definitions via "xml-rests" path defined in property
> {quote}{color:#403294}camel.springboot.xml-rests = 
> classpath:folder-camel/folder-rest/*.xml{color}
> {quote}
> The camel 3.2 fails with error 
> {quote}{color:#de350b}Failed to start route first-test-get-id because of 
> duplicate id detected: first-test-to-id. Please correct ids to be unique 
> among all your routes.{color}
> {quote}
> My rest XML file is defined as
> {{<?xml version="1.0" encoding="UTF-8"?><?xml version="1.0" 
> encoding="UTF-8"?>}}
> {{<rests xmlns="http://camel.apache.org/schema/spring"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"}}
> {{ xsi:schemaLocation="}}
> {{    http://camel.apache.org/schema/spring 
> https://camel.apache.org/schema/spring/camel-spring-3.2.0.xsd}}
> {{    ">}}
> {{ <rest id="id1" path="/test">}}
> {{ <get id="id2" uri="/folderuri">}}
> {color:#de350b}{{ <to id="id3" uri="log:test-nexus-rest" />}}{color}
> {{ </get>}}
> {{ </rest>}}
> {{</rests>}}
> However, when I envelope TO tag in the ROUTE tag, the issue gets resolved
> {{<rest id="id1" path="/test">}}
> {{<get id="id2" uri="/folderuri">}}
> {{{color:#4c9aff}<route id="id4">{color}}}
> {{{color:#de350b}<to id="id3" uri="log:test-nexus-rest" />{color}}}
> {{{color:#4c9aff}</route>{color}}}
> {{</get>}}
> {{</rest>}}
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to