jmh icon indicating copy to clipboard operation
jmh copied to clipboard

adding the missing directive -proc:full

Open Arcane561 opened this issue 1 month ago • 3 comments
trafficstars

Error correction when running ERROR: Unable to find the resource: /META-INF/benchmark List while generating a jmh project using the jmh-java-benchmark-archetype.

added directive -proc:full in java maven archetype, without which the assembled benchmark project does not start

error:

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:252)
        at org.openjdk.jmh.runner.Runner.run(Runner.java:208)
        at org.openjdk.jmh.Main.main(Main.java:71)

This error has already been reported here. https://mail.openjdk.org/pipermail/jmh-dev/2023-October/003811.html

it is also described in https://stackoverflow.com/a/79096948

and it seems to be present since jdk 22.


Progress

  • [x] Change must not contain extraneous whitespace
  • [ ] Change must be properly reviewed (1 review required, with at least 1 Committer)

Error

 ⚠️ OCA signatory status must be verified

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jmh.git pull/164/head:pull/164
$ git checkout pull/164

Update a local copy of the PR:
$ git checkout pull/164
$ git pull https://git.openjdk.org/jmh.git pull/164/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 164

View PR using the GUI difftool:
$ git pr show -t 164

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jmh/pull/164.diff

Arcane561 avatar Oct 15 '25 22:10 Arcane561

Hi @Arcane561, welcome to this OpenJDK project and thanks for contributing!

We do not recognize you as Contributor and need to ensure you have signed the Oracle Contributor Agreement (OCA). If you have not signed the OCA, please follow the instructions. Please fill in your GitHub username in the "Username" field of the application. Once you have signed the OCA, please let us know by writing /signed in a comment in this pull request.

If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please use "Add GitHub user Arcane561" as summary for the issue.

If you are contributing this work on behalf of your employer and your employer has signed the OCA, please let us know by writing /covered in a comment in this pull request.

bridgekeeper[bot] avatar Oct 15 '25 22:10 bridgekeeper[bot]

❗ This change is not yet ready to be integrated. See the Progress checklist in the description for automated requirements.

openjdk[bot] avatar Oct 15 '25 22:10 openjdk[bot]

:warning: @Arcane561 a branch with the same name as the source branch for this pull request (master) is present in the target repository. If you eventually integrate this pull request then the branch master in your personal fork will diverge once you sync your personal fork with the upstream repository.

To avoid this situation, create a new branch for your changes and reset the master branch. You can do this by running the following commands in a local repository for your personal fork. Note: you do not have to name the new branch NEW-BRANCH-NAME.

$ git checkout -b NEW-BRANCH-NAME
$ git branch -f master 2a316030b509aa9874dd6ab04e21962ac92cd634
$ git push -f origin master

Then proceed to create a new pull request with NEW-BRANCH-NAME as the source branch and close this one.

openjdk[bot] avatar Oct 15 '25 22:10 openjdk[bot]

@Arcane561 This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply issue a /touch or /keepalive command to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar Nov 13 '25 08:11 bridgekeeper[bot]

This one is not needed, as the block <annotationProcessors> above handles it by enumerating which annotation processor to run explicitly.

shipilev avatar Nov 13 '25 09:11 shipilev

Good day to you, Alexey. You may be right, but bootstrapping the test via

mvn archetype:generate \
  -DinteractiveMode=false \
  -DarchetypeGroupId=org.openjdk.jmh \
  -DarchetypeArtifactId=jmh-java-benchmark-archetype \
  -DgroupId=org.sample \
  -DartifactId=test \
  -Dversion=1.0

no longer works if you don't add it manually -proc:full in the created project. I saw how this was corrected in the discussion in the mailing list, but I tried to solve it first with a solution that was not the most beautiful.

Arcane561 avatar Nov 13 '25 11:11 Arcane561