Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-15861

[Java][Flight] grpc-netty, version mismatch, incompatible ctor for "PooledByteBufAllocator" in io.grpc.netty.Utils#createByteBufAllocator

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 8.0.0
    • None
    • FlightRPC, Java
    • None

    Description

      Using Arrow nightly jars from 03/03/2022

      val LOCALHOST = "localhost"
      val allocator = RootAllocator(Long.MAX_VALUE)
      val serverLocation = Location.forGrpcInsecure(LOCALHOST, 0)
      val producer = DataWrapperFlightSQLProducer(serverLocation)
      val server = FlightServer.builder(allocator, serverLocation, producer).build().start()
      val clientLocation = Location.forGrpcInsecure(LOCALHOST, server.port)
      val client = FlightSqlClient(FlightClient.builder(allocator, clientLocation).build())
      

      This throws the following error (from "FlightServer.builder")

      'void io.netty.buffer.PooledByteBufAllocator.<init>(boolean, int, int, int, int, int, int, boolean)'
      java.lang.NoSuchMethodError: 'void io.netty.buffer.PooledByteBufAllocator.<init>(boolean, int, int, int, int, int, int, boolean)'
      	at io.grpc.netty.Utils.createByteBufAllocator(Utils.java:176)
      	at io.grpc.netty.Utils.access$000(Utils.java:75)
      	at io.grpc.netty.Utils$ByteBufAllocatorPreferDirectHolder.<clinit>(Utils.java:97)
      	at io.grpc.netty.Utils.getByteBufAllocator(Utils.java:144)
      	at io.grpc.netty.NettyServer.start(NettyServer.java:205)
      	at io.grpc.internal.ServerImpl.start(ServerImpl.java:183)
      	at io.grpc.internal.ServerImpl.start(ServerImpl.java:92)
      	at org.apache.arrow.flight.FlightServer.start(FlightServer.java:83)
      	at FlightSQLServerAndClientTest.<clinit>(FlightSQLServerAndClientTest.kt:33)
      

      The reason is because the constructor is incompatible:

      To fix this, you can override Arrow's dependencies versions:

      implementation("io.grpc", "grpc-netty").version {
          strictly("1.44.1")
      }
      implementation("io.netty", "netty-all").version {
          strictly("4.1.74.Final")
      }
      implementation("io.netty", "netty-codec").version {
          strictly("4.1.74.Final")
      }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            gavinray Gavin Ray
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: