[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-5071?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dávid Paksy updated ZOOKEEPER-5071:
-----------------------------------
    Description: 
zookeeper-it subproject compilation seems to fail when using Java 17 or 21 with 
the following error:

 
{noformat}
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) 
on project zookeeper-it: Fatal error compiling: java.lang.NullPointerException: 
Cannot invoke "javax.lang.model.element.Element.getKind()" because "elem" is 
null -> [Help 1]{noformat}
Interestingly it does not seem to have the problem with Java 25.

The problem seems to be the jmh-generator-annprocess dependency. We should 
update it to 1.37 to support Java 17+.

Tried with the following JDK versions:

 
{noformat}
java -version                                                      
openjdk version "17.0.19" 2026-04-21
OpenJDK Runtime Environment Temurin-17.0.19+10 (build 17.0.19+10)
OpenJDK 64-Bit Server VM Temurin-17.0.19+10 (build 17.0.19+10, mixed mode, 
sharing)

java -version           
openjdk version "21.0.11" 2026-04-21 LTS
OpenJDK Runtime Environment Temurin-21.0.11+10 (build 21.0.11+10-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.11+10 (build 21.0.11+10-LTS, mixed mode, 
sharing){noformat}

  was:
zookeeper-it subproject compilation seems to fail when using Java 17 or 21 with 
the following error:

 
{noformat}
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) 
on project zookeeper-it: Fatal error compiling: java.lang.NullPointerException: 
Cannot invoke "javax.lang.model.element.Element.getKind()" because "elem" is 
null -> [Help 1]{noformat}
Interestingly it does not seem to have the problem with Java 25.

The problem seems to be the jmh-generator-annprocess dependency. We should 
update it to 1.37 to support Java 17+.

 


> Fix zookeeper-it NPE compilation failure on Java 17, 21
> -------------------------------------------------------
>
>                 Key: ZOOKEEPER-5071
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-5071
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: build
>            Reporter: Dávid Paksy
>            Assignee: Dávid Paksy
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> zookeeper-it subproject compilation seems to fail when using Java 17 or 21 
> with the following error:
>  
> {noformat}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile 
> (default-compile) on project zookeeper-it: Fatal error compiling: 
> java.lang.NullPointerException: Cannot invoke 
> "javax.lang.model.element.Element.getKind()" because "elem" is null -> [Help 
> 1]{noformat}
> Interestingly it does not seem to have the problem with Java 25.
> The problem seems to be the jmh-generator-annprocess dependency. We should 
> update it to 1.37 to support Java 17+.
> Tried with the following JDK versions:
>  
> {noformat}
> java -version                                                      
> openjdk version "17.0.19" 2026-04-21
> OpenJDK Runtime Environment Temurin-17.0.19+10 (build 17.0.19+10)
> OpenJDK 64-Bit Server VM Temurin-17.0.19+10 (build 17.0.19+10, mixed mode, 
> sharing)
> java -version           
> openjdk version "21.0.11" 2026-04-21 LTS
> OpenJDK Runtime Environment Temurin-21.0.11+10 (build 21.0.11+10-LTS)
> OpenJDK 64-Bit Server VM Temurin-21.0.11+10 (build 21.0.11+10-LTS, mixed 
> mode, sharing){noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to