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

Upgrade for Spring Boot 2.0 #71

Closed
rvullriede opened this issue Mar 28, 2018 · 4 comments
Closed

Upgrade for Spring Boot 2.0 #71

rvullriede opened this issue Mar 28, 2018 · 4 comments

Comments

@rvullriede
Copy link

When trying to use the package with Spring Boot 2.0 I get the following exception:

Caused by: java.lang.IllegalStateException: Failed to introspect Class [it.ozimov.springboot.mail.templating.service.ThymeleafTemplateService] from ClassLoader [sun.misc.Launcher$AppClassLoader@18b4aac2]
	at org.springframework.util.ReflectionUtils.getDeclaredFields(ReflectionUtils.java:759) ~[spring-core-5.0.4.RELEASE.jar:5.0.4.RELEASE]
	at org.springframework.util.ReflectionUtils.doWithLocalFields(ReflectionUtils.java:691) ~[spring-core-5.0.4.RELEASE.jar:5.0.4.RELEASE]
	at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.buildPersistenceMetadata(PersistenceAnnotationBeanPostProcessor.java:410) ~[spring-orm-5.0.4.RELEASE.jar:5.0.4.RELEASE]
	at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findPersistenceMetadata(PersistenceAnnotationBeanPostProcessor.java:394) ~[spring-orm-5.0.4.RELEASE.jar:5.0.4.RELEASE]
	at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(PersistenceAnnotationBeanPostProcessor.java:332) ~[spring-orm-5.0.4.RELEASE.jar:5.0.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:1016) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
	... 20 common frames omitted
Caused by: java.lang.NoClassDefFoundError: Lorg/thymeleaf/spring4/SpringTemplateEngine;
	at java.lang.Class.getDeclaredFields0(Native Method) ~[na:1.8.0_144]
	at java.lang.Class.privateGetDeclaredFields(Class.java:2583) ~[na:1.8.0_144]
	at java.lang.Class.getDeclaredFields(Class.java:1916) ~[na:1.8.0_144]
	at org.springframework.util.ReflectionUtils.getDeclaredFields(ReflectionUtils.java:754) ~[spring-core-5.0.4.RELEASE.jar:5.0.4.RELEASE]
	... 26 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.thymeleaf.spring4.SpringTemplateEngine
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_144]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_144]
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335) ~[na:1.8.0_144]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_144]
	... 30 common frames omitted`

Seems like an issue with the reference to org.thymeleaf.spring4.SpringTemplateEngine since Spring Boot 2.0 uses Spring 5, specifically:

org.springframework.boot:spring-boot-starter-mail:2.0.0.RELEASE
org.springframework:spring-core:5.0.4.RELEASE
org.thymeleaf:thymeleaf:3.0.9.RELEASE
@robertotru
Copy link
Member

I know, it can't work. Current version has been built for Spring Boot 1.5.x. I must find some time to fix the code for Spring Boot 2.x.

@rvullriede
Copy link
Author

So why close it? Shouldn't it stay open until it is fixed?

@robertotru
Copy link
Member

It is not an issue for me, but a feature request.
This project has been designed to work with another major release of Spring Boot. Unfortunately 2.0.0 is a new major release of Spring Boot that is not backward compatible. I may decide to never upgrade, if I have no convenience. I actually have no specific interest in this project (since I have other major projects to work on), but I accept any contribution. It may happen that I will do it in one month or never.
Sorry for that.

@robertotru
Copy link
Member

This will be tacked in #72

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