openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Praveen G" <>
Subject Re: Problem with Entity Cache
Date Wed, 23 May 2007 15:11:41 GMT

Please help us in resolving the following problem.

Praveen Kumar.

  ----- Original Message ----- 
  From: Praveen G 
  To: ; Patrick Linskey 
  Cc: Budigam Srinivas Rao ; Murali Adiraju 
  Sent: Tuesday, May 22, 2007 8:27 PM
  Subject: Problem with Entity Cache

  Hello Patrick Linskey,

  We are facing the following problem in our project. 

  <0.9.7-incubating fatal user error> org.apache.openjpa.persistence.InvalidStateException:
Encountered unmanaged object "com.vormetric.server.dao.user.RoleDTO@51ac51ac" in persistent
field "com.vormetric.server.dao.user.UserDTO.roles<element:class com.vormetric.server.dao.user.RoleDTO>"
of managed object "com.vormetric.server.dao.user.UserDTO@4f164f16" during flush.  However,
this field does not allow cascade persist.  You cannot flush unmanaged objects.
  FailedObject: com.vormetric.server.dao.user.RoleDTO@51ac51ac
   at org.apache.openjpa.kernel.SingleFieldManager.preFlushPC(
   at org.apache.openjpa.kernel.SingleFieldManager.preFlushPCs(
   at org.apache.openjpa.kernel.SingleFieldManager.preFlush(
   at org.apache.openjpa.kernel.SingleFieldManager.preFlush(
   at org.apache.openjpa.kernel.SingleFieldManager.preFlush(
   at org.apache.openjpa.kernel.StateManagerImpl.preFlush(
   at org.apache.openjpa.kernel.PNewState.beforeFlush(
   at org.apache.openjpa.kernel.StateManagerImpl.beforeFlush(
   at org.apache.openjpa.kernel.BrokerImpl.flush(
   at org.apache.openjpa.kernel.BrokerImpl.flushSafe(
   at org.apache.openjpa.kernel.BrokerImpl.flush(
   at org.apache.openjpa.kernel.StateManagerImpl.assignObjectId(
   at org.apache.openjpa.kernel.StateManagerImpl.assignField(
   at org.apache.openjpa.kernel.StateManagerImpl.beforeAccessField(
   at org.apache.openjpa.kernel.StateManagerImpl.accessingField(
   at com.vormetric.server.dao.user.UserDTO.pcGetid(
   at com.vormetric.server.dao.user.UserDTO.getId(
   at com.vormetric.server.dao.user.hibernate.UserDAOImpl.create(
   at com.vormetric.server.sdk.user.UserManager.addUser(
   at com.vormetric.server.mgmt.console.user.UserAddAction.execute(

  We are having 2 entity classes UserDTO and RoleDTO files. We want the RoleDTO entity to
be readonly.
  So Please help us to make an entity readonly in an application.

  The following is the tag in our existing hibernate mapping file. We are replacing the hibernate
code with OpenJPA code

      <class name="com.vormetric.server.dao.user.RoleDTO" table="CGSS_ROLE">
    <cache usage="read-only"/>

  So please help us as soon as possible, to make an entity readonly.

  Praveen Kumar.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message