Author |
Message |
06/14/2009 11:07:33
|
Harish30
neo
Joined: 06/14/2009 10:59:55
Messages: 3
Offline
|
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
.arisglobal.entities.Personnel.middleName=Shah}
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.
|
|
|
06/19/2009 08:46:36
|
zeeiyer
consul
Joined: 05/24/2006 14:28:28
Messages: 493
Offline
|
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 |
|
|
03/26/2010 13:42:08
|
obrienmi
neo
Joined: 03/26/2010 13:26:50
Messages: 1
Location: Ottawa
Offline
|
Harish30,
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)
._persistence_shouldRefreshFetchGroup
This field was removed in SVN Rev# 5339 in Sept 2009 http://fisheye2.atlassian.com/changelog/eclipselink/?cs=5339
http://fisheye2.atlassian.com/browse/eclipselink/trunk/jpa/org.eclipse.persistence.jpa/src/org/eclipse/persistence/internal/jpa/weaving/ClassWeaver.java?r=6759#l931
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.
http://wiki.eclipse.org/Using_EclipseLink_JPA_Extensions_(ELUG)#To_Disable_Weaving_Using_EclipseLink_Persistence_Unit_Properties
thank you
Michael O'Brien
http://www.eclipselink.org
|
|
|
03/26/2010 14:13:40
|
steve
ophanim
Joined: 05/24/2006 14:22:53
Messages: 619
Offline
|
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 |
|
|
|