Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessi

Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [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

在网上找了半天答案,似乎都跟asm.jar有关

1.压根儿就缺少asm.jar包,可以通过添加Hibernate.jar来决绝

2.由于Spring中的“asm-2.2.3.jar”和Hibernate中的“asm.jar”包冲突。解决办法是移除Spring2.0 AOP Libraries中的“asm-2.2.3.jar”即可

posted on 2012-03-22 00:01  Morphin3  阅读(3194)  评论(0编辑  收藏  举报