Using the following dependencies

        compile('org.apache.camel:camel-jackson:2.18.0')
        compile('org.apache.camel:camel-metrics:2.18.0')
        compile('org.apache.camel:camel-spring-boot-starter:2.18.0')
        compile('org.apache.camel:camel-spring-redis:2.18.0')
        compile('org.apache.camel:camel-stream:2.18.0')
        compile('org.apache.camel:camel-ahc-ws: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

2016-10-25 11:41:45.689  INFO 1864 --- [ #7 - Multicast] 
o.a.camel.component.ahc.ws.WsEndpoint    : Reconnecting websocket: 
ws://localhost:8080/votes?sendToAll=true
2016-10-25 11:41:45.777 ERROR 1864 --- [ #7 - Multicast] 
o.a.camel.processor.DefaultErrorHandler  : Failed delivery for (MessageId: 
ID-singram-mint172-42019-1477410101007-0-56 on ExchangeId: 
ID-singram-mint172-42019-1477410101007-0-59). Exhausted after delivery attempt: 
1 caught: java.util.concurrent.ExecutionException: java.net.ConnectException: 
io.netty.channel.DefaultChannelId.newInstance()Lio/netty/channel/DefaultChannelId;

java.util.concurrent.ExecutionException: java.net.ConnectException: 
io.netty.channel.DefaultChannelId.newInstance()Lio/netty/channel/DefaultChannelId;
        at 
org.asynchttpclient.netty.NettyResponseFuture.abort(NettyResponseFuture.java:239)
 ~[async-http-client-2.0.15.jar:na]
        at 
org.asynchttpclient.netty.channel.NettyConnectListener.onFailure(NettyConnectListener.java:162)
 ~[async-http-client-2.0.15.jar:na]
        at 
org.asynchttpclient.netty.request.NettyChannelConnector$1.onFailure(NettyChannelConnector.java:103)
 ~[async-http-client-2.0.15.jar:na]
        at 
org.asynchttpclient.netty.SimpleChannelFutureListener.operationComplete(SimpleChannelFutureListener.java:28)
 ~[async-http-client-2.0.15.jar:na]
        at 
org.asynchttpclient.netty.SimpleChannelFutureListener.operationComplete(SimpleChannelFutureListener.java:20)
 ~[async-http-client-2.0.15.jar:na]
        at 
io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:514)
 ~[netty-all-4.1.5.Final.jar:4.1.5.Final]
        at 
io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:488)
 ~[netty-all-4.1.5.Final.jar:4.1.5.Final]
        at 
io.netty.util.concurrent.DefaultPromise.access$000(DefaultPromise.java:34) 
~[netty-all-4.1.5.Final.jar:4.1.5.Final]
        at 
io.netty.util.concurrent.DefaultPromise$1.run(DefaultPromise.java:438) 
~[netty-all-4.1.5.Final.jar:4.1.5.Final]
        at 
io.netty.util.concurrent.GlobalEventExecutor$TaskRunner.run(GlobalEventExecutor.java:233)
 ~[netty-all-4.1.5.Final.jar:4.1.5.Final]
        at 
io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
 ~[netty-all-4.1.5.Final.jar:4.1.5.Final]
        at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91]
Caused by: java.net.ConnectException: 
io.netty.channel.DefaultChannelId.newInstance()Lio/netty/channel/DefaultChannelId;
        at 
org.asynchttpclient.netty.channel.NettyConnectListener.onFailure(NettyConnectListener.java:160)
 ~[async-http-client-2.0.15.jar:na]
        ... 10 common frames omitted
Caused by: java.lang.NoSuchMethodError: 
io.netty.channel.DefaultChannelId.newInstance()Lio/netty/channel/DefaultChannelId;
        at io.netty.channel.AbstractChannel.newId(AbstractChannel.java:107) 
~[netty-all-4.1.5.Final.jar:4.1.5.Final]
        at io.netty.channel.AbstractChannel.<init>(AbstractChannel.java:79) 
~[netty-all-4.1.5.Final.jar:4.1.5.Final]
        at 
io.netty.channel.nio.AbstractNioChannel.<init>(AbstractNioChannel.java:84) 
~[netty-all-4.1.5.Final.jar:4.1.5.Final]
        at 
io.netty.channel.nio.AbstractNioByteChannel.<init>(AbstractNioByteChannel.java:54)
 ~[netty-all-4.1.5.Final.jar:4.1.5.Final]
        at 
io.netty.channel.socket.nio.NioSocketChannel.<init>(NioSocketChannel.java:98) 
~[netty-all-4.1.5.Final.jar:4.1.5.Final]
        at 
io.netty.channel.socket.nio.NioSocketChannel.<init>(NioSocketChannel.java:88) 
~[netty-all-4.1.5.Final.jar:4.1.5.Final]
        at 
io.netty.channel.socket.nio.NioSocketChannel.<init>(NioSocketChannel.java:81) 
~[netty-all-4.1.5.Final.jar:4.1.5.Final]
        at 
io.netty.channel.socket.nio.NioSocketChannel.<init>(NioSocketChannel.java:74) 
~[netty-all-4.1.5.Final.jar:4.1.5.Final]
        at 
org.asynchttpclient.netty.channel.NioSocketChannelFactory.newChannel(NioSocketChannelFactory.java:25)
 ~[async-http-client-2.0.15.jar:na]
        at 
org.asynchttpclient.netty.channel.NioSocketChannelFactory.newChannel(NioSocketChannelFactory.java:19)
 ~[async-http-client-2.0.15.jar:na]
        at 
io.netty.bootstrap.AbstractBootstrap.initAndRegister(AbstractBootstrap.java:319)
 ~[netty-all-4.1.5.Final.jar:4.1.5.Final]
        at io.netty.bootstrap.Bootstrap.doResolveAndConnect(Bootstrap.java:163) 
~[netty-all-4.1.5.Final.jar:4.1.5.Final]
        at io.netty.bootstrap.Bootstrap.connect(Bootstrap.java:156) 
~[netty-all-4.1.5.Final.jar:4.1.5.Final]

Any thoughts on what's going on/missing?

I did notice that the dependency tree is a little odd in that netty-all (see 
bottom) is 4.1.5 and all other netty dependencies are 4.0.41.  This was 
generated with 'gradle dependencies'

+--- org.apache.camel:camel-ahc-ws:2.18.0
|    +--- org.apache.camel:camel-core:2.18.0 (*)
|    \--- org.apache.camel:camel-ahc:2.18.0
|         +--- org.apache.camel:camel-core:2.18.0 (*)
|         +--- org.asynchttpclient:async-http-client:2.0.15
|         |    +--- org.asynchttpclient:async-http-client-netty-utils:2.0.15
|         |    |    +--- io.netty:netty-buffer:4.0.41.Final
|         |    |    |    \--- io.netty:netty-common:4.0.41.Final
|         |    |    \--- org.slf4j:slf4j-api:1.7.21
|         |    +--- io.netty:netty-codec-http:4.0.41.Final
|         |    |    +--- io.netty:netty-codec:4.0.41.Final
|         |    |    |    \--- io.netty:netty-transport:4.0.41.Final
|         |    |    |         \--- io.netty:netty-buffer:4.0.41.Final (*)
|         |    |    \--- io.netty:netty-handler:4.0.41.Final
|         |    |         +--- io.netty:netty-buffer:4.0.41.Final (*)
|         |    |         +--- io.netty:netty-transport:4.0.41.Final (*)
|         |    |         \--- io.netty:netty-codec:4.0.41.Final (*)
|         |    +--- io.netty:netty-transport-native-epoll:4.0.41.Final
|         |    |    +--- io.netty:netty-common:4.0.41.Final
|         |    |    +--- io.netty:netty-buffer:4.0.41.Final (*)
|         |    |    \--- io.netty:netty-transport:4.0.41.Final (*)
|         |    +--- org.asynchttpclient:netty-resolver-dns:2.0.15
|         |    |    +--- org.asynchttpclient:netty-resolver:2.0.15
|         |    |    |    +--- io.netty:netty-common:4.0.41.Final
|         |    |    |    \--- org.slf4j:slf4j-api:1.7.21
|         |    |    +--- org.asynchttpclient:netty-codec-dns:2.0.15
|         |    |    |    +--- io.netty:netty-codec:4.0.41.Final (*)
|         |    |    |    \--- org.slf4j:slf4j-api:1.7.21
|         |    |    +--- io.netty:netty-transport:4.0.41.Final (*)
|         |    |    \--- org.slf4j:slf4j-api:1.7.21
|         |    +--- org.reactivestreams:reactive-streams:1.0.0
|         |    +--- com.typesafe.netty:netty-reactive-streams:1.0.7
|         |    |    +--- io.netty:netty-handler:4.0.39.Final -> 4.0.41.Final (*)
|         |    |    \--- org.reactivestreams:reactive-streams:1.0.0
|         |    +--- org.javassist:javassist:3.20.0-GA
|         |    \--- org.slf4j:slf4j-api:1.7.21
|         \--- io.netty:netty-all:4.1.5.Final

Any assistance would be greatly appreciated

Thanks
- Stuart

Reply via email to