初学者请教几个Hibernate的问题

04-05-14 dancewing
小弟最近在看hibernate,有2个问题想请教一下

1。配置文件hibernate.cfg.xml和hibernate.properties只需要一个就行了

2。配置好datasouce后,写了一个类测试

运行时,在HibernateUtil.currentSession()出现

java.lang.ExceptionInInitializerError

下面是tomcat命令提示符下的输出

信息: JNDI InitialContext properties:{}
2004-5-14 19:46:00 net.sf.hibernate.connection.DatasourceConnectionProvider conf
igure
信息: Using datasource: java:comp/env/jdbc/maths
2004-5-14 19:46:00 net.sf.hibernate.transaction.TransactionManagerLookupFactory
getTransactionManagerLookup
信息: No TransactionManagerLookup configured (in JTA environment, use of process
 level read-write cache is not recommended)
2004-5-14 19:46:00 net.sf.hibernate.cfg.SettingsFactory buildSettings
信息: Use scrollable result sets: true
2004-5-14 19:46:00 net.sf.hibernate.cfg.SettingsFactory buildSettings
信息: Use JDBC3 getGeneratedKeys(): true
2004-5-14 19:46:00 net.sf.hibernate.cfg.SettingsFactory buildSettings
信息: Optimize cache for minimal puts: false
2004-5-14 19:46:00 net.sf.hibernate.cfg.SettingsFactory buildSettings
信息: Query language substitutions: {}
2004-5-14 19:46:00 net.sf.hibernate.cfg.SettingsFactory buildSettings
信息: cache provider: net.sf.ehcache.hibernate.Provider

请问哪里出问题了,3x

猜你喜欢