-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: ChainedPropertyAccessor not Serializable
PostPosted: Wed May 13, 2009 10:46 am 
Newbie

Joined: Mon Dec 10, 2007 7:03 am
Posts: 14
I execute a named query with an alias to bean result transformer and EHCache query cache activated
Code:
       
        Query query=session.getNamedQuery("Articles.byName");
        query.setParameter("name",name);
        query.setResultTransformer(Transformers.aliasToBean(ArticleVO.class));
        query.list();

Code:
    <query name="Articles.byName" cacheable="true">
        <query-param name="name" type="string"/>
        <![CDATA[
select article.id as idArticle, article.name as nameArticle,
from Article article
where article.name like :name
]]>
    </query>


I get the following exception
Quote:
2009-05-13 15:21:15,502 [Store org.hibernate.cache.StandardQueryCache Spool Thread] ERROR net.sf.ehcache.store.DiskStore - ettele.org.hibernate.cache.StandardQueryCacheCache: Failed to write element to disk 'sql: select ...; max rows: 100; transformer: org.hibernate.transform.AliasToBeanResultTransformer@377a0c88'. Initial cause was org.hibernate.property.ChainedPropertyAccessor
java.io.NotSerializableException: org.hibernate.property.ChainedPropertyAccessor
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at net.sf.ehcache.util.MemoryEfficientByteArrayOutputStream.serialize(MemoryEfficientByteArrayOutputStream.java:75)
at net.sf.ehcache.store.DiskStore.writeElement(DiskStore.java:689)
at net.sf.ehcache.store.DiskStore.writeOrReplaceEntry(DiskStore.java:679)
at net.sf.ehcache.store.DiskStore.flushSpool(DiskStore.java:651)
at net.sf.ehcache.store.DiskStore.throwableSafeFlushSpoolIfRequired(DiskStore.java:628)
at net.sf.ehcache.store.DiskStore.spoolAndExpiryThreadMain(DiskStore.java:596)
at net.sf.ehcache.store.DiskStore.access$800(DiskStore.java:64)
at net.sf.ehcache.store.DiskStore$SpoolAndExpiryThread.run(DiskStore.java:1033)


I am using:
- Hibernate Core 3.3.1.GA
- Hibernate Annotations 3.4.0.GA
- EHCache 1.5.0
- Java 1.6.0_10

Is it a known bug? I can't find it in the bug tracker.


Top
 Profile  
 
 Post subject: Re: ChainedPropertyAccessor not Serializable
PostPosted: Thu Jul 02, 2009 7:01 pm 
Newbie

Joined: Thu Jul 02, 2009 7:00 pm
Posts: 2
I am having the same issue and it breaks ehcache replication. Any fixes or is this a hibernate bug?


Top
 Profile  
 
 Post subject: Re: ChainedPropertyAccessor not Serializable
PostPosted: Thu Jul 02, 2009 7:57 pm 
Newbie

Joined: Thu Jul 02, 2009 7:00 pm
Posts: 2
Bug with workaround:

http://opensource.atlassian.com/project ... e/HHH-4011


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.