Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]:

1

I am developing a Java SE desktop application with Maven Netbeans, Hibernate and Spring Framework for IoC.

When I run it returns this error (copied below), apparently it can not build the Bean sessionFactory declared inside my AplicationContext.xml, I do not know if it will be problems between versions

**** CONFIGURATION OF the sessionFactory IN APLICATIONCONTEXT.xml ****

<bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">

        <!--        LLAMADO A CONEXION A FUENTE DE DATOS-->
        <property name="dataSource">
            <ref bean="dataSource"/>
        </property>

        <!--        PROPIEDADES DE HIBERNATE-->
        <property name="hibernateProperties">
            <props>
                <prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
                <prop key="hibernate.show_sql">true</prop>
                <prop key="hibernate.cglib.use_reflection_optimizer">true</prop>
            </props>
        </property>

        <!--        MAPEO DE ENTIDADES-->
        <property name="mappingResources">
            <list>
                <value>datos/hibernate/orm/MiTabla.hbm.xml</value>
            </list>
        </property>
    </bean>

***** COPY THE ERROR MESSAGE **************

  

WARNING: Exception encountered during context initialization - canceling refresh attempt: 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.engine.spi.SessionFactoryImplementor.getProperties () Ljava / util / Map;   Exception in thread "main" 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.engine.spi.SessionFactoryImplementor.getProperties () Ljava / util / Map;

    
asked by Isabel 24.04.2017 в 11:24
source

0 answers