JpaServiceRegistry with MySQL backend
Scott Battaglia
scott.battaglia at gmail.com
Fri Aug 10 11:55:33 EDT 2007
Romain,
It appears to be a bug in Hibernate 3.2.4.ga. If you upgrade to Hibernate
3.2.4.sp1 you should be okay.
-Scott
On 8/10/07, Romain Bourgue <romain.bourgue at agriculture.gouv.fr> wrote:
>
> Hi,
>
> I've set the ServiceRegistryDao to use a database for persistance. I set
> my
> application context as attached.
>
> The datasource configuration seems to be ok as it creates the table in the
> database.
> But, when I try to save a registered service in the service manager
> interface, I
> get this exception :
>
> Hibernate: insert into RegisteredServiceImpl (allowedAttributes,
> allowedToProxy,
> anonymousAccess, description, enabled, name, serviceId, ssoEnabled, theme,
> id)
> values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
> 2007-08-09 18:51:58,706 ERROR [org.hibernate.util.JDBCExceptionReporter] -
> <No
> value specified for parameter 10>
>
> Even if the id field in RegisteredServiceImpl table is auto-increment,
> Hibernate
> tries to set a value for it... is it normal ?
>
> No query is sent to the MySQL server, the exception is raised before.
>
>
> Did I miss something ?
>
>
> Romain
>
>
> --Snip from applicationContext.xml
>
> <bean id="serviceRegistryDao"
> class="org.jasig.cas.services.JpaServiceRegistryDaoImpl"
> p:entityManagerFactory-ref="entityManagerFactory" />
>
> <!-- This is the EntityManagerFactory configuration for Hibernate -->
> <bean id="entityManagerFactory"
> class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean
> ">
> <property name="dataSource" ref="dataSource"/>
> <property name="jpaVendorAdapter">
> <bean class="
> org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
> <property name="generateDdl"
> value="true"/>
> <property name="showSql" value="true" />
> </bean>
> </property>
> <property name="jpaProperties">
> <props>
> <prop key="hibernate.dialect">
> org.hibernate.dialect.MySQLDialect</prop>
> <prop key="hibernate.hbm2ddl.auto
> ">create-drop</prop>
> </props>
> </property>
> </bean>
>
> --
> _______________________________________________
> Yale CAS mailing list
> cas at tp.its.yale.edu
> http://tp.its.yale.edu/mailman/listinfo/cas
>
--
-Scott Battaglia
LinkedIn: http://www.linkedin.com/in/scottbattaglia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tp.its.yale.edu/pipermail/cas/attachments/20070810/f0c59c7a/attachment.html
More information about the cas
mailing list