GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Whitelist JMH annotation processing in microbench module by laosijikaichele · Pull Request #16428 · netty/netty

Conversation

@laosijikaichele

@laosijikaichele laosijikaichele commented Mar 9, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Motivation:

Starting from JDK 23, the annotation processing was disabled by default, see:
https://bugs.java.com/bugdatabase/JDK-8321314/description
https://mail.openjdk.org/pipermail/jdk-dev/2024-May/009028.html

This change breaks the microbench module because it relies on JMH annotation processors to generate benchmark code. For instance, when building with JDK 25, run the following command within the microbench module:

mvn clean install -Dcheckstyle.skip -Pbenchmark-jar

Then run the generated JAR(java -jar target/microbenchmarks.jar), and it results in the following error:

Error: Unable to access jarfile microbenchmarks.jar
Exception in thread "main" java.lang.RuntimeException: ERROR: Unable to find the resource: /META-INF/BenchmarkList
at org.openjdk.jmh.runner.AbstractResourceReader.getReaders(AbstractResourceReader.java:98)
at org.openjdk.jmh.runner.BenchmarkList.find(BenchmarkList.java:124)
at org.openjdk.jmh.runner.Runner.internalRun(Runner.java:253)
at org.openjdk.jmh.runner.Runner.run(Runner.java:209)
at org.openjdk.jmh.Main.main(Main.java:71)

Modification:

Whitelist the jmh-generator-annprocess in the microbench/pom.xml, with annotationProcessorPaths configuration, see:
https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#annotationProcessorPaths

Result:

Properly process the JMH annotation.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@laosijikaichele
add annotation processor paths to microbench pom.xml
39c8c16
@normanmaurer normanmaurer added this to the 4.2.11.Final milestone Mar 9, 2026
chrisvest
chrisvest approved these changes Mar 9, 2026
View reviewed changes
@chrisvest chrisvest added needs-cherry-pick-4.1 This PR should be cherry-picked to 4.1 once merged. needs-cherry-pick-5.0 This PR should be cherry-picked to 5.0 once merged. labels Mar 9, 2026
@chrisvest
chrisvest merged commit 335d294 into netty:4.2 Mar 9, 2026
38 of 39 checks passed

Uh oh!

There was an error while loading. Please reload this page.

