[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 
Spring eclipselink Terracotta  XML
Forum Index -> Terracotta for Spring
Author Message


Joined: 06/14/2009 10:59:55
Messages: 3

I have got a simple stand-alone application which uses eclipselink as the JPA implementation coupled with spring which acts as a service layer. This application stores the pojos returned from the service in a list which is cached. Now to use eclipselink it is required that i have to use the spring-agent.jar as the javaagent. This application works fine when running independent of terracotta.
But when using under terracotta. I get the following error and the client gets shut down

********************************** ERROR ***********************************
* Terracotta client shutting down due to error java.lang.AssertionError:
* com.arisglobal.entities.Personnel._persistence_shouldRefreshFetchGroup
* does not exist in map returned from __tc_getallfields. Class is
* com.arisglobal.entities.Personnel. field Values =
* {com.arisglobal.entities.Personnel.recordId=2,
* com.arisglobal.entities.Personnel.lastName=Nigam,
* com.arisglobal.entities.Personnel.firstName=Vishal,
* com.arisglobal.entities.Personnel.personnelCode=EMP0002,
* com.arisglobal.entities.Personnel.middleName=Shah}

java.lang.AssertionError: com.arisglobal.entities.Personnel._persistence_shouldRefreshFetchGroup does not exist in map returned from __tc_ge
tallfields. Class is com.arisglobal.entities.Personnel. field Values = {com.arisglobal.entities.Personnel.recordId=2, com.arisglobal.entitie
s.Personnel.lastName=Nigam, com.arisglobal.entities.Personnel.firstName=Vishal, com.arisglobal.entities.Personnel.personnelCode=EMP0002, com
at com.tc.object.applicator.PhysicalApplicator.dehydrate(PhysicalApplicator.java:115)
at com.tc.object.TCClassImpl.dehydrate(TCClassImpl.java:180)
at com.tc.object.TCObjectImpl.dehydrate(TCObjectImpl.java:100)
at com.tc.object.tx.TransactionBatchWriter$TransactionBufferImpl.writeChanges(TransactionBatchWriter.java:532)
at com.tc.object.tx.TransactionBatchWriter$TransactionBufferImpl.writeFirst(TransactionBatchWriter.java:549)
at com.tc.object.tx.TransactionBatchWriter$TransactionBufferImpl.write(TransactionBatchWriter.java:490)
at com.tc.object.tx.TransactionBatchWriter.addTransaction(TransactionBatchWriter.java:323)
at com.tc.object.tx.TransactionSequencer.addTransactionToBatch(TransactionSequencer.java:94)
at com.tc.object.tx.TransactionSequencer.addTxnInternal(TransactionSequencer.java:125)
at com.tc.object.tx.TransactionSequencer.addTransaction(TransactionSequencer.java:103)
at com.tc.object.tx.RemoteTransactionManagerImpl.commit(RemoteTransactionManagerImpl.java:243)
at com.tc.object.tx.ClientTransactionManagerImpl.commitInternal(ClientTransactionManagerImpl.java:537)
at com.tc.object.tx.ClientTransactionManagerImpl.commit(ClientTransactionManagerImpl.java:500)
at com.tc.object.tx.ClientTransactionManagerImpl.commit(ClientTransactionManagerImpl.java:428)
at com.tc.object.bytecode.ManagerImpl.monitorExit(ManagerImpl.java:550)
at com.tc.object.bytecode.ManagerUtil.monitorExit(ManagerUtil.java:524)
at com.arisglobal.PersonnelManager.main(PersonnelManager.java:67)

However I tried this application directly using eclipselink without using spring. In that case it behaves well. So kindly let me know what should i do for this.


Joined: 05/24/2006 14:28:28
Messages: 493

Terracotta dosen't support EclipseLink or TopLink.
Our solution works really really well with Hibernate (and we are making massive improvements in our 3.1 release). We also have Ibatis support - but using Hibernate as your ORM with Terracotta (clustering the 2nd level cache or detached pojos) is the way to go...

Sreeni Iyer, Terracotta.
Not a member yet - Click here to join the Terracotta Community


Joined: 03/26/2010 13:26:50
Messages: 1
Location: Ottawa

Hi, the following field on the entity class is a result of instrumenting the class bytecode for weaving (used for performance, caching and change tracking)


This field was removed in SVN Rev# 5339 in Sept 2009 http://fisheye2.atlassian.com/changelog/eclipselink/?cs=5339

In general any underscored field "_*" is a result of weaving - which is on by default when your JPA EAR is run on an EE application server container. You will most likely want to disable these transient fields which are not persisted.

Try turning off weaving to get past this exception by inserting the following property in your JPA persistence.xml descriptor.
<property name="eclipselink.weaving" value="false"/>

or partially disable weaving as follows.

thank you
Michael O'Brien


Joined: 05/24/2006 14:22:53
Messages: 619

Does eclipse link have a plugin API?

Makes the most sense to use ehcache express (which doesn't require any instrumentation from terracotta to scale out).

Would love to work with the eclipse link team to get a caching provider with ehcache sorted out

Want to post to this forum? Join the Terracotta Community
Forum Index -> Terracotta for Spring
Go to:   
Powered by JForum 2.1.7 © JForum Team