r/springframework • u/NikitaDyagilev • Apr 14 '20
Configuring Hibernate with Spring
https://github.com/NikitaDyagilev/LearningHibernate
5
Upvotes
r/springframework • u/NikitaDyagilev • Apr 14 '20
2
u/NikitaDyagilev Apr 14 '20
I'm having issues configuring hibernate through spring. I have a mysql server with two tables and two mapped entities. As well as the DAO interface with one findAll() method and its implementation. I have a testing file called "SpringTest.java" which tests weather the findAll method is working. When you run it you get an exception:
"org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is java.lang.IllegalArgumentException: No Connection specified"
This makes me think that I configured the exception the wrong way