为什么我在Application中测试好的hibernate放到web工程下就不能初始化了呢??????,

private static  Configuration cfg = null;
private static SessionFactory sessionfactoty = null;
// private static ThreadLocal threadlocal = null; static {
System.out.println("HibernateUnit");
cfg = new Configuration();
cfg.configure();
sessionfactoty = cfg.buildSessionFactory();
}异常:java.lang.NoClassDefFoundError: Could not initialize class com.nsf.shop.hibernate.HibernateUnit
com.nsf.shop.hibernate.dao.MemberDAOImpl.allMember(MemberDAOImpl.java:24)
com.nsf.shop.logic.Logic.isMember(Logic.java:13) 有没可能和struts开发不兼容,我用的是struts1.3和bibernate3.2.5,把全部的包都导进去了,请高手救救我吧,困扰了好几天了