Details
-
Bug
-
Resolution: Fixed
-
Neutral
-
None
-
None
-
-
Empty show more show less
-
DevX 8
-
1
Description
Steps to reproduce
- Create a new Blossom module from the Maven archetype
- Set it to use the XML configuration instead of the Java one (default)
- Initialize the Magnolia instance
Expected results
Module can be loaded and installed without issues.
Actual results
Errors appear when trying to initialize Blossom:
022-01-19 13:28:49,417 INFO lia.module.blossom.render.BlossomDispatcherServlet: Initializing Servlet 'blossom' 2022-01-19 13:28:50,590 WARN ework.web.context.support.XmlWebApplicationContext: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'info.magnolia.module.blossom.view.TemplateViewResolver#0' defined in class path resource [blossom-servlet.xml]: Cannot create inner bean 'info.magnolia.module.blossom.view.FreemarkerTemplateViewRenderer#54193a3f' of type [info.magnolia.module.blossom.view.FreemarkerTemplateViewRenderer] while setting bean property 'viewRenderer'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'info.magnolia.module.blossom.view.FreemarkerTemplateViewRenderer#54193a3f' defined in class path resource [blossom-servlet.xml]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'info.magnolia.freemarker.FreemarkerHelper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {} 2022-01-19 13:28:50,591 ERROR lia.module.blossom.render.BlossomDispatcherServlet: Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'info.magnolia.module.blossom.view.TemplateViewResolver#0' defined in class path resource [blossom-servlet.xml]: Cannot create inner bean 'info.magnolia.module.blossom.view.FreemarkerTemplateViewRenderer#54193a3f' of type [info.magnolia.module.blossom.view.FreemarkerTemplateViewRenderer] while setting bean property 'viewRenderer'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'info.magnolia.module.blossom.view.FreemarkerTemplateViewRenderer#54193a3f' defined in class path resource [blossom-servlet.xml]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'info.magnolia.freemarker.FreemarkerHelper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
Workaround
This can be solved by manually changing the following bean
info.magnolia.module.blossom.view.FreemarkerTemplateViewRenderer
to the one mentioned on the 3.4.0 changes:
FreemarkerTemplateViewRendererFactoryBean
Once changed, the module can be installed without issues.
Development notes
Checklists
Acceptance criteria