In JPA or Hibernate development, it hits the following error message :

Caused by: java.lang.ClassNotFoundException: javax.transaction.TransactionManager
at$ Source)
at Method)
at Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
… 23 more


The javax.transaction.TransactionManager is a class inside the J2EE SDK library “javaee.jar“, you are missing this jar file in your project classpath.


You can always get the javaee.jar from Download and install the SDK in your computer, the javaee.jar can be found in the “\J2EE_SDK_FOLDER\lib” folder. For example,


Get the javaee.jar file and include it in your project classpath.

2. Java.Net Repository

Alternatively, you can get the “javaee.jar” from the Maven

    <!-- Javaee API -->
The downloaded javaee.jar is not contains any method bodies, see this “how to get javaee.jar from Maven” article for detail.