欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

org.springframework.beans.BeanInstantiationException: Could not instantiate bean BeanJavaWebXMLORM 

程序员文章站 2022-06-12 09:54:17
...
2010-11-3 15:23:24 org.apache.catalina.core.StandardContext listenerStart
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.orm.hibernate3.LocalSessionFactoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/dom4j/DocumentException
Caused by: java.lang.NoClassDefFoundError: org/dom4j/DocumentException


是比如,在
<hibernate-configuration>
<session-factory>
	<mapping
		resource="com/myProject/hbm/test.hbm.xml" />
</session-factory>

</hibernate-configuration>

定义了映射test.hbm.xml,但是找不到test.java。
才出现了上面的错误。