Org.hibernate.HibernateException: createQuery is not valid without active transaction
Following this question , I am trying to add Hibernate 4.3.8.Final to Spring 4.1.5.RELEASE; but - The code throws an exception as following and at times throws - an exception that it cannot find entity class of hibernate (com.myproject.model.MyTable) although the class exists and is located in com.myproject.model package. StackTrace org.hibernate.HibernateException: createQuery is not valid without active transaction at org.hibernate.context.internal.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:352) at com.sun.proxy.$Proxy40.createQuery(Unknown