Solution
Add "jta.jar" to classpath
log4j:WARN No appenders could be
found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the
log4j system properly.
Exception in thread
"main" java.lang.NoClassDefFoundError:
javax/transaction/Synchronization
at
org.hibernate.impl.SessionImpl.<init>(SessionImpl.java:213)
at
org.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:473)
at
org.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:497)
at
org.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:505)
at
App.main(App.java:14)
Caused by: java.lang.ClassNotFoundException:
javax.transaction.Synchronization
at
java.net.URLClassLoader$1.run(Unknown Source)
at
java.security.AccessController.doPrivileged(Native
Method)
at
java.net.URLClassLoader.findClass(Unknown Source)
at
java.lang.ClassLoader.loadClass(Unknown Source)
at
sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at
java.lang.ClassLoader.loadClass(Unknown Source)
...
5 more
Solution
Add "jta.jar" to classpath
No comments:
Post a Comment