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.

Community
  • 1
  • 1
curious1
  • 14,155
  • 37
  • 130
  • 231

1 Answers1

0

Here is what I got around this issue.

Based on the link (https://jira.springsource.org/browse/SPR-9022) given by nobeh, I updated my JDBC driver from JTDS to Microsoft's type 4 driver. Then everything works fine. Please note that in my model objects, I only have String related lob fields.

Hope this helps someone else.

Cheers!

curious1
  • 14,155
  • 37
  • 130
  • 231