So after a big refactoring project, I am left with this exception and am unsure as how to correct it. It\'s dealing with some code that I did not write and I am unfamiliar w
The problem is your configuration. You have hibernate configured for JTA.
Whereas you are using local transactions instead of distributed transactions.
at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:380)
You have 2 possible solutions
JpaTransactionManager
and replace it with a JTA transaction managerhibernate.transaction.manager_lookup_class
from the hibernate settings.If you don't really need distributed transactions option 2 is the easiest, if you need distributed transactions simply adding
will setup a proper JTA tx manager for your environment. Remove the definition for the JpaTransactionManager
.
Update:
Your configuration is flawed in 2 ways.
and JpaTransactionManager
which one do you want to use? At the moment the latter is overriding the first one.Create 2 seperate configurations one for local testing and one for production using JTA en JNDI lookups. (Preferable your testing code only overrides the beans necessary).