Announcement Announcement Module
Collapse
No announcement yet.
Hibernate 4 LocalSessionFactoryBean configurationClass property Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    Anyone have a solution for this? I am running into the same issue.

    Thank you,

    Dave

    Comment


    • #3
      Assistance will be much appreciated !!

      Comment


      • #4
        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.

        Comment

        Working...
        X