Tuesday, December 26, 2006

Spring java.lang.ClassCastException: java.lang.Long

In the error Log, you'll notice it occurs in toLoggableString within the Hibernate code


When you notice that, change your logger settings to INFO from DEBUG. It se
ems to go away.

This seems to be a bug with Spring / Hibernate.

Originally Where I got this answer from

Monday, December 25, 2006

Spring Hibernate tips

I've started coding in Spring - Hibernate now. I've come across many hurdles, interesting nonetheless.

Here's what I learnt today.

To get hibernate to "actually" perform the update / create on the database
use:

hibernate.hbm2ddl.auto">create
The hibernate suffix is essential.

If that doesn't work this may
http://forum.springframework.org/showthread.php?t=15009



classpath:hibernate.cfg.xml
true