Getting ChannelException when adding Google cloud client library to Play 2.5

前端 未结 1 1956
轮回少年
轮回少年 2021-01-18 11:43

Here is some of the stack trace

io.netty.channel.ChannelException: Unable to create Channel from class class io.netty.channel.socket.nio.NioServerSocketChan         


        
1条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-18 12:33

    The version of netty that google-cloud uses conflicts with the version of netty that Play uses. This will exclude google-cloud's netty in favor of Play's.

    libraryDependencies += ("com.google.cloud" % "google-cloud" % "0.3.0").excludeAll(ExclusionRule(organization = "io.netty"))
    

    However if you try to use a feature which needs gRPC it'll fail. Details:

    https://groups.google.com/forum/#!topic/play-framework/UUDZZRpAv3w https://github.com/playframework/netty-reactive-streams/pull/17

    There are two solutions:

    A. Downgrading google-cloud to 0.2.2 which you can do by renaming the artifact to gcloud-java:

    "com.google.cloud" % "gcloud-java" % "0.2.2"
    

    B. Downgrading Play back to 2.4.6

    0 讨论(0)
提交回复
热议问题