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

camel-example-spring-jms ServerRoutes contains invalid URI parameter methodName

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.15.2
    • Fix Version/s: 2.15.4, 2.16.1, 2.17.0
    • Component/s: examples
    • Labels:
    • Environment:
    • Patch Info:
      Patch Available
    • Estimated Complexity:
      Novice

      Description

      The camel-example-spring-jms org.apache.camel.example.server.ServerRoutes contains an invalid URI parameter methodName (see exception below).

      Fix - change 'methodName' to 'method' as below

      //from("jms:queue:numbers").to("bean:multiplier?methodName=multiply");
      from("jms:queue:numbers").to("bean:multiplier?method=multiply");

      Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 2.031 sec <<< FAILURE! - in org.apache.camel.example.SpringJmsClientRemotingServerTest
      org.apache.camel.example.SpringJmsClientRemotingServerTest Time elapsed: 2.03 sec <<< ERROR!
      org.apache.camel.RuntimeCamelException: org.apache.camel.FailedToCreateRouteException: Failed to create route route1 at: >>> To[bean:multiplier?methodName=multiply] <<< in route: Route(route1)[[From[jms:queue:numbers]] -> [To[bean:multipli... because of Failed to resolve endpoint: bean://multiplier?methodName=multiply due to: Failed to resolve endpoint: bean://multiplier?methodName=multiply due to: There are 1 parameters that couldn't be set on the endpoint. Check the uri if the parameters are spelt correctly and that they are properties of the endpoint. Unknown parameters=[

      {methodName=multiply}

      ]
      at org.apache.camel.impl.DefaultComponent.validateParameters(DefaultComponent.java:183)
      at org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:128)
      at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:558)
      at org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:79)
      at org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:200)
      at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:107)
      at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:113)
      at org.apache.camel.model.SendDefinition.resolveEndpoint(SendDefinition.java:62)
      at org.apache.camel.model.SendDefinition.createProcessor(SendDefinition.java:56)
      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)
      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:2895)
      at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:2618)
      at org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:167)
      at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2467)
      at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2463)
      at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2486)
      at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2463)
      at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
      at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2432)
      at org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:255)
      at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:121)
      at org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:332)
      at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:151)
      at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:128)
      at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:331)
      at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:773)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:483)
      at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
      at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
      at org.apache.camel.example.SpringJmsClientRemotingServerTest.setupFreePort(SpringJmsClientRemotingServerTest.java:46)

      org.apache.camel.example.SpringJmsClientRemotingServerTest Time elapsed: 2.031 sec <<< ERROR!
      java.lang.NullPointerException: null
      at org.apache.camel.example.SpringJmsClientRemotingServerTest.stopSpring(SpringJmsClientRemotingServerTest.java:52)

        Attachments

        1. patchfile.txt
          0.8 kB
          Tim

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              mit_jones Tim
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: