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

Error when running test on a new project #678

moose56 opened this Issue Jun 2, 2018 · 3 comments


None yet
2 participants
Copy link

moose56 commented Jun 2, 2018


If I create a new project with the following command:

curl -d dependencies=web,jpa,devtools,h2 -d javaVersion 10 | tar -xzvf -

and open it and run the default tests I get the following error:

java.lang.IllegalStateException: Failed to load ApplicationContext

If I remove the h2 dependency from the pom.xml file I get some errors from Hibernate and the same error again.

If I remote the h2 and jpa dependencies then tests run as expected.

My question is to parts:

  1. What is need to fix this error and get the tests running when the h2 and jpa dependencies are included.

  2. Should that fix be included in the generated project so it runs out of the box?




This comment has been minimized.

Copy link

snicoll commented Jun 2, 2018

Thanks for getting in touch, but it feels like this is a question that would be better suited to Stack Overflow. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements.

You are using Java10 so there are things that have changed that you should be aware. The full stacktrace is

Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass( ~[na:na]
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass( ~[na:na]
	at java.base/java.lang.ClassLoader.loadClass( ~[na:na]
	... 53 common frames omitted

Please review this section of the Spring Boot wiki


This comment has been minimized.

Copy link

moose56 commented Jun 2, 2018

Thank you for that, it fixed my problem.

Do you think it would be a reasonable enhancement to the initializr app to include javax.xml.bind as a dependency if you have picked Java version 10 and jpa?

As a wider questions should javax.xml.bind be a dependency in spring boot data starter jpa?


This comment has been minimized.

Copy link

snicoll commented Jun 3, 2018

That's a question to be asked to the Hibernate team, I don't think it's reasonable for us to add that added complexity if they've decided that users have to use jaxb (or add the optional module) with Java9+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.