org.springframework.beans.BeanInstantiationException
2011年08月01日
严重: Context initialization failed
org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'sessionFactory' defined in file [E:\Develop\apache-tomcat-6.2\webapps\Paging\WEB-INF\classes\applicationContext-common.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationExcepti on: Could not instantiate bean class [org.springframework.orm.hibernate3.LocalSessionFa ctoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/dom4j/DocumentException
Caused by: org.springframework.beans.BeanInstantiationExcepti on: Could not instantiate bean class [org.springframework.orm.hibernate3.LocalSessionFa ctoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/dom4j/DocumentException
Caused by: java.lang.NoClassDefFoundError: org/dom4j/DocumentException 解决方法:将dom4j-1.6.1.jar拷贝到lib目录下重新编译。
2011年08月01日
严重: Context initialization failed
org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'sessionFactory' defined in file [E:\Develop\apache-tomcat-6.2\webapps\Paging\WEB-INF\classes\applicationContext-common.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationExcepti on: Could not instantiate bean class [org.springframework.orm.hibernate3.LocalSessionFa ctoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/dom4j/DocumentException
Caused by: org.springframework.beans.BeanInstantiationExcepti on: Could not instantiate bean class [org.springframework.orm.hibernate3.LocalSessionFa ctoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/dom4j/DocumentException
Caused by: java.lang.NoClassDefFoundError: org/dom4j/DocumentException 解决方法:将dom4j-1.6.1.jar拷贝到lib目录下重新编译。
本文详细介绍了在使用Spring框架和Dom4j库时遇到的初始化失败问题,并提供了通过将Dom4j-1.6.1.jar文件复制到lib目录下重新编译来解决问题的方法。此解决方案适用于遇到类似类加载错误和NoClassDefFoundError异常的情况。
2196

被折叠的 条评论
为什么被折叠?



