Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
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.