Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-14969

Failed to start route [A] because of duplicate id detected: [B]

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.2.0
    • Fix Version/s: 3.3.0
    • Component/s: camel-spring-boot
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      When loading rest definitions via "xml-rests" path defined in property

      camel.springboot.xml-rests = classpath:folder-camel/folder-rest/*.xml

      The camel 3.2 fails with error 

      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.

      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">}}
      {\{ <to id="id3" uri="log:test-log-rest" />}}
      {{ </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">
      <route id="id4">
      <to id="id3" uri="log:test-log-rest" />
      </route>
      </get>
      </rest>

       

       

        Attachments

        1. eclipse5-comparison-conflict.PNG
          308 kB
          Nenad Nesovanovic
        2. eclipse4-comparison-conflict.PNG
          254 kB
          Nenad Nesovanovic
        3. eclipse1_compare_by_ref.PNG
          287 kB
          Nenad Nesovanovic
        4. eclipse2_causes_duplicate.PNG
          271 kB
          Nenad Nesovanovic
        5. eclipse3-two-routes.PNG
          275 kB
          Nenad Nesovanovic
        6. trace_log2.zip
          64 kB
          Nenad Nesovanovic
        7. trace_log1.zip
          46 kB
          Nenad Nesovanovic
        8. CAMEL-14969-Eclipse-Project.zip
          6 kB
          Nenad Nesovanovic

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              mindiga Nenad Nesovanovic
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: