Error in sample Hello World program

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Error in sample Hello World program

Rubin
Hi All,

I am new to Ratpack and the forum. I tried to run the sample "Hello World" program through a Groovy Script as shown below

@Grab('io.ratpack:ratpack-groovy:1.4.4')

import static ratpack.groovy.Groovy.ratpack


ratpack {
        handlers {
            get {
                render "Hello, World!"
            }
        }
}

I am getting the error shown below. Can you please help with the issue here ?

Nov 15, 2016 11:24:40 PM io.netty.channel.AbstractChannelHandlerContext invokeExceptionCaught
WARNING: An exception was thrown by a user handler's exceptionCaught() method while handling the following exception:
java.lang.NoSuchMethodError: io.netty.handler.codec.http.HttpRequest.decoderResult()Lio/netty/handler/codec/DecoderResult;
        at ratpack.server.internal.NettyHandlerAdapter.newRequest(NettyHandlerAdapter.java:105)
        at ratpack.server.internal.NettyHandlerAdapter.channelRead(NettyHandlerAdapter.java:82)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
        at ratpack.server.internal.DefaultRatpackServer$ReloadHandler.lambda$null$6(DefaultRatpackServer.java:453)
        at ratpack.exec.internal.DefaultPromise$1.success(DefaultPromise.java:43)
        at ratpack.exec.Promise$2.success(Promise.java:1591)
        at ratpack.exec.Promise$2.success(Promise.java:1591)
        at ratpack.exec.internal.DefaultExecution$1.lambda$success$1(DefaultExecution.java:137)
        at ratpack.exec.internal.DefaultExecution$SingleEventExecStream.exec(DefaultExecution.java:484)
        at ratpack.exec.internal.DefaultExecution.exec(DefaultExecution.java:223)
        at ratpack.exec.internal.DefaultExecution.intercept(DefaultExecution.java:216)
        at ratpack.exec.internal.DefaultExecution.drain(DefaultExecution.java:196)
        at ratpack.exec.internal.DefaultExecution.<init>(DefaultExecution.java:96)
        at ratpack.exec.internal.DefaultExecController$1.start(DefaultExecController.java:189)
        at ratpack.server.internal.DefaultRatpackServer$ReloadHandler.channelRead(DefaultRatpackServer.java:413)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
        at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
        at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
        at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:242)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:847)
        at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
        at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
        at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:111)
        at ratpack.exec.internal.DefaultExecController$ExecControllerBindingThreadFactory.lambda$newThread$0(DefaultExecController.java:136)
        at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)
        at java.lang.Thread.run(Thread.java:745)

Nov 15, 2016 11:24:40 PM io.netty.channel.AbstractChannelHandlerContext invokeExceptionCaught
WARNING: An exception was thrown by a user handler's exceptionCaught() method while handling the following exception:
java.lang.NoSuchMethodError: io.netty.handler.codec.http.HttpContent.touch()Lio/netty/handler/codec/http/HttpContent;
        at ratpack.server.internal.NettyHandlerAdapter.channelRead(NettyHandlerAdapter.java:84)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
        at ratpack.server.internal.DefaultRatpackServer$ReloadHandler.lambda$null$6(DefaultRatpackServer.java:453)
        at ratpack.exec.internal.DefaultPromise$1.success(DefaultPromise.java:43)
        at ratpack.exec.Promise$2.success(Promise.java:1591)
        at ratpack.exec.Promise$2.success(Promise.java:1591)
        at ratpack.exec.internal.DefaultExecution$1.lambda$success$1(DefaultExecution.java:137)
        at ratpack.exec.internal.DefaultExecution$SingleEventExecStream.exec(DefaultExecution.java:484)
        at ratpack.exec.internal.DefaultExecution.exec(DefaultExecution.java:223)
        at ratpack.exec.internal.DefaultExecution.intercept(DefaultExecution.java:216)
        at ratpack.exec.internal.DefaultExecution.drain(DefaultExecution.java:196)
        at ratpack.exec.internal.DefaultExecution.<init>(DefaultExecution.java:96)
        at ratpack.exec.internal.DefaultExecController$1.start(DefaultExecController.java:189)
        at ratpack.server.internal.DefaultRatpackServer$ReloadHandler.channelRead(DefaultRatpackServer.java:413)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
        at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
        at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
        at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:242)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:847)
        at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
        at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
        at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:111)
        at ratpack.exec.internal.DefaultExecController$ExecControllerBindingThreadFactory.lambda$newThread$0(DefaultExecController.java:136)
        at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)
        at java.lang.Thread.run(Thread.java:745)
Reply | Threaded
Open this post in threaded view
|

Re: Error in sample Hello World program

danhyun
Hi Rubin,

Can you share the following:

OS:

Groovy Version:

Java Version:

How you are making a request? e.g. Browser, curl, postman, etc
Reply | Threaded
Open this post in threaded view
|

Re: Error in sample Hello World program

Rubin
Hi Dan,

Thank you for looking into my request.

Here is the info you requested

OS: Windows 7 64 bit
Groovy Version: 2.4.7
Java Version: 1.8.0_111

I am using Google chrome ver 54.0.2840.99 .
I am also getting the same error from internet explorer. The error shows up in my intellij(community edition) IDE console.

Please let me know if you need any further information. Much appreciate your help.