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

rest-dsl with api-doc should allow multiple rest's with cdi

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.16.1
    • Fix Version/s: 2.16.2
    • Component/s: camel-core, rest
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      In Jira Ticket a Issue for Camel and Swagger is described.
      That ticket mentions that CDI is not affected.
      Using Swagger and CDI I could reproduce the same issues like described in that ticket.
      Unfortunatley it seems to be a bit trickier as sometimes the test set up works and sometimes it fails. I could not create a example which always fails.

      My example project can be found at:

      https://github.com/gmixa/camelswaggerissue

      The test cases always fail while the main Program,
      found at
      https://github.com/gmixa/camelswaggerissue/blob/master/src/main/java/com/fundsaccess/camelcdiswaggerissue/Startup.java
      just occasionally fails.

      Chances that the main program fails can be increased if this example runs in debug mode with line break points in Startup
      at 38
      at 53
      at 63
      at 66

      and the example is stepped through.

      The Output which I got is :

      Exception org.apache.camel.FailedToStartRouteException("Failed to start route route4 because of Multiple consumers for the same endpoint is not allowed: Endpointhttp://0.0.0.0:9091/api-doc?httpMethodRestrict=GET") breakpoint hit in org.apache.camel.impl.DefaultCamelContext at line 3486 by thread main.
      Thread main stopped at DefaultCamelContext.java:3486.
      User program running
      Exception org.apache.camel.FailedToStartRouteException("Failed to start route route4 because of Multiple consumers for the same endpoint is not allowed: Endpointhttp://0.0.0.0:9091/api-doc?httpMethodRestrict=GET") breakpoint hit in org.apache.camel.impl.DefaultCamelContext at line 3172 by thread main.
      Thread main stopped at DefaultCamelContext.java:3172.
      User program running
      Exception org.apache.camel.FailedToStartRouteException("Failed to start route route4 because of Multiple consumers for the same endpoint is not allowed: Endpointhttp://0.0.0.0:9091/api-doc?httpMethodRestrict=GET") breakpoint hit in org.apache.camel.impl.DefaultCamelContext$2 at line 2818 by thread main.
      Thread main stopped at DefaultCamelContext.java:2818.
      User program running
      Exception org.apache.camel.FailedToStartRouteException("Failed to start route route4 because of Multiple consumers for the same endpoint is not allowed: Endpointhttp://0.0.0.0:9091/api-doc?httpMethodRestrict=GET") breakpoint hit in org.apache.camel.impl.DefaultCamelContext at line 2833 by thread main.
      Thread main stopped at DefaultCamelContext.java:2833.
      User program running
      Exception org.apache.camel.FailedToStartRouteException("Failed to start route route4 because of Multiple consumers for the same endpoint is not allowed: Endpointhttp://0.0.0.0:9091/api-doc?httpMethodRestrict=GET") breakpoint hit in org.apache.camel.support.ServiceSupport at line 86 by thread main.
      Thread main stopped at ServiceSupport.java:86.

      Any hints how i could fix that issue with cdi ?

      Greetings

      Gerald

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                davsclaus Claus Ibsen
                Reporter:
                gmixa Gerald Mixa
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: