my dog learned polymorphism*
The moose likes Object Relational Mapping and the fly likes Hibernate: Throws Clobs are not cacheable Exception when try to cache Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate: Throws Clobs are not cacheable Exception when try to cache " Watch "Hibernate: Throws Clobs are not cacheable Exception when try to cache " New topic
Author

Hibernate: Throws Clobs are not cacheable Exception when try to cache

jackrish krish
Greenhorn

Joined: May 03, 2011
Posts: 2
[color=blue][/color]
Hi,
I am using hibernate in my application and i had implemented second level cache .My table has clob data type .When cache the clob data,
it displays "clobs are not cacheable". is there any way to cache the clob type . If not cachebale, can you explain me why its not caching.
(Second level caching is working fine with all other data type except clob or blob).

Any immediate help would be appriciated .....
Thanks in Advance ..
Anantha Sharma
Ranch Hand

Joined: Sep 01, 2010
Posts: 43

refer to hibernate forum

https://forum.hibernate.org/viewtopic.php?f=9&t=985980&start=0

jackrish krish
Greenhorn

Joined: May 03, 2011
Posts: 2
Thaks for your reply sharma,

I read your post . In my application i should have to use clob or blob datatype to handle lengthy data and also i need to use the second level cache .In this case ,it does not caching the clob or blob data . caching is working properly with string,interger..... data. I sthere any other way to handle this .

If anybody knows please help to solve this ..

Thanks...
Anantha Sharma
Ranch Hand

Joined: Sep 01, 2010
Posts: 43

I understand your requirement, you need to say that its a clob but for hibernate you need to configure the field as String...

the post on the link contains a piece of code which does just that...
 
GeeCON Prague 2014
 
subject: Hibernate: Throws Clobs are not cacheable Exception when try to cache