You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
to build.gradle under dependencies. Some specific questions I have:
Do I also need to add this? I see some other plugins have it but I don't know what purpose it serves:
buildscript {
dependencies { // Not Published to Gradle Plugin Portal
classpath "org.grails.plugins:mail:4.0.1"
}
}
When running a fresh Grails 6 app I get this error:
2025-04-23 16:26:04.382 WARN --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'mailMessageBuilderFactory' defined in grails.plugins.mail.MailConfiguration: Unsatisfied dependency expressed through method 'mailMessageBuilderFactory' parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'mailMessageContentRenderer' defined in grails.plugins.mail.MailConfiguration: Unsatisfied dependency expressed through method 'mailMessageContentRenderer' parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.grails.gsp.GroovyPagesTemplateEngine' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
2025-04-23 16:26:04.423 INFO --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2025-04-23 16:26:04.436 INFO --- [ main] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2025-04-23 16:26:04.445 ERROR --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Parameter 0 of method mailMessageContentRenderer in grails.plugins.mail.MailConfiguration required a bean of type 'org.grails.gsp.GroovyPagesTemplateEngine' that could not be found.
Action:
Consider defining a bean of type 'org.grails.gsp.GroovyPagesTemplateEngine' in your configuration.
I'm not sure if that's the proper fix as I'm not very familiar with Grails so rather than relying on trial and error I would much prefer to have documentation.
Assuming that is the proper fix and that this plugin depends on org.grails.plugins:gsp, is it possible to add a dependency on that package to prevent the error altogether?
Thanks!
The text was updated successfully, but these errors were encountered:
Thank you @bmaupin! Good catch!
We need to add a runtime dependency on org.grails.plugins:gsp for the GroovyPagesTemplateEngine and GroovyPagesUriService beans to be registered.
I went through the documentation but I didn't see anything about how to actually set up this plugin. I added
dependencies { implementation "org.grails.plugins:mail:4.0.1" }
to build.gradle under dependencies. Some specific questions I have:
Do I also need to add this? I see some other plugins have it but I don't know what purpose it serves:
When running a fresh Grails 6 app I get this error:
I was able to fix it by adding this:
dependencies { implementation "org.grails.plugins:gsp" }
I'm not sure if that's the proper fix as I'm not very familiar with Grails so rather than relying on trial and error I would much prefer to have documentation.
Assuming that is the proper fix and that this plugin depends on
org.grails.plugins:gsp
, is it possible to add a dependency on that package to prevent the error altogether?Thanks!
The text was updated successfully, but these errors were encountered: