Cause: org.apache.ibatis.cache.CacheException: Error serializing object.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Cause: org.apache.ibatis.cache.CacheException: Error serializing object.

abdul
Hi,

I wanted to cache resultset objects so I configured default cache for
mapper xml as

<cache/>

and I implement my POJO as serializable.

yet I am getting following exception:

Caused by: org.apache.ibatis.exceptions.PersistenceException:
### Error closing transaction.  Cause:
org.apache.ibatis.cache.CacheException: Error serializing object.
Cause: java.io.NotSerializableException: com.myapp.model.Bean
### Cause: org.apache.ibatis.cache.CacheException: Error serializing
object.  Cause: java.io.NotSerializableException: com.myapp.model.Bean

Does anyone has idea as what is wrong here..

your early response would be greatly appereciated.

Thank,
Abdul
Reply | Threaded
Open this post in threaded view
|

Re: Cause: org.apache.ibatis.cache.CacheException: Error serializing object.

Simone Tripodi
Hi Abdul,
maybe one or more Bean properties are NOT serializable? Can you check it?
Simo

http://people.apache.org/~simonetripodi/
http://www.99soft.org/



On Mon, Nov 8, 2010 at 1:37 PM, abdul <[hidden email]> wrote:

> Hi,
>
> I wanted to cache resultset objects so I configured default cache for
> mapper xml as
>
> <cache/>
>
> and I implement my POJO as serializable.
>
> yet I am getting following exception:
>
> Caused by: org.apache.ibatis.exceptions.PersistenceException:
> ### Error closing transaction.  Cause:
> org.apache.ibatis.cache.CacheException: Error serializing object.
> Cause: java.io.NotSerializableException: com.myapp.model.Bean
> ### Cause: org.apache.ibatis.cache.CacheException: Error serializing
> object.  Cause: java.io.NotSerializableException: com.myapp.model.Bean
>
> Does anyone has idea as what is wrong here..
>
> your early response would be greatly appereciated.
>
> Thank,
> Abdul
>