`com.influxdb:influxdb3-java:1.2.0` does not work with JDK 24
Closed this issue · 2 comments
linghengqian commented
Specifications
- Client Version:
1.2.0 - InfluxDB Version:
3.2.1 - Platform:
Core
Code sample to reproduce problem
- I created a set of unit tests at https://github.com/linghengqian/influxdb-3-core-jdbc-test to verify it.
sdk install java 24.0.2-tem
sdk use java 24.0.2-tem
git clone git@github.com:linghengqian/influxdb-3-core-jdbc-test.git
cd ./influxdb-3-core-jdbc-test/
./mvnw -T 1C clean test[INFO] Running io.github.linghengqian.influxdb3java.PointValuesTest
Error: Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 3.900 s <<< FAILURE! -- in io.github.linghengqian.influxdb3java.PointValuesTest
Error: io.github.linghengqian.influxdb3java.PointValuesTest.test -- Time elapsed: 3.897 s <<< ERROR!
java.lang.NoClassDefFoundError: Could not initialize class org.apache.arrow.memory.RootAllocator
at com.influxdb.v3.client.internal.FlightSqlClient.createFlightClient(FlightSqlClient.java:172)
at com.influxdb.v3.client.internal.FlightSqlClient.<init>(FlightSqlClient.java:102)
at com.influxdb.v3.client.internal.FlightSqlClient.<init>(FlightSqlClient.java:80)
at com.influxdb.v3.client.internal.InfluxDBClientImpl.<init>(InfluxDBClientImpl.java:113)
at com.influxdb.v3.client.internal.InfluxDBClientImpl.<init>(InfluxDBClientImpl.java:94)
at com.influxdb.v3.client.InfluxDBClient.getInstance(InfluxDBClient.java:519)
at com.influxdb.v3.client.InfluxDBClient.getInstance(InfluxDBClient.java:480)
at io.github.linghengqian.influxdb3java.PointValuesTest.test(PointValuesTest.java:49)
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.ExceptionInInitializerError [in thread "main"]
at org.apache.arrow.memory.netty.DefaultAllocationManagerFactory.<clinit>(DefaultAllocationManagerFactory.java:26)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:463)
at java.base/java.lang.Class.forName(Class.java:454)
at org.apache.arrow.memory.DefaultAllocationManagerOption.getFactory(DefaultAllocationManagerOption.java:105)
at org.apache.arrow.memory.DefaultAllocationManagerOption.getDefaultAllocationManagerFactory(DefaultAllocationManagerOption.java:92)
at org.apache.arrow.memory.BaseAllocator$Config.getAllocationManagerFactory(BaseAllocator.java:826)
at org.apache.arrow.memory.ImmutableConfig.access$001(ImmutableConfig.java:20)
at org.apache.arrow.memory.ImmutableConfig$InitShim.getAllocationManagerFactory(ImmutableConfig.java:80)
at org.apache.arrow.memory.ImmutableConfig.<init>(ImmutableConfig.java:43)
at org.apache.arrow.memory.ImmutableConfig$Builder.build(ImmutableConfig.java:487)
at org.apache.arrow.memory.BaseAllocator.<clinit>(BaseAllocator.java:72)
at com.influxdb.v3.client.internal.FlightSqlClient.createFlightClient(FlightSqlClient.java:172)
at com.influxdb.v3.client.internal.FlightSqlClient.<init>(FlightSqlClient.java:102)
at com.influxdb.v3.client.internal.FlightSqlClient.<init>(FlightSqlClient.java:80)
at com.influxdb.v3.client.internal.InfluxDBClientImpl.<init>(InfluxDBClientImpl.java:113)
at com.influxdb.v3.client.internal.InfluxDBClientImpl.<init>(InfluxDBClientImpl.java:94)
at com.influxdb.v3.client.InfluxDBClient.getInstance(InfluxDBClient.java:519)
at com.influxdb.v3.client.InfluxDBClient.getInstance(InfluxDBClient.java:480)
at io.github.linghengqian.TimeDifferenceTest.test(TimeDifferenceTest.java:55)
... 3 more- I also created a CI file of Github Actions to verify. The complete log is at https://github.com/linghengqian/influxdb-3-core-jdbc-test/actions/runs/16438099623/job/46452203646 .
Expected behavior
com.influxdb:influxdb3-java:1.2.0works with JDK 24.
Actual behavior
com.influxdb:influxdb3-java:1.2.0does not work with JDK 24.
Additional info
- By the way, according to https://github.com/linghengqian/influxdb-3-core-jdbc-test/actions/runs/16438099623/job/46452203637 ,
com.influxdb:influxdb3-java:1.2.0works fine on JDK 21.
NguyenHoangSon96 commented
Hi @linghengqian
Thank you for reaching out.
We will take a look.
NguyenHoangSon96 commented
Hi @linghengqian
The fix will be released in the next version, but right now you can make it works by just upgrading the netty version to 4.2.3.Final like the screenshot below.
