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

NoUniqueBeanDefinitionException with service extending PdfRenderingService in Grails 3 #34

Open
timbonicus opened this issue Jan 23, 2017 · 0 comments

Comments

@timbonicus
Copy link

timbonicus commented Jan 23, 2017

I have a project where we needed to override the pdfRenderingService behavior slightly, so we added a Grails service extending PdfRenderingService named "FixedPdfRenderingService". This causes an error on startup:

NoUniqueBeanDefinitionException: No qualifying bean of type 'grails.plugins.rendering.pdf.PdfRenderingService' available: expected single matching bean but found 2: renderingPdfRenderingService,fixedPdfRenderingService

It seems that in Grails 3.2.4, plugin service beans get prefixed by the plugin name, so "pdfRenderingService" from the rendering plugin becomes "renderingPdfRenderingService". I'm not sure if this is causing problems with @Autowire directly, or whether having two beans with this type causes a non-unique exception.

Should RenderingTrait specify rendering*Service instead? Is there a different way we should be overriding PdfRenderingService behavior?

@timbonicus timbonicus reopened this Jan 23, 2017
@timbonicus timbonicus changed the title NoUniqueBeanDefinitionException with similar service name in Grails 3 NoUniqueBeanDefinitionException with service extending PdfRenderingService in Grails 3 Jan 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant