My Hibernate is 3.2.6
The last solution to this problem is to add the following red-colored code.
<! -- Configure sessionfactory -->
<Bean id = "sessionfactory" class = "org. springframework. Orm. hibernate3.localsessionfactorybean">
<Property name = "datasource" ref = "datasource"/>
<Property name = "configlocation">
<Value> classpath: hibernate. cfg. xml </value>
</Property>
<Property name = "mappinglocations">
<Value> classpath *:/org/jbpm/**/*. HBM. xml </value>
</Property>
<Property name = "hibernateproperties">
<Props>
<Prop key = "hibernate. dialect">
Org. hibernate. dialect. oracle9dialect
</Prop>
<Prop key = "JDBC. fetch_size"> 50 </prop>
<Prop key = "JDBC. batch_size"> 30 </prop>
<Prop key = "hibernate. show_ SQL"> true </prop>
<Prop key = "hibernate. use_outer_join"> true </prop>
<Prop key = "hibernate. cglib. use_reflection_optimizer">
True
</Prop>
</Props>
</Property>
</Bean>
If you have a better solution, please leave a message. Thank you.