Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java

Weird runtime-error after configuring hibernate & H2 in Spring

I have my Spring-hibernate project with almost identical setup to the Giflib project.

repo: https://github.com/obpFin/Sportify

When hibernate&h2 should be up and going I get this error:

Exception in thread "main" java.lang.IllegalStateException: Could not evaluate condition on org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration#transactionManager due to internal class not found. This can happen if you are @ComponentScanning a springframework package (e.g. if you put a @ComponentScan in the default package by mistake)

Any idea where the error comes from?

1 Answer

Looks to me from this post:

https://github.com/spring-projects/spring-boot/issues/2221

That your dependencies somehow mixed up.

I was not able to reproduce error.

Before diving into development with Spring, I'd suggest you finish Java Web Dev Track.

This project is pretty outdated. Database interaction is best to be changed with Spring-Data, see for example

'Spring Unit Testing' courses and 'User Authentication' courses, and especially, just look at the repositories itself created by Craig and Chris.

Also try to keep Spring boot up-to-date 1.3.3. is very old for now. any version of 1.4 has a ton of new functionality.

Thanks for your answer Alexander! yes after pulling a few hair out I found out the problem was in the dependencies configuration. I realized as well that I have to finish at least the User Authentication -course before proceeding with the project.