According to this post i changed my session factory definition from
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"
p:dataSource-ref="dataSource" p:lobHandler-ref="oracleLobHandler">
<property name="annotatedClasses">
<list>
[..]
into
<bean id="sessionFactory"
class="org.springframework.orm.hibernate4.LocalSessionFactoryBean"
p:dataSource-ref="dataSource">
<property name="annotatedClasses">
<list>
[..]
Unfortunately there is no possibility to define the LobHandler as it was in hibernate3. As there is still the following written in the "Lobhandler"s javadoc it seems still necessary
Summarizing the recommended options (for actual LOB fields):
JDBC 4.0 driver: DefaultLobHandler with streamAsLob=true.
PostgreSQL: DefaultLobHandler with wrapAsLob=true. Oracle 9i/10g:
OracleLobHandler with a connection-pool-specific NativeJdbcExtractor.
For all other database drivers (and for non-LOB fields that might potentially turn into LOBs on some databases): a plain DefaultLobHandler.
So, is it still necessary to define the lobHandler in hibernate4 or not??? And if so, where can I define it?