是在启动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>
里面的路径是没问题的望高手指点

解决方案 »

  1.   

    供参考<!-- hibernate config -->
    <!-- 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>
      

  2.   

    是不是你lib包下有一个commons-collections-2.1.jar和commons-collctions-3.2.jar,你把第一个删掉就应该ok了! 
      

  3.   


        <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>你参考一下
      

  4.   

    你用的是myeclipse几的???
      

  5.   

    action null 问题小计 收藏 
    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>我以前在网上找的 你看看
      

  6.   

    有没有用到Struts?SSH集成的话,需要设置代理类和配置插件,不能直接访问Action
      

  7.   

    进我的空间
    在我的资源里面去下个SSH整合视频
    看看就明白了
      

  8.   

    jar包版本问题  查找common-collection。jar的何时版本
      

  9.   

    昨天的这个问题解决了   像你们说的最主要是jar包的问题  是少了commons-beanutils.jar但要注意的是 我在以前的开发环境是没有commons-beanutils.jar 包的   但项目也没有问题所以一直没有注意到那里去这个错误只要注意这两个地方就可以了common-collection.jar commons-beanutils.jar
      

  10.   

    我用的MyEclipse5.5
    也出现了这个问题
    我将common-collection.jar替换成了common-collection-3.2.1.jar,commons-beanutils.jar替换成了commons-beanutils-1.8.0.jar依然报错,
    最后我删除了4个包,就不报错了
      

  11.   

    3个包:asm.jar、asm-attrs.jar、cglib-2.1.jar
    应该就是包冲突的问题,出现这个问题的兄弟可以试试俺也是个菜菜,说的不对的话不要骂我啊嘿嘿~~
      

  12.   

    我也遇到过这种配置错误,最后逐个jar包添加进去后才解决。应该是项目CLASSPATH的包的配置问题。
    主要检查这几个包:
    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 
      

  13.   

    很可能是缺少commons-beanutils.jar文件