Nicola Ferraro created CAMEL-10564:
--------------------------------------

             Summary: Unable to change netty-http configuration through 
spring-boot properties
                 Key: CAMEL-10564
                 URL: https://issues.apache.org/jira/browse/CAMEL-10564
             Project: Camel
          Issue Type: Bug
          Components: camel-netty-http
            Reporter: Nicola Ferraro
            Assignee: Nicola Ferraro


Setting properties like:
{code}
camel.component.netty-http.configuration.maximum-pool-size=20
{code}

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

{code}
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

{code}

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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to