I get the below distinctly unhelpful stack trace when calling configureSessionFactory. I am assuming it cant find the driver, but it's there (I can import them in the same code). I've tried both PostgreSQL and MySQL Is there a way of getting some more useful debug info out of it ?
Exception in thread "main" java.lang.NoClassDefFoundError: javax/transaction/SystemException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:270)
at org.jboss.logging.Logger$1.run(Logger.java:2252)
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.logging.Logger.getMessageLogger(Logger.java:2227)
at org.jboss.logging.Logger.getMessageLogger(Logger.java:2214)
at org.hibernate.cfg.Configuration.<clinit>(Configuration.java:173)
at ManageEmployee.configureSessionFactory(ManageEmployee.java:21)
at ManageEmployee.main(ManageEmployee.java:33)
Caused by: java.lang.ClassNotFoundException: javax.transaction.SystemException
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 9 more
A dependency is missing. If you are using Maven, you can add this to you pom.xml:
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
<version>1.1</version>
</dependency>
If you don't use Maven, you can include the necessary configuration for another build tool or download the jar from here:
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments