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


Reply With Quote
