1

I am doing a Spring web application with JPA+Hibernate. I use Spring 3.2.2.

I am hoping to upgrade Hibernate from 3.6.1 to 4.2.1.

I was using org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean and was able to inject a lob handler.

According to a few posts at SO (such as Exception NoClassDefFoundError for CacheProvider), I need to replace AnnotationSessionFactoryBean with

org.springframework.orm.hibernate4.LocalSessionFactoryBean

I did that. Now the website start failed because LocalSessionFactoryBean does not have a property for a lob handler. I looked at Spring API and cannot figure out how to inject my lob handler.

Thanks for any help!

Regards.

4

1 回答 1

0

这是我解决这个问题的方法。

根据nobeh 提供的链接 ( https://jira.springsource.org/browse/SPR-9022 ),我将我的 JDBC 驱动程序从 JTDS 更新为 Microsoft 的 type 4 驱动程序。然后一切正常。请注意,在我的模型对象中,我只有与字符串相关的 lob 字段。

希望这对其他人有帮助。

干杯!

于 2013-05-16T15:33:48.410 回答