I have put hibernate.cfg.xml into WEB-INF/classes, after deployed to RESIN-3.0.10, the following code reported "can not find hibernate.cfg.xml" ?
Code:
public class HibernateUtil
{
static
{
try {
sessionFactory = new Configuration().configure().buildSessionFactory();
} catch (Throwable ex) {
throw new ExceptionInInitializerError(ex);
}
}
...
}
......
net.sf.hibernate.HibernateException: /hibernate.cfg.xml not found
at net.sf.hibernate.cfg.Configuration.getConfigurationInputStream(Ljava.lang.String;)Ljava.io.InputStream;(Configuration.java:872)
at net.sf.hibernate.cfg.Configuration.configure(Ljava.lang.String;)Lnet.sf.hibernate.cfg.Configuration;(Configuration.java:896)
at net.sf.hibernate.cfg.Configuration.configure()Lnet.sf.hibernate.cfg.Configuration;(Configuration.java:883)
at com.zsoft.util.HibernateUtil.<clinit>()V(HibernateUtil.java:14)
at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source)
at jrockit.vm.RNI.trampoline()V(Unknown Source)
Best Regards!