java.lang.NoClassDefFoundError: net/sf/hibernate/collection/ODMGCollection
14:41:08,500 [net.sf.hibernate.cfg.Environment]-[INFO] hibernate.properties not found
[org.apache.struts.action.RequestProcessor]-[WARN] Unhandled Exception thrown: class org.springframework.beans.factory.BeanCreationException
[org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/bookstoressh].[action]]-[ERROR] Servlet.service() for servlet action threw exception
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory ' defined in class path resource [applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: net/sf/hibernate/collection/ODMGCollection
java.lang.NoClassDefFoundError: net/sf/hibernate/collection/ODMGCollection
上面是我从错误信息里复制的一部分,我的出错信息太大了,帖子发不了,各位高手帮帮小弟啊,我是用spring+struts+hibernata做毕业设计,刚刚学的。
------解决方案--------------------
hibernate.properties没找到,检查一下文件路径,所需的jar文件是否都放到lib目录下了。
------解决方案--------------------
java.lang.NoClassDefFoundError: net/sf/hibernate/collection/ODMGCollection
[net.sf.hibernate.cfg.Environment]-[INFO] hibernate.properties not found
这两句话告诉你了,需要用的类没找到,需要的属性文件也没找到,那么很可能你的jar包没放对位置