Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple InterceptorRegistries when testing AOT module in micronaut-security #8581

Closed
timyates opened this issue Jan 6, 2023 · 1 comment
Assignees
Labels
type: bug Something isn't working

Comments

@timyates
Copy link
Member

timyates commented Jan 6, 2023

When we re-enable the AOT module for Micronaut Security (for Micronaut 4.0.0) and add the test back in, we get an error

micronaut-projects/micronaut-security#1193

Distributed Test Run :security-aot:test > Partition 1 in session 1 on localhost-executor-1 > OpenIdProviderMetadataFetcherCodeGeneratorSpec verify OpenIdProviderMetadataFetcherCodeGenerator generates OpenIdProviderMetadataFetcher per openid client FAILED

  io.micronaut.context.exceptions.BeanInstantiationException: Error instantiating bean of type  [io.micronaut.serde.support.DefaultSerdeIntrospections]

  Message: Multiple possible bean candidates found: [InterceptorRegistry, InterceptorRegistry]

https://ge.micronaut.io/s/osvthaiic6lti/console-log?task=:security-aot:test

I seem to recall this is caused by having two different versions of micronaut-aop on the test runtime classpath, however I cannot see that

https://ge.micronaut.io/s/osvthaiic6lti/dependencies?dependencies=aop&expandAll&toggled=W1syLDNdLFsyLDJdLFsyLDFdLFsyLDBdLFsxXSxbMF0sWzNdLFs0XSxbNV0sWzZdLFs3XSxbOF0sWzldLFsxMF0sWzExXSxbMTJdLFsxM10sWzE0XSxbMTVdLFsxNl0sWzE3XV0

Do you have any idea what's wrong?

As an aside, a way of showing where beans were created in the case there are multiple in error would be awesome 😉

@sdelamo
Copy link
Collaborator

sdelamo commented May 27, 2023

@timyates I think this is done. Closing it. Please reopen it if not.

@sdelamo sdelamo closed this as completed May 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
No open projects
Status: Done
Development

No branches or pull requests

4 participants