openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Praveen G" <praveenkumar.gan...@emagia.com>
Subject Help: Failing the build when written orm.xml file
Date Thu, 24 May 2007 14:06:17 GMT
Hi,

We are struck with 2 problems: 

    1. We have written orm.xml file for our application and we are getting the following exception.
We are also attaching our orm.xml and persistance.xml files for your reference.


 [openjpac] 6281  host  TRACE  [main] openjpa.MetaData - parsePersistentTypeNames() found
[com.vormetric.server.dao.user.UserDTO, com.vormetric.server.dao.user.RoleDTO].
 [openjpac] 6281  host  TRACE  [main] openjpa.MetaData - Found 2 classes with metadata in
46 milliseconds.
 [openjpac] 6344  host  TRACE  [main] openjpa.MetaData - Parsing class "com.vormetric.server.dao.user.RoleDTO".
 [openjpac] 6344  host  TRACE  [main] openjpa.Enhance - Enhancing type "class com.vormetric.server.dao.user.RoleDTO".
 [openjpac] 6344  host  WARN   [main] openjpa.Enhance - Type "class com.vormetric.server.dao.user.RoleDTO"
has no metadata; enhancing as persistence aware. If you intended for "class com.vormetric.server.dao.user.RoleDTO"
to be persistence-capable, then this means that OpenJPA could not find any metadata for "class
com.vormetric.server.dao.user.RoleDTO". This can happen if the directory containing your metadata
is not in your CLASSPATH, or if your metadata files are not named properly. See the documentation
on metadata placement for more information.
 [openjpac] 6344  host  TRACE  [main] openjpa.Tool - The class does not have metadata - enhanced
as persistence-aware.
 [openjpac] 6391  host  TRACE  [main] openjpa.Tool - Enhancer running on type "class com.vormetric.server.dao.user.UserDTO".
 [openjpac] 6422  host  TRACE  [main] openjpa.MetaData - Loading metadata for "class com.vormetric.server.dao.user.UserDTO"
under mode "[META][QUERY]".
 [openjpac] 6422  host  TRACE  [main] openjpa.MetaData - Parsing class "com.vormetric.server.dao.user.UserDTO".
 [openjpac] 6422  host  TRACE  [main] openjpa.Enhance - Enhancing type "class com.vormetric.server.dao.user.UserDTO".
 [openjpac] 6422  host  WARN   [main] openjpa.Enhance - Type "class com.vormetric.server.dao.user.UserDTO"
has no metadata; enhancing as persistence aware. If you intended for "class com.vormetric.server.dao.user.UserDTO"
to be persistence-capable, then this means that OpenJPA could not find any metadata for "class
com.vormetric.server.dao.user.UserDTO". This can happen if the directory containing your metadata
is not in your CLASSPATH, or if your metadata files are not named properly. See the documentation
on metadata placement for more information.
 [openjpac] 6422  host  TRACE  [main] openjpa.Tool - The class does not have metadata - enhanced
as persistence-aware.
 [openjpac] 6453  host  TRACE  [main] openjpa.MetaData - Clearing metadata repository "org.apache.openjpa.meta.MetaDataRepository@be76c7".


    2. To make an entity readonly in an application(described below).

    
    Please help us in resolving these two problems as we have struck with these two problems.
We are not able to findout where exactly is the mistake in our configurations.

Thanks,
Praveen Kumar.

  ----- Original Message ----- 
  From: Praveen G 
  To: open-jpa-dev@incubator.apache.org ; Patrick Linskey 
  Cc: Budigam Srinivas Rao ; Murali Adiraju ; Deven Kalra ; Lane Bauldry 
  Sent: Wednesday, May 23, 2007 8:41 PM
  Subject: Re: Problem with Entity Cache


  Hi,

  Please help us in resolving the following problem.

  Thanks,
  Praveen Kumar.

    ----- Original Message ----- 
    From: Praveen G 
    To: open-jpa-dev@incubator.apache.org ; 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(SingleFieldManager.java:750)
     at org.apache.openjpa.kernel.SingleFieldManager.preFlushPCs(SingleFieldManager.java:732)
     at org.apache.openjpa.kernel.SingleFieldManager.preFlush(SingleFieldManager.java:634)
     at org.apache.openjpa.kernel.SingleFieldManager.preFlush(SingleFieldManager.java:559)
     at org.apache.openjpa.kernel.SingleFieldManager.preFlush(SingleFieldManager.java:475)
     at org.apache.openjpa.kernel.StateManagerImpl.preFlush(StateManagerImpl.java:2678)
     at org.apache.openjpa.kernel.PNewState.beforeFlush(PNewState.java:39)
     at org.apache.openjpa.kernel.StateManagerImpl.beforeFlush(StateManagerImpl.java:854)
     at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1903)
     at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1863)
     at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1634)
     at org.apache.openjpa.kernel.StateManagerImpl.assignObjectId(StateManagerImpl.java:478)
     at org.apache.openjpa.kernel.StateManagerImpl.assignField(StateManagerImpl.java:558)
     at org.apache.openjpa.kernel.StateManagerImpl.beforeAccessField(StateManagerImpl.java:1365)
     at org.apache.openjpa.kernel.StateManagerImpl.accessingField(StateManagerImpl.java:1348)
     at com.vormetric.server.dao.user.UserDTO.pcGetid(UserDTO.java)
     at com.vormetric.server.dao.user.UserDTO.getId(UserDTO.java:93)
     at com.vormetric.server.dao.user.hibernate.UserDAOImpl.create(UserDAOImpl.java:89)
     at com.vormetric.server.sdk.user.UserManager.addUser(UserManager.java:52)
     at com.vormetric.server.mgmt.console.user.UserAddAction.execute(UserAddAction.java:67)


    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

    <hibernate-mapping>
        <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.

    Thanks,
    Praveen Kumar.


Mime
View raw message