我用的hibernate.properties配置的
具体内容如下hibernate.dialect= net.sf.hibernate.dialect.OracleDialecthibernate.connection.driver_class= oracle.jdbc.driver.OracleDriver
hibernate.connection.username =scott
hibernate.connection.password =tiger
hibernate.connection.url =jdbc:oracle:thin:@localhost:1521:ORAC

解决方案 »

  1.   

    问题解决,和大家初学者分享下吧 。我用的structs框架,所有的类和映射文件都放在src下的org.db包下,我一开始把hibernate.properties也放在该包下,所以报错,后来我把hibernate.properties放到了src下就好了,我个人觉得初学者只看书的话一开始配置都会不知道把类文件,hibernate.properties,和映射文件放到哪。