Scala: Unable to find the resource: /META-INF/BenchmarkList
See original GitHub issueidea ultimate 14.1.2 + scala plugin 1.4.15 + jmh plugin 1.0.1
I have an sbt project opened in IDEA. When I run one benchmark method or all methods in a class I get this 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:96)
at org.openjdk.jmh.runner.BenchmarkList.find(BenchmarkList.java:104)
at org.openjdk.jmh.runner.Runner.internalRun(Runner.java:250)
at org.openjdk.jmh.runner.Runner.run(Runner.java:202)
at org.openjdk.jmh.Main.main(Main.java:69)
Issue Analytics
- State:
- Created 8 years ago
- Reactions:21
- Comments:23 (3 by maintainers)
Top Results From Across the Web
JMH Unable to find the resource: /META-INF/BenchmarkList
Finally found it out. There was a problem with missing exec-maven-plugin plugin <plugin> <groupId>org.codehaus.mojo</groupId> ...
Read more >ktoso/sbt-jmh - Gitter
I am trying to run jmh Runner from a Main but I am getting the following error: ERROR: Unable to find the resource:...
Read more >Unable to find the resource: /META-INF/BenchmarkList - Eclipse
Exception in thread "main" java.lang.RuntimeException: ERROR: Unable to find the resource: /META-INF/BenchmarkList at org.openjdk.jmh.runner ...
Read more >Annotation processor is not picked up any more after module ...
Annotation processor is not picked up any more after module-info. java is added : IDEA-278667.
Read more >ERROR: Unable to find the resource: /META-INF/BenchmarkList
ERROR: Unable to find the resource: /META-INF/BenchmarkList. 我是想着用benchmark 测试项目的。使用的是jmh,gradle 做为构建工具。在run 的时候,报 ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi!
Do you have
org.openjdk.jmh:jmh-generator-annprocess
on your classpath? If yes, is annotation processing enabled in your IDE? You can find the checkbox underPreferences -> Build, Execution, Deployment -> Compiler -> Annotation Processors
The solution for me was to use
testAnnotationProcessor
in Gradle 6 build.gradle:instead of
Mind that my setup is a bit non-standard - I run JMH from JUnit. Still, this solved missing BenchmarkList problem.
Also I don’t use jmh-gradle-plugin, only those two dependencies from above are enough to integrate JMH to JUnit.