DOYUNG YOON created S2GRAPH-120:
-----------------------------------

             Summary: Netty version is conflict with play 2.5.9.
                 Key: S2GRAPH-120
                 URL: https://issues.apache.org/jira/browse/S2GRAPH-120
             Project: S2Graph
          Issue Type: Bug
    Affects Versions: 0.1.0
            Reporter: DOYUNG YOON
            Assignee: DOYUNG YOON
             Fix For: 0.1.0


After S2GRAPH-117, s2rest_play failed to start up rest server.
Following is stack trace.

{noformat}
Oops, cannot start the server.
io.netty.channel.ChannelException: Unable to create Channel from class class 
io.netty.channel.socket.nio.NioServerSocketChannel
        at 
io.netty.bootstrap.AbstractBootstrap$BootstrapChannelFactory.newChannel(AbstractBootstrap.java:455)
        at 
io.netty.bootstrap.AbstractBootstrap.initAndRegister(AbstractBootstrap.java:306)
        at 
io.netty.bootstrap.AbstractBootstrap.doBind(AbstractBootstrap.java:271)
        at io.netty.bootstrap.AbstractBootstrap.bind(AbstractBootstrap.java:235)
        at play.core.server.NettyServer.bind(NettyServer.scala:139)
        at 
play.core.server.NettyServer.play$core$server$NettyServer$$bindChannel(NettyServer.scala:224)
        at play.core.server.NettyServer$$anonfun$1.apply(NettyServer.scala:216)
        at play.core.server.NettyServer$$anonfun$1.apply(NettyServer.scala:216)
        at scala.Option.map(Option.scala:146)
        at play.core.server.NettyServer.<init>(NettyServer.scala:216)
        at 
play.core.server.NettyServerProvider.createServer(NettyServer.scala:279)
        at 
play.core.server.NettyServerProvider.createServer(NettyServer.scala:278)
        at 
play.core.server.ServerProvider$class.createServer(ServerProvider.scala:25)
        at 
play.core.server.NettyServerProvider.createServer(NettyServer.scala:278)
        at play.core.server.ProdServerStart$.start(ProdServerStart.scala:53)
        at play.core.server.ProdServerStart$.main(ProdServerStart.scala:22)
        at play.core.server.NettyServer$.main(NettyServer.scala:300)
        at play.core.server.NettyServer.main(NettyServer.scala)
Caused by: java.lang.NoSuchMethodError: 
io.netty.util.CharsetUtil.encoder(Ljava/nio/charset/Charset;)Ljava/nio/charset/CharsetEncoder;
        at io.netty.buffer.ByteBufUtil.<clinit>(ByteBufUtil.java:61)
        at io.netty.buffer.ByteBufAllocator.<clinit>(ByteBufAllocator.java:24)
        at 
io.netty.channel.DefaultChannelConfig.<init>(DefaultChannelConfig.java:53)
        at 
io.netty.channel.socket.DefaultServerSocketChannelConfig.<init>(DefaultServerSocketChannelConfig.java:45)
        at 
io.netty.channel.socket.nio.NioServerSocketChannel$NioServerSocketChannelConfig.<init>(NioServerSocketChannel.java:189)
        at 
io.netty.channel.socket.nio.NioServerSocketChannel$NioServerSocketChannelConfig.<init>(NioServerSocketChannel.java:187)
        at 
io.netty.channel.socket.nio.NioServerSocketChannel.<init>(NioServerSocketChannel.java:85)
        at 
io.netty.channel.socket.nio.NioServerSocketChannel.<init>(NioServerSocketChannel.java:70)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at java.lang.Class.newInstance(Class.java:442)
        at 
io.netty.bootstrap.AbstractBootstrap$BootstrapChannelFactory.newChannel(AbstractBootstrap.java:453)
        ... 17 more
{noformat}

It seems like netty version is conflicting with higher play version.
I am suggesting fix netty version to 4.0.40.Final, which is play 2.5.9 is 
dependent on.

I think adding following onto s2rest_play build.sbt would work.
{noformat}
"io.netty" % "netty-all" % "4.0.40.Final" force()
{noformat}



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

Reply via email to