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

Regression with camel-jackson 2.15.3

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.15.3, 2.16.0
    • Fix Version/s: 2.15.4, 2.16.1, 2.17.0
    • Component/s: camel-jackson, osgi
    • Labels:
      None
    • Estimated Complexity:
      Unknown
    • Regression:
      Regression

      Description

      Hi folks,

      Apparently we found a regression with camel and camel-jackson in version 2.15.3.
      The following code :

      restConfiguration()
      .component("servlet")
      .bindingMode(RestBindingMode.json)
      .contextPath("/adm-replication")
      .port("8181");

      rest("/replication")
      .post("/

      {cus}/{contractDate}")
      .produces("application/json")
      .consumes("application/json")
      .to("mock:TestRoute");

      produces the following exception by looking for the default json dataformat :

      org.apache.camel.FailedToCreateRouteException: Failed to create route route1 at: >>> RestBinding <<< in route: Route(route1)[[From[rest:post:/replication:/{cus}

      /{contractD... because of JSon DataFormat json-jackson not found.
      at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:1028)
      at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:185)
      at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:841)
      at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:2911)
      at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:2634)
      at org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:167)
      at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2483)
      at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2479)
      at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2502)
      at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2479)
      at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
      at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2448)
      at org.apache.camel.blueprint.BlueprintCamelContext.start(BlueprintCamelContext.java:180)
      at org.apache.camel.test.blueprint.CamelBlueprintTestSupport.setUp(CamelBlueprintTestSupport.java:209)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
      at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
      at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
      at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
      at org.junit.rules.RunRules.evaluate(RunRules.java:20)
      at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
      at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
      at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
      at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:78)
      at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:212)
      at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
      Caused by: java.lang.IllegalArgumentException: JSon DataFormat json-jackson not found.
      at org.apache.camel.model.rest.RestBindingDefinition.createProcessor(RestBindingDefinition.java:114)
      at org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:505)
      at org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:217)
      at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:1025)
      ... 43 more

      This exception doesn't occur in 2.15.2

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                davsclaus Claus Ibsen
                Reporter:
                arnaudeprez Arnaud Deprez
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: