是在启动tomcat时抛的错误 错误信息:action: null
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.SecurityException: class "org.apache.commons.collections.LRUMap"'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.LRUMap"'s signer information does not match signer information of other classes in the same packagespring 配置:
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="configLocation"
value="classpath:hibernate.cfg.xml">
</property>
</bean>hibernate 配置:
<session-factory>
<property name="connection.username">root</property>
<property name="connection.url">
jdbc:mysql://localhost:3306/webexe
</property>
<property name="dialect">
org.hibernate.dialect.MySQLDialect
</property>
<property name="myeclipse.connection.profile">sql</property>
<property name="connection.driver_class">
com.mysql.jdbc.Driver
</property>
<mapping resource="_config/education/hbm/EDepArtment.hbm.xml" />
<mapping resource="_config/education/hbm/EDepEmp.hbm.xml" />
<mapping resource="_config/education/hbm/EDepJob.hbm.xml" />
<mapping resource="_config/education/hbm/EDepLoginfo.hbm.xml" />
<mapping resource="_config/education/hbm/EExamBasic.hbm.xml" />
<mapping resource="_config/education/hbm/EExamSubject.hbm.xml" />
<mapping resource="_config/education/hbm/ENews.hbm.xml" />
<mapping resource="_config/education/hbm/ESchool.hbm.xml" />
<mapping resource="_config/education/hbm/ESchoolClassinfo.hbm.xml" />
<mapping resource="_config/education/hbm/ESchoolClasskind.hbm.xml" />
<mapping resource="_config/education/hbm/ESchoolGrade.hbm.xml" />
<mapping resource="_config/education/hbm/ESchoolImport.hbm.xml" />
<mapping resource="_config/education/hbm/ESchoolKind.hbm.xml" />
<mapping resource="_config/education/hbm/EStudentDefaulter.hbm.xml" />
<mapping resource="_config/education/hbm/EStudentEvent.hbm.xml" />
<mapping resource="_config/education/hbm/EStudentHonor.hbm.xml" />
<mapping resource="_config/education/hbm/EStudentInfo.hbm.xml" />
<mapping resource="_config/education/hbm/EStudentKind.hbm.xml" />
<mapping resource="_config/education/hbm/EStudentState.hbm.xml" />
<mapping resource="_config/education/hbm/EStuMark.hbm.xml" />
<mapping resource="_config/education/hbm/ETeach.hbm.xml" />
<mapping resource="_config/education/hbm/ETeacherAptitude.hbm.xml" />
<mapping resource="_config/education/hbm/ETeacherBasic.hbm.xml" />
<mapping resource="_config/education/hbm/ETeacherFile.hbm.xml" />
<mapping resource="_config/education/hbm/ETeacherGlory.hbm.xml" />
<mapping resource="_config/education/hbm/ETeacherState.hbm.xml" />
</session-factory>
里面的路径是没问题的望高手指点
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.SecurityException: class "org.apache.commons.collections.LRUMap"'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.LRUMap"'s signer information does not match signer information of other classes in the same packagespring 配置:
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="configLocation"
value="classpath:hibernate.cfg.xml">
</property>
</bean>hibernate 配置:
<session-factory>
<property name="connection.username">root</property>
<property name="connection.url">
jdbc:mysql://localhost:3306/webexe
</property>
<property name="dialect">
org.hibernate.dialect.MySQLDialect
</property>
<property name="myeclipse.connection.profile">sql</property>
<property name="connection.driver_class">
com.mysql.jdbc.Driver
</property>
<mapping resource="_config/education/hbm/EDepArtment.hbm.xml" />
<mapping resource="_config/education/hbm/EDepEmp.hbm.xml" />
<mapping resource="_config/education/hbm/EDepJob.hbm.xml" />
<mapping resource="_config/education/hbm/EDepLoginfo.hbm.xml" />
<mapping resource="_config/education/hbm/EExamBasic.hbm.xml" />
<mapping resource="_config/education/hbm/EExamSubject.hbm.xml" />
<mapping resource="_config/education/hbm/ENews.hbm.xml" />
<mapping resource="_config/education/hbm/ESchool.hbm.xml" />
<mapping resource="_config/education/hbm/ESchoolClassinfo.hbm.xml" />
<mapping resource="_config/education/hbm/ESchoolClasskind.hbm.xml" />
<mapping resource="_config/education/hbm/ESchoolGrade.hbm.xml" />
<mapping resource="_config/education/hbm/ESchoolImport.hbm.xml" />
<mapping resource="_config/education/hbm/ESchoolKind.hbm.xml" />
<mapping resource="_config/education/hbm/EStudentDefaulter.hbm.xml" />
<mapping resource="_config/education/hbm/EStudentEvent.hbm.xml" />
<mapping resource="_config/education/hbm/EStudentHonor.hbm.xml" />
<mapping resource="_config/education/hbm/EStudentInfo.hbm.xml" />
<mapping resource="_config/education/hbm/EStudentKind.hbm.xml" />
<mapping resource="_config/education/hbm/EStudentState.hbm.xml" />
<mapping resource="_config/education/hbm/EStuMark.hbm.xml" />
<mapping resource="_config/education/hbm/ETeach.hbm.xml" />
<mapping resource="_config/education/hbm/ETeacherAptitude.hbm.xml" />
<mapping resource="_config/education/hbm/ETeacherBasic.hbm.xml" />
<mapping resource="_config/education/hbm/ETeacherFile.hbm.xml" />
<mapping resource="_config/education/hbm/ETeacherGlory.hbm.xml" />
<mapping resource="_config/education/hbm/ETeacherState.hbm.xml" />
</session-factory>
里面的路径是没问题的望高手指点
解决方案 »
- j2ee 如何实现视频边缓存边播放。。求详细的代码和指导
- 请问java如何读取邮箱图片呢。
- 关于java写webservice+前台C#(window)模式
- 这样的分段数据该怎样写到数据库中呢?
- struts验证框不能进行验证
- 求教高手的hibernate的查询问题
- 我想在服务器端和客户端效验数据的提交,而只使用一个配置文件,各位给下参考意见。
- 如何将我用<input type=file>组件选择的文件上传到我在程序中指定的FTP服务器?
- lucene 如何进行模糊匹配过滤
- 在windows2003server中安装Tomcat5.0.18不成功!
- htmlparser爬虫 只能爬取到部份网页内容
- 【求救】基于SSH框架的文件上传下载 启动服务报错
<!-- c3p0 datasource -->
<bean id="configBean"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath:config/initspring.properties</value>
</list>
</property>
</bean>
<bean id="dataSource"
class="com.mchange.v2.c3p0.ComboPooledDataSource"
destroy-method="close">
<property name="driverClass" value="${jdbc.driverClass}" />
<property name="jdbcUrl" value="${jdbc.jdbcUrl}" />
<property name="user" value="${jdbc.user}" />
<property name="password" value="${jdbc.password}" />
<property name="initialPoolSize"
value="${c3p0.initialPoolSize}" />
<property name="minPoolSize" value="${c3p0.minPoolSize}" />
<property name="maxPoolSize" value="${c3p0.maxPoolSize}" />
<property name="maxIdleTime" value="${c3p0.maxIdleTime}" />
<property name="acquireIncrement"
value="${c3p0.acquireIncrement}" />
<property name="idleConnectionTestPeriod"
value="${c3p0.idleConnectionTestPeriod}" />
</bean>
<!-- hibernate session factory -->
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref local="dataSource" />
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
${hibernate.dialect}
</prop>
<prop key="hibernate.show_sql">
${hibernate.show_sql}
</prop>
<prop key="hibernate.connection.autocommit">
${hibernate.connection.autocommit}
</prop>
<prop key="hibernate.current_session_context_class">
${hibernate.current_session_context_class}
</prop>
</props>
</property>
<!-- hbm 文件列表 -->
<property name="mappingResources">
<list>
<value>yilian/persistents/AgencyRoles.hbm.xml</value>
<value>yilian/persistents/SysManageModule.hbm.xml</value>
</list>
</property>
</bean>
<bean id="sessionFactory" class="cn.sh.cares.framework.spring.ExtensionAnnotationSessionFactoryBean">
<property name="dataSource" ref="dataSourceAfds" />
<property name="annotatedClassesLocations">
<list>
<value>classpath*:com/cea/afds/vo/**/*.class</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">cn.sh.cares.framework.dao.hibernate.OracleExtensionDialect</prop>
<prop key="hibernate.format_sql">true</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.use_sql_comments">false</prop>
<prop key="hibernate.max_fetch_depth">3</prop>
<prop key="hibernate.cache.use_query_cache">false</prop>
<prop key="hibernate.cache.use_second_level_cache">false</prop>
<prop key="hibernate.jdbc.batch_size">20</prop>
<prop key="hibernate.jdbc.fetch_size">20</prop>
</props>
</property>
</bean>你参考一下
1、严重: action: null
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V
解决方案:
asm-2.2.3.jar
asm-commons-2.2.3.jar
asm-util-2.2.3.jar
cglib-nodep-2.1_3.jar
这几个包删掉就好了2、严重: 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 packageCaused 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
解决方案:
方法一、把WEB-INF下的commons-collections-X.X.X删除,替换成commons-collections-3.2.1或以上版本。commons-collections-3.2.1.jar下载地址:http://apache.freelamp.com/commons/collections/binaries/commons-collections-3.2.1-bin.zip 方法二、造成此异常的原因是commons-beanutils的签名版本问题,本人解决问题所用的方法——将WEB-INF下的commons-beanutils.jar或commons-beanutils-X.X.X.jar替换成commons-beanutils-1.8.0.jarcommons-beanutils-1.8.0.jar下载地址:
http://dev.xiaonei.com/apache-mirror/commons/beanutils/binaries/commons-beanutils-1.8.0-bin.zip方法三、applicationContext.xml下看<property name="mappingResources">
<list>
<value>com/smile/entity/Users.hbm.xml</value>
</list>
</property> value路径是否正确3、严重: action: null
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'UserinfoDAO' defined in ServletContext resource [/WEB-INF/classes/applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'sessionFactory' of bean class [com.wang.hibernate.DAO.UserinfoDAO]: Bean property 'sessionFactory' is not writable or has an invalid setter method: Does the parameter type of the setter match the return type of the getter?
org.springframework.beans.NotWritablePropertyException: Invalid property 'sessionFactory' of bean class [com.wang.hibernate.DAO.UserinfoDAO]: Bean property 'sessionFactory' is not writable or has an invalid setter method: Does the parameter type of the setter match the return type of the getter?
解决方案:
注入配置错误,这个比较低级别,细心点,applicationContext.xml 中查看你的注入配置,如果确认没错,那么返回去看看是否为对应的属性提供了必要的set方法。 4、严重: action: null
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 2 in XML document from ServletContext resource [/WEB-INF/beans.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'.
Caused by: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'.
解决方案:
因为你的<beans>标记里面没有定义任何的dtd或者xsd文件嘛!
那解析器怎么知道这个xml文件是来干什么的?
给你一个示例:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/ beans http://www.springframework.org/schema/beans/spring- beans-2.0.xsd">
</beans>我以前在网上找的 你看看
在我的资源里面去下个SSH整合视频
看看就明白了
也出现了这个问题
我将common-collection.jar替换成了common-collection-3.2.1.jar,commons-beanutils.jar替换成了commons-beanutils-1.8.0.jar依然报错,
最后我删除了4个包,就不报错了
应该就是包冲突的问题,出现这个问题的兄弟可以试试俺也是个菜菜,说的不对的话不要骂我啊嘿嘿~~
主要检查这几个包:
common-collection-3.2.1.jar,commons-beanutils.ja
asm-2.2.3.jar
asm-commons-2.2.3.jar
asm-util-2.2.3.jar
cglib-nodep-2.1_3.jar