spring异常。。。。-问答-阿里云开发者社区-阿里云

开发者社区> 问答> 正文

spring异常。。。。

a123456678 2016-03-19 09:40:42 1521

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.hibernate.cfg.annotations.reflection.XMLContext$Default.getDelimitedIdentifier()Ljava/lang/Boolean;

Caused by: java.lang.NoSuchMethodError: org.hibernate.cfg.annotations.reflection.XMLContext$Default.getDelimitedIdentifier()Ljava/lang/Boolean;

哪位大神帮我看看,这个是spring的什么异常,需要怎么做?谢谢了!

spring异常
分享到
取消 提交回答
全部回答(1)
  • a123456678
    2019-07-17 19:07:18
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- Spring配置文件 -->
    <beans xmlns="http://www.springframework.org/schema/beans"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xmlns:context="http://www.springframework.org/schema/context"
            xmlns:tx="http://www.springframework.org/schema/tx"
            xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
                    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
                    http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
     
        <bean id="sessionFactory"
            class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
            <property name="configLocation"
                value="classpath:hibernate.cfg.xml">
            </property>
        </bean>
         
        <!-- Dao层配置 -->
        <bean id="baseDao" class="tang.sys.dao.impl.BaseDao">
            <property name="sessionFactory">
                <ref bean="sessionFactory" />
            </property>
        </bean>
        <bean id="userDao" class="tang.sys.dao.impl.UserDao">
            <property name="sessionFactory">
                <ref bean="sessionFactory" />
            </property>
        </bean>
        <!-- 
        <bean id="userService" class="tang.sys.service.UserService">
            <property name="userDao" ref="userDao"></property>  
        </bean>
        <bean id="userAction" class="tang.sys.action.UserAction">
            <property name="userService" ref="userService"></property>  
        </bean>
        <bean id="saveUserAction" class="com.cqut.edu.action.user.SaveUserAction" scope="prototype">
            <property name="service" ref="userService"></property>
        </bean>
         
        <bean id="listUserAction" class="com.cqut.edu.action.user.ListUserAction" scope="prototype">
            <property name="service" ref="userService"></property>
         
         
        </bean>
        <bean id="removeUserAction" class="com.cqut.edu.action.user.RemoveUserAction" scope="prototype">
            <property name="service" ref="userService"></property>
        </bean>
         
        <bean id="updateUserAction" class="com.cqut.edu.action.user.UpdateUserAction" scope="prototype">
            <property name="service" ref="userService"></property>
        </bean>
        <bean id="updatePUserAction" class="com.cqut.edu.action.user.UpdatePUserAction" scope="prototype">
            <property name="service" ref="userService"></property>
        </bean>
         -->
    </beans> <span></span> <span></span> <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE hibernate-configuration PUBLIC
              "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
              "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <span></span> <!-- Generated by MyEclipse Hibernate Tools.                   -->
    <!-- Hibernate配置文件 -->
    <hibernate-configuration> <span></span> <session-factory>
        <property name="connection.url">
            jdbc:oracle:thin:@localhost:1521:XE
        </property>
        <property name="connection.username">SANSYO</property>
        <property name="connection.password">SANSYO</property>
        <property name="connection.driver_class">
            oracle.jdbc.driver.OracleDriver
        </property>
        <property name="dialect">
            org.hibernate.dialect.OracleDialect
        </property>
        <property name="show_sql">true</property>
        <mapping resource="tang/sys/entity/User.hbm.xml" class="tang.sys.entity.User"/>
     
    </session-factory>
     
    </hibernate-configuration>
    0 0
开发与运维
使用钉钉扫一扫加入圈子
+ 订阅

集结各类场景实战经验,助你开发运维畅行无忧

相似问题
最新问题