Could not open JPA EntityManager for transaction in spring
问题 I am building a testing application with JPA Hibernate 4.1.7 and Spring 3.1.3 on top. I am getting a NPE at jta causing JPA EntityManager to fail, here is the stack trace DEBUG TestContext - Retrieved ApplicationContext for test class [class cvut.dp.foodtables.service.FoodServiceImplTest] from cache with key [[MergedContextConfiguration@61cc1457 testClass = FoodServiceImplTest, locations = '{classpath:/WEB-INF/context/applicationContext.xml}', classes = '{}', activeProfiles = '{}',