asfimport opened a new issue, #347:
URL: https://github.com/apache/arrow-java/issues/347

   Using Arrow nightly jars from 03/03/2022
   
   ```java
   
   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")
   ```java
   
   '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:
   
    
![image-2022-03-07-10-47-09-355.png](https://issues.apache.org/jira/secure/attachment/13040808/image-2022-03-07-10-47-09-355.png)
 
   
   To fix this, you can override Arrow's dependencies versions:
   ```groovy
   
   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")
   }
   ```
   
   **Reporter**: [Gavin Ray](https://issues.apache.org/jira/browse/ARROW-15861)
   #### Original Issue Attachments:
   - 
[image-2022-03-07-10-47-09-355.png](https://issues.apache.org/jira/secure/attachment/13040808/image-2022-03-07-10-47-09-355.png)
   
   <sub>**Note**: *This issue was originally created as 
[ARROW-15861](https://issues.apache.org/jira/browse/ARROW-15861). Please see 
the [migration documentation](https://github.com/apache/arrow/issues/14542) for 
further details.*</sub>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to