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

Configuration failing with spring-boot-thymeleaf-email #77

Closed
Mithradatha opened this issue Aug 29, 2018 · 2 comments
Closed

Configuration failing with spring-boot-thymeleaf-email #77

Mithradatha opened this issue Aug 29, 2018 · 2 comments

Comments

@Mithradatha
Copy link

Note

Everything, outside of Thymeleaf templating, works find using spring-boot-email-core.
Startup fails when using spring-boot-thymeleaf-email.

@EnableAsync
@EnableCaching
@EnableEmailTools
@SpringBootApplication
public class Proj {}

Exception:

2018-08-29 10:03:02.568 WARN 17040 --- [ost-startStop-1] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'thymeleafTemplateService' defined in URL [jar:file:/C:/Projects/STS/Workspace1/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/Proj/WEB-INF/lib/spring-boot-thymeleaf-email-0.6.3.jar!/it/ozimov/springboot/mail/templating/service/ThymeleafTemplateService.class]: Post-processing of merged bean definition failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [it.ozimov.springboot.mail.templating.service.ThymeleafTemplateService] from ClassLoader [ParallelWebappClassLoader
context: Proj
delegate: false
----------> Parent Classloader:
java.net.URLClassLoader@baf30c
]

[Relevant] Pom.xml:

<parent>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-starter-parent</artifactId>
	<version>2.0.2.RELEASE</version>
	<relativePath />
</parent>
<dependency>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-starter-mail</artifactId>
</dependency>
<dependency>
	<groupId>it.ozimov</groupId>
	<artifactId>spring-boot-thymeleaf-email</artifactId>
	<version>0.6.3</version>
</dependency>
<dependency>
	<groupId>org.thymeleaf.extras</groupId>
	<artifactId>thymeleaf-extras-springsecurity4</artifactId>
</dependency>
<dependency>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
	<groupId>net.sourceforge.nekohtml</groupId>
	<artifactId>nekohtml</artifactId>
</dependency>
<dependency>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
	<groupId>nz.net.ultraq.thymeleaf</groupId>
	<artifactId>thymeleaf-layout-dialect</artifactId>
</dependency>

[Relevant] Properties:

spring.mail.host=[email protected]
spring.mail.scheduler.persistence.enabled=false
spring.mail.scheduler.persistence.redis.embedded=false
spring.mail.scheduler.persistence.redis.enabled=false

spring.thymeleaf.mode=HTML
spring.thymeleaf.cache=false

@Mithradatha
Copy link
Author

Is this an issue with Spring boot 2.0 compatibility? If so, is there a way to make it work or should I abandon all hope?

@robertotru
Copy link
Member

There is an open migration towards SpringBoot2. It is referred into issue #72.

Unfortunately I still have a couple of tests failing and not so much time to spend on this. You can pickup the branch and try to fix them. The branch is here: https://github.com/ozimov/spring-boot-email-tools/tree/feature/move-to-spring-boot-2.0.x

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

2 participants