现在的情况是这样的

wind13
06-08-31 1 132

经过各种调试,现在的情况是这样的,好象就是建立Configuration的时候不正确,实在是不知道该怎么改了,报错如下:
22:29:44,562 INFO [ContainerDirector] <======== Jdon Framework started successfully! =========>
22:30:06,406 INFO [Environment] Hibernate 2.1.8
22:30:06,484 INFO [Environment] hibernate.properties not found
22:30:06,515 INFO [Environment] using CGLIB reflection optimizer
22:30:06,531 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling
22:30:06,609 INFO [Configuration] configuring from resource: /hibernate.cfg.xml
22:30:06,609 INFO [Configuration] Configuration resource: /hibernate.cfg.xml
22:30:06,687 WARN [Configuration] /hibernate.cfg.xml not found
22:30:29,515 ERROR [RegUserDaoHB] net.sf.hibernate.HibernateException: /hibernate.cfg.xml not found
22:30:30,250 ERROR [RegUserDaoHB] error:java.lang.NullPointerException
22:30:30,250 ERROR [RegUserServiceImp] createRegUser ok

hibernate.cfg.xml 确定是放在WEB-INF/classes 目录下面的,没什么问题,怎么会报找不到呢?

banq
2006-09-01 14:33

以后帖子贴到JF专门论坛去,才能得到及时回复
http://www.jdon.com/jive/forum.jsp?forum=61&thRange=30

在生成SessionFactory 时,指定配置位置
SessionFactory sf = = new Configuration("/hibernate.cfg.xml").configure().buildSessionFactory();