Ankit Manoj Jadhav created ZOOKEEPER-5046:
---------------------------------------------
Summary: StaticHostProviderTest fails on Java 21+ due to
burningwave NativeDriver incompatibility
Key: ZOOKEEPER-5046
URL: https://issues.apache.org/jira/browse/ZOOKEEPER-5046
Project: ZooKeeper
Issue Type: Bug
Components: server
Affects Versions: 3.9.5
Environment: {*}OS{*}: macOS
*Java:* OpenJDK 26.0.1 (build 26.0.1+8-34)
{*}Build tool{*}: Maven
Reporter: Ankit Manoj Jadhav
*Problem*
StaticHostProviderTest fails during @BeforeAll setup with a
java.lang.ExceptionInInitializerError
caused by the burningwave-tools library being unable to initialize its
NativeDriver on Java 21+.
*Environment*
* Java Version: OpenJDK 26.0.1 (build 26.0.1+8-34)
* JVM Vendor: OpenJDK 64-Bit Server VM
* OS: macOS (Homebrew)
*Stack Trace*
{code:java}
java.lang.ExceptionInInitializerError
at
org.burningwave.tools.net.DefaultHostResolver.<clinit>(DefaultHostResolver.java:68)
at
org.burningwave.tools.net.HostResolutionRequestInterceptor.<clinit>(HostResolutionRequestInterceptor.java:61)
at
org.apache.zookeeper.test.StaticHostProviderTest.setupDNSMocks(StaticHostProviderTest.java:68)
Caused by: java.lang.RuntimeException:
io.github.toolfactory.jvm.Driver$InitializeException: Could not initialize
NativeDriver
at
org.burningwave.core.assembler.StaticComponentContainer.<clinit>(StaticComponentContainer.java:481)
Caused by: io.github.toolfactory.jvm.Driver$InitializeException: Could not
initialize NativeDriver
Caused by: io.github.toolfactory.jvm.util.ObjectProvider$BuildingException:
Exception occurred while
retrieving the implementation of class
org.burningwave.jvm.function.catalog.AllocateInstanceFunction$Native
(jvm architecture: x64, jvm version: 26, jvm vendor: OpenJDK)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class
org.burningwave.jvm.NativeExecutor
{code}
*Steps to Reproduce*
1. Clone apache/zookeeper master branch
2. Install Java 26 (OpenJDK)
3. Run: mvn test -pl zookeeper-server -Dtest=StaticHostProviderTest
4. Test fails immediately in @BeforeAll with ExceptionInInitializerError
*Expected Behavior*
StaticHostProviderTest should pass on Java 21+.
*Possible Fix*
Upgrade the burningwave-tools dependency to a version that supports Java 21+,
or refactor StaticHostProviderTest to mock DNS without relying on
burningwave-tools.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)