第二章的Hibernate怎么调不通啊?出现下列错误!

05-04-25 hdhhb
我使用下列语句初始化

try {

// Create the SessionFactory

sessionFactory = new Configuration().configure().buildSessionFactory();

} catch (Throwable ex) {

// Make sure you log the exception, as it might be swallowed

//log.error("Initial SessionFactory creation failed.", ex);

throw new ExceptionInInitializerError(ex);

}

调试时出现一下错误。

java.lang.ExceptionInInitializerError

at hibernatetest.HibernateUtil.<clinit>(HibernateUtil.java:25)

总是sessionFactory初始化不成功!

猜你喜欢