Please follow the instructions on JMH page to set up the benchmark project, namely:
"Make sure you tried these things before getting support: - Archetypes provide the golden build configuration. Try to generate the clean JMH benchmark project and transplant the benchmark there. This is important to try when upgrading to the newer JMH versions, since the minute differences in the build configurations may attribute to the failures you are seeing."
If you'd follow that, you will notice that you also need to add jmh-generator-annprocess as the dependency, and make sure it runs before you run any test.