解决方法:
项目中添加jta.jar 解决。
异常代码:
java.lang.NoClassDefFoundError: javax/transaction/Synchronization org.hibernate.impl.SessionImpl.<init>(SessionImpl.java:212) org.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:437) org.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:461) org.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:469)