netty-project-bot pushed a commit that referenced this pull request Mar 9, 2026
@laosijikaichele @netty-project-bot
Whitelist JMH annotation processing in microbench module (#16428)
f6fb3e9
Motivation:

Starting from JDK 23, the annotation processing was disabled by default,
see:
https://bugs.java.com/bugdatabase/JDK-8321314/description
https://mail.openjdk.org/pipermail/jdk-dev/2024-May/009028.html

This change breaks the `microbench` module because it relies on JMH
annotation processors to generate benchmark code. For instance, when
building with JDK 25, run the following command within the `microbench`
module:

> mvn clean install -Dcheckstyle.skip -Pbenchmark-jar

Then run the generated JAR(`java -jar target/microbenchmarks.jar`), and
it results in the following error:

> Error: Unable to access jarfile microbenchmarks.jar
> Exception in thread "main" java.lang.RuntimeException: ERROR: Unable
to find the resource: /META-INF/BenchmarkList
> at
org.openjdk.jmh.runner.AbstractResourceReader.getReaders(AbstractResourceReader.java:98)
> at org.openjdk.jmh.runner.BenchmarkList.find(BenchmarkList.java:124)
>         at org.openjdk.jmh.runner.Runner.internalRun(Runner.java:253)
>         at org.openjdk.jmh.runner.Runner.run(Runner.java:209)
>         at org.openjdk.jmh.Main.main(Main.java:71)

Modification:

Whitelist the `jmh-generator-annprocess` in the `microbench/pom.xml`,
with `annotationProcessorPaths` configuration, see:

https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#annotationProcessorPaths

Result:

Properly process the JMH annotation.

(cherry picked from commit 335d294)
netty-project-bot pushed a commit that referenced this pull request Mar 9, 2026
@laosijikaichele @netty-project-bot
Whitelist JMH annotation processing in microbench module (#16428)
e319b48
Motivation:

Starting from JDK 23, the annotation processing was disabled by default,
see:
https://bugs.java.com/bugdatabase/JDK-8321314/description
https://mail.openjdk.org/pipermail/jdk-dev/2024-May/009028.html

This change breaks the `microbench` module because it relies on JMH
annotation processors to generate benchmark code. For instance, when
building with JDK 25, run the following command within the `microbench`
module:

> mvn clean install -Dcheckstyle.skip -Pbenchmark-jar

Then run the generated JAR(`java -jar target/microbenchmarks.jar`), and
it results in the following error:

> Error: Unable to access jarfile microbenchmarks.jar
> Exception in thread "main" java.lang.RuntimeException: ERROR: Unable
to find the resource: /META-INF/BenchmarkList
> at
org.openjdk.jmh.runner.AbstractResourceReader.getReaders(AbstractResourceReader.java:98)
> at org.openjdk.jmh.runner.BenchmarkList.find(BenchmarkList.java:124)
>         at org.openjdk.jmh.runner.Runner.internalRun(Runner.java:253)
>         at org.openjdk.jmh.runner.Runner.run(Runner.java:209)
>         at org.openjdk.jmh.Main.main(Main.java:71)

Modification:

Whitelist the `jmh-generator-annprocess` in the `microbench/pom.xml`,
with `annotationProcessorPaths` configuration, see:

https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#annotationProcessorPaths

Result:

Properly process the JMH annotation.

(cherry picked from commit 335d294)
@netty-project-bot

netty-project-bot commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

Auto-port PR for 5.0: #16429

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@netty-project-bot

netty-project-bot commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

Auto-port PR for 4.1: #16430

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot removed needs-cherry-pick-5.0 This PR should be cherry-picked to 5.0 once merged. needs-cherry-pick-4.1 This PR should be cherry-picked to 4.1 once merged. labels Mar 9, 2026
This was referenced Mar 9, 2026
Auto-port 5.0: Whitelist JMH annotation processing in microbench module #16429
Merged
Auto-port 4.1: Whitelist JMH annotation processing in microbench module #16430
Merged
chrisvest pushed a commit that referenced this pull request Mar 9, 2026
@netty-project-bot @laosijikaichele
Auto-port 4.1: Whitelist JMH annotation processing in microbench modu…
37656b2
…le (#16430)

Auto-port of #16428 to 4.1
Cherry-picked commit: 335d294

---
Motivation:

Starting from JDK 23, the annotation processing was disabled by default,
see:
https://bugs.java.com/bugdatabase/JDK-8321314/description
https://mail.openjdk.org/pipermail/jdk-dev/2024-May/009028.html

This change breaks the `microbench` module because it relies on JMH
annotation processors to generate benchmark code. For instance, when
building with JDK 25, run the following command within the `microbench`
module:

> mvn clean install -Dcheckstyle.skip -Pbenchmark-jar

Then run the generated JAR(`java -jar target/microbenchmarks.jar`), and
it results in the following error:

> Error: Unable to access jarfile microbenchmarks.jar
> Exception in thread "main" java.lang.RuntimeException: ERROR: Unable
to find the resource: /META-INF/BenchmarkList
> at
org.openjdk.jmh.runner.AbstractResourceReader.getReaders(AbstractResourceReader.java:98)
> at org.openjdk.jmh.runner.BenchmarkList.find(BenchmarkList.java:124)
>         at org.openjdk.jmh.runner.Runner.internalRun(Runner.java:253)
>         at org.openjdk.jmh.runner.Runner.run(Runner.java:209)
>         at org.openjdk.jmh.Main.main(Main.java:71) 

Modification:

Whitelist the `jmh-generator-annprocess` in the `microbench/pom.xml`,
with `annotationProcessorPaths` configuration, see:

https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#annotationProcessorPaths

Result:

Properly process the JMH annotation.

Co-authored-by: old driver <[email protected]>
chrisvest pushed a commit that referenced this pull request Mar 11, 2026
@netty-project-bot @laosijikaichele
Auto-port 5.0: Whitelist JMH annotation processing in microbench modu…
1f29494
…le (#16429)

Auto-port of #16428 to 5.0
Cherry-picked commit: 335d294

---
Motivation:

Starting from JDK 23, the annotation processing was disabled by default,
see:
https://bugs.java.com/bugdatabase/JDK-8321314/description
https://mail.openjdk.org/pipermail/jdk-dev/2024-May/009028.html

This change breaks the `microbench` module because it relies on JMH
annotation processors to generate benchmark code. For instance, when
building with JDK 25, run the following command within the `microbench`
module:

> mvn clean install -Dcheckstyle.skip -Pbenchmark-jar

Then run the generated JAR(`java -jar target/microbenchmarks.jar`), and
it results in the following error:

> Error: Unable to access jarfile microbenchmarks.jar
> Exception in thread "main" java.lang.RuntimeException: ERROR: Unable
to find the resource: /META-INF/BenchmarkList
> at
org.openjdk.jmh.runner.AbstractResourceReader.getReaders(AbstractResourceReader.java:98)
> at org.openjdk.jmh.runner.BenchmarkList.find(BenchmarkList.java:124)
>         at org.openjdk.jmh.runner.Runner.internalRun(Runner.java:253)
>         at org.openjdk.jmh.runner.Runner.run(Runner.java:209)
>         at org.openjdk.jmh.Main.main(Main.java:71) 

Modification:

Whitelist the `jmh-generator-annprocess` in the `microbench/pom.xml`,
with `annotationProcessorPaths` configuration, see:

https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#annotationProcessorPaths

Result:

Properly process the JMH annotation.

Co-authored-by: old driver <[email protected]>
@normanmaurer normanmaurer mentioned this pull request Oct 1, 2026
child5 #17695
Closed
@normanmaurer normanmaurer mentioned this pull request Oct 26, 2026
crisp nova cceda091 #18109
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chrisvest chrisvest chrisvest approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

4.2.11.Final

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@laosijikaichele @netty-project-bot @chrisvest @normanmaurer
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.