Uploaded image for project: 'S2Graph'
  1. S2Graph
  2. S2GRAPH-120

Netty version is conflict with play 2.5.9.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Done
    • Major
    • Resolution: Done
    • 0.1.0
    • 0.1.0
    • None
    • None

    Description

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

      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
      

      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.

      "io.netty" % "netty-all" % "4.0.40.Final" force()
      

      Attachments

        Issue Links

          Activity

            People

              steamshon Do Yung Yoon
              steamshon Do Yung Yoon
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 24h
                  24h
                  Remaining:
                  Remaining Estimate - 24h
                  24h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified