[ 
https://issues.apache.org/jira/browse/CAMEL-10496?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-10496:
--------------------------------
    Priority: Minor  (was: Blocker)

> Component fails at runtime with exception with SpringBoot
> ---------------------------------------------------------
>
>                 Key: CAMEL-10496
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10496
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-ahc-ws
>    Affects Versions: 2.18.0
>            Reporter: Stuart Ingram
>            Priority: Minor
>
> Using the following dependencies
>       compile('org.apache.camel:camel-jackson-starter:2.18.0')
>       compile('org.apache.camel:camel-metrics-starter:2.18.0')
>       compile('org.apache.camel:camel-rabbitmq-starter:2.18.0')
>       compile('org.apache.camel:camel-spring-boot-starter:2.18.0')
>       compile('org.apache.camel:camel-spring-redis-starter:2.18.0')
>       compile('org.apache.camel:camel-stream-starter:2.18.0')
>         compile('org.apache.camel:camel-ahc-ws-starter:2.18.0')
>         compile('org.springframework.boot:spring-boot-actuator')
>         compile("org.springframework.boot:spring-boot-starter-web")
> And the following ahc-ws definition in Spring Boot
>         .........
>         .multicast()
>         .parallelProcessing()
>         .pipeline()
>         .marshal().json(JsonLibrary.Jackson)
>         .convertBodyTo(String.class)  // Avoids string serialization issues 
> in websocket component.
>         .to("ahc-ws://localhost:8080/votes?sendToAll=true")
>         .end()
>         .........
> At runtime I get the following error when publishing to this sink
> (This also happens in test cases without the multicast etc)
> java.util.concurrent.ExecutionException: java.lang.IllegalStateException: 
> Invalid Status Code 404
>         at 
> org.asynchttpclient.netty.NettyResponseFuture.done(NettyResponseFuture.java:228)
>  ~[async-http-client-2.0.15.jar:na]
>         at 
> org.asynchttpclient.netty.handler.WebSocketHandler$UpgradeCallback.call(WebSocketHandler.java:100)
>  ~[async-http-client-2.0.15.jar:na]
>         at 
> org.asynchttpclient.netty.handler.AsyncHttpClientHandler.channelRead(AsyncHttpClientHandler.java:73)
>  ~[async-http-client-2.0.15.jar:na]
>         at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
>  ~[netty-transport-4.0.41.Final.jar:4.0.41.Final]
>         at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
>  ~[netty-transport-4.0.41.Final.jar:4.0.41.Final]
>         at 
> io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
>  ~[netty-transport-4.0.41.Final.jar:4.0.41.Final]
>         at 
> io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:435)
>  ~[netty-transport-4.0.41.Final.jar:4.0.41.Final]
>         at 
> io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)
>  ~[netty-codec-4.0.41.Final.jar:4.0.41.Final]
>         at 
> io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267)
>  ~[netty-codec-4.0.41.Final.jar:4.0.41.Final]
>         at 
> io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:250)
>  ~[netty-transport-4.0.41.Final.jar:4.0.41.Final]
>         at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
>  ~[netty-transport-4.0.41.Final.jar:4.0.41.Final]
>         at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
>  ~[netty-transport-4.0.41.Final.jar:4.0.41.Final]
>         at 
> io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
>  ~[netty-transport-4.0.41.Final.jar:4.0.41.Final]
>         at 
> io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1294)
>  ~[netty-transport-4.0.41.Final.jar:4.0.41.Final]
>         at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
>  ~[netty-transport-4.0.41.Final.jar:4.0.41.Final]
>         at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
>  ~[netty-transport-4.0.41.Final.jar:4.0.41.Final]
>         at 
> io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:911)
>  ~[netty-transport-4.0.41.Final.jar:4.0.41.Final]
>         at 
> io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
>  ~[netty-transport-4.0.41.Final.jar:4.0.41.Final]
>         at 
> io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:611) 
> ~[netty-transport-4.0.41.Final.jar:4.0.41.Final]
>         at 
> io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:552)
>  ~[netty-transport-4.0.41.Final.jar:4.0.41.Final]
>         at 
> io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:466) 
> ~[netty-transport-4.0.41.Final.jar:4.0.41.Final]
>         at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:438) 
> ~[netty-transport-4.0.41.Final.jar:4.0.41.Final]
>         at 
> io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:140)
>  ~[netty-common-4.0.41.Final.jar:4.0.41.Final]
>         at 
> io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
>  ~[netty-common-4.0.41.Final.jar:4.0.41.Final]
>         at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91] Caused by: 
> java.lang.IllegalStateException: Invalid Status Code 404
>         at 
> org.asynchttpclient.ws.WebSocketUpgradeHandler.onCompleted(WebSocketUpgradeHandler.java:81)
>  ~[async-http-client-2.0.15.jar:na]
>         at 
> org.asynchttpclient.ws.WebSocketUpgradeHandler.onCompleted(WebSocketUpgradeHandler.java:29)
>  ~[async-http-client-2.0.15.jar:na]
>         at 
> org.asynchttpclient.netty.NettyResponseFuture.getContent(NettyResponseFuture.java:188)
>  ~[async-http-client-2.0.15.jar:na]
>         at 
> org.asynchttpclient.netty.NettyResponseFuture.done(NettyResponseFuture.java:223)
>  ~[async-http-client-2.0.15.jar:na]
>         ... 24 common frames omitted



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

Reply via email to