大家帮个忙啊,急,hibernate报错,在线等
Exception in thread "main "
java.lang.NoClassDefFoundError: net/sf/ehcache/CacheException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
at java.lang.Class.getConstructor0(Class.java:2671)
at java.lang.Class.newInstance0(Class.java:321)
at java.lang.Class.newInstance(Class.java:303)
at org.hibernate.cfg.SettingsFactory.createCacheProvider(SettingsFactory.java:323)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:219)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1463)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1004)
at com.accp.HibernateSessionFactory.currentSession(HibernateSessionFactory.java:48)
at com.accp.Ceshi.main(Ceshi.java:11)
------解决方案--------------------少ehcache的包
------解决方案--------------------很想帮你,但是不懂hibernate啊
你看看报错的那些行有啥问题
at com.accp.Ceshi.main(Ceshi.java:11)
------解决方案--------------------很明显是classpath问题
------解决方案--------------------环境变量配错了吧