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

camel-netty-http - Unable to change configuration through spring-boot properties

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.19.0
    • camel-netty-http
    • None
    • Unknown

    Description

      Setting properties like:

      camel.component.netty-http.configuration.maximum-pool-size=20
      

      ... to configure the netty-http-starter component produce class-cast errors.

      Caused by: java.lang.ClassCastException: org.apache.camel.component.netty.NettyConfiguration cannot be cast to org.apache.camel.component.netty.http.NettyHttpConfiguration
      	at org.apache.camel.component.netty.http.NettyHttpEndpoint.getConfiguration(NettyHttpEndpoint.java:151) ~[camel-netty-http-2.18.1.jar:2.18.1]
      	at org.apache.camel.component.netty.http.NettyHttpEndpoint.createConsumer(NettyHttpEndpoint.java:83) ~[camel-netty-http-2.18.1.jar:2.18.1]
      	at org.apache.camel.component.netty.http.NettyHttpComponent.doCreateConsumer(NettyHttpComponent.java:369) ~[camel-netty-http-2.18.1.jar:2.18.1]
      	at org.apache.camel.component.netty.http.NettyHttpComponent.createConsumer(NettyHttpComponent.java:264) ~[camel-netty-http-2.18.1.jar:2.18.1]
      	at org.apache.camel.component.rest.RestEndpoint.createConsumer(RestEndpoint.java:489) ~[camel-core-2.18.1.jar:2.18.1]
      	at org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenConsumerRoute.java:69) ~[camel-core-2.18.1.jar:2.18.1]
      	at org.apache.camel.impl.DefaultRoute.onStartingServices(DefaultRoute.java:103) ~[camel-core-2.18.1.jar:2.18.1]
      	at org.apache.camel.impl.RouteService.doWarmUp(RouteService.java:167) ~[camel-core-2.18.1.jar:2.18.1]
      	at org.apache.camel.impl.RouteService.warmUp(RouteService.java:141) ~[camel-core-2.18.1.jar:2.18.1]
      	... 31 common frames omitted
      
      

      The reason is that the netty-http Component, that inherits from the netty component, requires a subclass of NettyConfiguration (NettyHttpConfiguration), while the generated starter is using the parent class.

      Attachments

        Activity

          People

            nferraro Nicola Ferraro
            nferraro Nicola Ferraro
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: