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

Transacted not working correctly in scala

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.15.2
    • 2.16.0, 2.15.4
    • camel-scala
    • None
    • Unknown

    Description

      When I try to use transacted in a scala route, I get an error and the camel context doesn't start.

      The error states that there is no output in route.

      After some time watching at the code with different breakpoints, I noticed :

      In org.apache.camel.scala.dsl.builder.RouteBuilder (l199) the transacted with URI doesn't call the stack.top.transacted with the URI parameter.

      Even with this done, it still gives the same error :

      "Route myRoute has no output processors. You need to add outputs to the route such as to("log:foo")."

      even when my route is as simple as :

      "direct:something" ==> {
      routeId("log:foo")
      transacted("SomeStrategy")
      --> ("log:foo")
      }

      After some more debug, I saw that the output list for the transacted node stays empty, so my guess is that, in the org.apache.camel.scala.dsl.SAbstractDefinition class, the line def transacted(ref: String) = wrap(target.transacted(ref)) should return something else to handle outputs.

      Since I can mix java and scala routes, there are workarounds, but still, now that I've gotten used to scala routes, I don't really want to go back to java routes

      Attachments

        Issue Links

          Activity

            People

              njiang Willem Jiang
              flaroche Fran├žois LAROCHE
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: