[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Spring + hibernate + ehcach = ClassCastException  XML
Forum Index -> Terracotta for Spring
Author Message
lgiavedo

neo

Joined: 09/10/2008 09:12:57
Messages: 7
Offline

I use:
Hibernate: 3.2.5
EhCache: 1.3.0
Terracota 2.7.0

The server start OK.
when i login in the application the tomcat throw this exception:

Caused by: java.lang.ClassCastException: org.hibernate.cache.entry.CacheEntry cannot be cast to org.hibernate.cache.ReadWriteCache$Lockable

at
org.hibernate.cache.ReadWriteCache.put(ReadWriteCache.java:153)
at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:156)
at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:854)
at org.hibernate.loader.Loader.doQuery(Loader.java:729)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)



My tc-config.xml:

Code:
 <?xml version="1.0" encoding="UTF-8"?>
 <tc:tc-config xmlns:tc="http://www.terracotta.org/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.terracotta.org/schema/terracotta-3.xsd">
         <servers>
           <server host="wxpvllgiavedo" name="pfs_terracota">
           	<dso-port>9510</dso-port>
      				<jmx-port>9520</jmx-port>
      				<data>terracotta/server-data</data>
      				<logs>terracotta/server-logs</logs>
      			</server>	
         </servers>
         <clients>
           <logs>terracotta/server-logs</logs>
           <modules>
             <module name="tim-cglib-2.1.3" version="1.2.0.SNAPSHOT" />
             <module name="tim-ehcache-1.3"   version="1.4.0.SNAPSHOT" />
             <module name="tim-hibernate-3.2.5" version="1.2.0.SNAPSHOT" />
             <module name="tim-ehcache-commons"   version="1.4.0.SNAPSHOT" />
             <!--<module name="clustered-commons-collections-3.1" version="2.7.0.SNAPSHOT" />
             		<module name="tim-synchronizedcollection" version="2.4.0.SNAPSHOT" />
             		<module name="tim-synchronizedset" version="2.3.0.SNAPSHOT" />
             		<module name="tim-synchronizedmap" version="2.4.0.SNAPSHOT" />
             -->
           </modules>
         </clients>
         <application>
           <spring>
             <jee-application name="pfs">
               <session-support>false</session-support>
               <instrumented-classes>
                 <include>
                   <class-expression>myproyect.example..*</class-expression>
                 </include>
               </instrumented-classes>
               
             </jee-application>
           </spring>
         </application>
 </tc:tc-config>
 
 



please help on this.
lgiavedo

neo

Joined: 09/10/2008 09:12:57
Messages: 7
Offline

I find the solution...

The problem is:

In my hiberate cache config set:

es.example..persona.model.DDTipoPersona -->read-only

So put in my tc-config.xml:

<transient-fields>
<field-name>es.example..persona.model.DDTipoPersona></field-name>
</transient-fields>

Now all work ok.

Thanks
apaliwal

praetor

Joined: 01/05/2010 20:52:24
Messages: 223
Offline

Thanks for sharing !

cheers
ashish
 
Forum Index -> Terracotta for Spring
Go to:   
Powered by JForum 2.1.7 © JForum Team