Results 1 to 4 of 4

Thread: Hibernate 4 LocalSessionFactoryBean configurationClass property

  1. #1
    Join Date
    Dec 2011
    Posts
    1

    Default Hibernate 4 LocalSessionFactoryBean configurationClass property

    Hi,

    It seems that in the api for Hibernate 4 support no longer has a configurationClass property as it did in Hibernate 3:

    http://static.springsource.org/sprin...ctoryBean.html

    http://static.springsource.org/sprin...ctoryBean.html

    I have searched quite a bit and have found nothing about this particular issue I am having. I am new to Spring and Hibernate and am just trying to get up and running with the latest releases of each. Has anybody else encountered this issue?

    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/spring-servlet.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyExcep tion: Invalid property 'configurationClass' of bean class [org.springframework.orm.hibernate4.LocalSessionFac toryBean]: Bean property 'configurationClass' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?

    This is the snippet the bean in my spring-servlet.xml file containing the problem:

    <bean id="sessionFactory"
    class="org.springframework.orm.hibernate4.LocalSes sionFactoryBean">
    <property name="dataSource" ref="dataSource" />
    <property name="configLocation">
    <value>classpath:hibernate.cfg.xml</value>
    </property>
    <property name="configurationClass">
    <value>org.hibernate.cfg.AnnotationConfiguration </value>
    </property>
    <property name="hibernateProperties">
    <props>
    <prop key="hibernate.dialect">${jdbc.dialect}</prop>
    <prop key="hibernate.show_sql">true</prop>
    </props>
    </property>
    </bean>


    Thanks so much

  2. #2
    Join Date
    Aug 2009
    Posts
    5

    Default

    Anyone have a solution for this? I am running into the same issue.

    Thank you,

    Dave

  3. #3
    Join Date
    Sep 2012
    Posts
    1

    Default

    Assistance will be much appreciated !!

  4. #4
    Join Date
    Mar 2009
    Location
    NY
    Posts
    7

    Default

    I just want to update this thread if in-case someone will encountered the same problem.

    I notice about org.springframework.orm.hibernate4.LocalSessionFac toryBean error.

    In Hibernate4, the configurationClass has been removed. If you can provide more information about what you were trying to accomplish maybe I can help.
    Think Ab0v3 & B3yond - Proactive Not Reactive

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •