我从命令promt执行我的jar文件时遇到错误..但在eclipse运行我的程序时工作正常..没有得到这个错误的确切原因我已经尝试了很多方法我来自谷歌...
SessionFactory creation failedjava.lang.NoClassDefFoundError: org/hibernate/cfg/
Configuration
Exception in thread "main" java.lang.ExceptionInInitializerError
at com.valto.RetentionMain.HibernateUtil.<clinit>(HibernateUtil.java:26)
at com.valto.RetentionDao.RetentionDao.getNotificationDays(RetentionDao.
java:48)
at com.valto.RetentionMain.RetentionMainClass.cronTask(RetentionMainClas
s.java:19)
at com.valto.RetentionMain.RetentionMainClass.main(RetentionMainClass.ja
va:97)
Caused by: java.lang.NoClassDefFoundError: org/hibernate/cfg/Configuration
at com.valto.RetentionMain.HibernateUtil.<clinit>(HibernateUtil.java:18)
... 3 more
Caused by: java.lang.ClassNotFoundException: org.hibernate.cfg.Configuration
at java.net.URLClassLoader$1.run(Unknown Source)
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)