org.springframework.beans.factory.BeanCreationException异常

来源:百度知道 编辑:UC知道 时间:2024/05/26 01:09:08
严重: action: null
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.SecurityException: class "org.apache.commons.collections.SequencedHashMap"'s signer information does not match signer information of other classes in the same package
Caused by: java.lang.SecurityException: class "org.apache.commons.collections.SequencedHashMap"'s signer information does not match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(Unknown Source)
at java.lang.ClassLoader.preDefineClass(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1

很遗憾,你截取的异常信息没什么用,后面的caused by:xxx那句才是最原始的错误,把那段截出来看看吧。
你这段异常只告诉人Spring在创建'sessionFactory' 的时候出错。
贴出caused by那段异常并说明你的Spring版本和Hibernate版本,和相关的配置文件,不然是解决不了这个问题的。

/WEB-INF/applicationContext.xml
看下在这个路径下面有applicationContext.xml没
然后检查下里面的代码
他报错是applicationContext.xml找到bean的配置

看看hibernate配置是否正确,是否是一对多配置错误,检查一下bean和hbm文件,是否只是配置了一端的关系?

把你的数据处理代码放到事务中,它提示没有会话,看看是不是hibernate延迟加载惹得祸。