Gradlew run Error: Multiple possible bean candidates found

I’ve been trying to troubleshoot this issue on my MacBook Pro with Monterey Version 12.3.1(21E258). From my command prompt I’m running ./gradlew run and getting the error:

./gradlew run
Starting a Gradle Daemon (subsequent builds will be faster)

> Task :run
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/<redacted>/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-classic/1.2.10/f69d97ef3335c6ab82fc21dfb77ac613f90c1221/logback-classic-1.2.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/<redacted>/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-simple/1.7.29/82ae07f95088577987a15d90171de12b00d81847/slf4j-simple-1.7.29.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
 __  __ _                                  _
|  \/  (_) ___ _ __ ___  _ __   __ _ _   _| |_
| |\/| | |/ __| '__/ _ \| '_ \ / _` | | | | __|
| |  | | | (__| | | (_) | | | | (_| | |_| | |_
|_|  |_|_|\___|_|  \___/|_| |_|\__,_|\__,_|\__|
  Micronaut (v3.3.4)

09:54:16.343 [main] INFO  i.m.context.env.DefaultEnvironment - Established active environments: [dev]
09:54:16.641 [main] ERROR io.micronaut.runtime.Micronaut - Error starting Micronaut server: Error instantiating bean of type [$ApplicationEventListener$onStartup1$Intercepted]: Multiple possible bean candidates found: [io.micronaut.aop.InterceptorRegistry, io.micronaut.aop.InterceptorRegistry]
io.micronaut.context.exceptions.BeanInstantiationException: Error instantiating bean of type [$ApplicationEventListener$onStartup1$Intercepted]: Multiple possible bean candidates found: [io.micronaut.aop.InterceptorRegistry, io.micronaut.aop.InterceptorRegistry]
        at io.micronaut.context.DefaultBeanContext.doCreateBean(
        at io.micronaut.context.DefaultBeanContext.addCandidateToList(
        at io.micronaut.context.DefaultBeanContext.getBeanRegistrations(
        at io.micronaut.context.DefaultBeanContext.getBeansOfType(
        at io.micronaut.context.event.ApplicationEventPublisherFactory$2.lambda$$0(
        at io.micronaut.core.util.SupplierUtil$2.initialize(
        at io.micronaut.core.util.SupplierUtil$2.get(
        at io.micronaut.context.event.ApplicationEventPublisherFactory$2.publishEvent(
        at io.micronaut.context.DefaultBeanContext.publishEvent(
        at io.micronaut.context.DefaultBeanContext.start(
        at io.micronaut.context.DefaultApplicationContext.start(
        at io.micronaut.runtime.Micronaut.start(
        at io.funraise.Application.main(
Caused by: io.micronaut.context.exceptions.NonUniqueBeanException: Multiple possible bean candidates found: [io.micronaut.aop.InterceptorRegistry, io.micronaut.aop.InterceptorRegistry]
        at io.micronaut.context.DefaultBeanContext.findConcreteCandidate(
        at io.micronaut.context.DefaultApplicationContext.findConcreteCandidate(
        at io.micronaut.context.DefaultBeanContext.lastChanceResolve(
        at io.micronaut.context.DefaultBeanContext.findConcreteCandidateNoCache(
        at io.micronaut.context.DefaultBeanContext.findConcreteCandidate(
        at io.micronaut.context.DefaultBeanContext.getBeanInternal(
        at io.micronaut.context.DefaultBeanContext.getBean(
        at io.micronaut.aop.chain.InterceptorChain.resolveInterceptors(
        at io.micronaut.aop.chain.InterceptorChain.resolveIntroductionInterceptors(
        at$ApplicationEventListener$onStartup1$Intercepted.<init>(Unknown Source)
        at$Worker$ApplicationEventListener$onStartup1$Intercepted$ Source)
        at io.micronaut.context.DefaultBeanContext.doCreateBean(
        ... 12 common frames omitted

> Task :run FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':run'.
> Process 'command '/Users/<redacted>/.asdf/installs/java/adoptopenjdk-11.0.10+9/bin/java'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.


I’ve removed my user folder name from the above error message.

I’ve run this command previously but now it’s throwing an error. I’m not sure what changed.
Here’s some information concerning my java version

java --version
openjdk 11.0.10 2021-01-19
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.10+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.10+9, mixed mode)
javac --version
javac 11.0.10

The exact same code and setup works on a linux box but not the Mac. I’ve tried uninstalling and re-installing java. I’ve tried to clean and then run. I’ve tried ./gradlew --no-build-cache run and ./gradlew build --refresh-dependencies.
Any more ideas on how to troubleshoot this?

Ask the Micronaut community?

aw, my bad. I don’t know why I was thinking it was gradle related. I’ve been just so frustrated with this issue. Thanks for pointing out the obvious when I didn’t notice it.

If anyone is searching here for the solution. You can follow things on the Micronaut discussion: Error: Multiple possible bean candidates found · Discussion #7249 · micronaut-projects/micronaut-core · GitHub