奇怪的问题啊,我明明配置了connection pool 在servlet.xml啊,我把cat.hbm.xml的JDNI屏蔽了,难道是这里出错? 出错信息:
he user must supply a JDBC connection
at net.sf.hibernate.connection.UserSuppliedConnectionProvider.getConnection(UserSuppliedConnectionProvider.java:31)
at net.sf.hibernate.impl.SessionFactoryImpl.openConnectionSessionFactoryImpl.java:402)
at net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:2751)
<p class="indent">
michael_xu
2004-12-03 10:13
问题的原因是Configuration cfg = new Configuration()sessionFactory = cfg.buildSessionFactory();没有找到你的配置文件 hibernate.properties或hibernate.cfg.xml.你必须在classpath中强制设定文件的存放路径。