Return-Path: Delivered-To: apmail-incubator-open-jpa-dev-archive@locus.apache.org Received: (qmail 27303 invoked from network); 24 May 2007 17:28:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 May 2007 17:28:11 -0000 Received: (qmail 89200 invoked by uid 500); 24 May 2007 17:28:16 -0000 Delivered-To: apmail-incubator-open-jpa-dev-archive@incubator.apache.org Received: (qmail 89180 invoked by uid 500); 24 May 2007 17:28:16 -0000 Mailing-List: contact open-jpa-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: open-jpa-dev@incubator.apache.org Delivered-To: mailing list open-jpa-dev@incubator.apache.org Received: (qmail 89168 invoked by uid 99); 24 May 2007 17:28:16 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 May 2007 10:28:15 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of mprudhomapache@gmail.com designates 64.233.162.230 as permitted sender) Received: from [64.233.162.230] (HELO nz-out-0506.google.com) (64.233.162.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 May 2007 10:28:09 -0700 Received: by nz-out-0506.google.com with SMTP id i1so626388nzh for ; Thu, 24 May 2007 10:27:48 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:in-reply-to:references:mime-version:x-priority:content-type:message-id:content-transfer-encoding:from:subject:date:to:x-mailer:sender; b=K0CKNccQx6cedm6JI36NOfYgDVTyarR/grMfLQWR/x161s3/r/7Ty+gYPafWr4wm/NKRj9oNRg7ZxcXSgBy0GYEXzeMuTAzbfT9KzWN8xhxGc4DFnjt0+vg882glOpxda/vu82FQs58lqVfK1FQySlegiFX5Z44RpDiNN8i9xtM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:in-reply-to:references:mime-version:x-priority:content-type:message-id:content-transfer-encoding:from:subject:date:to:x-mailer:sender; b=IkuVTKGYcZ0Ibp5R4Pdssllg3LuzBxKYBvLhTDDj9DQU+U6+MdWz2akZ4dCNzYYyNcZWRA4jdvlr08xVcLd4JgqtIAD+oIwEkpmd4Qa4SGUmFugu9qDgBaRgvzxi2bI15gxoNcOQ5kGyvtmvwhNpgMKe8k04wB8OWE1B9waNeug= Received: by 10.65.197.13 with SMTP id z13mr3869500qbp.1180027667704; Thu, 24 May 2007 10:27:47 -0700 (PDT) Received: from ?192.168.15.101? ( [66.248.222.34]) by mx.google.com with ESMTP id e15sm3794499qbe.2007.05.24.10.27.45; Thu, 24 May 2007 10:27:46 -0700 (PDT) In-Reply-To: <002301c79e0c$b719b560$999a020a@emagiahyd.com> References: <002301c79e0c$b719b560$999a020a@emagiahyd.com> Mime-Version: 1.0 (Apple Message framework v752.3) X-Priority: 3 Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <39A3B16F-6D2C-4BDE-B880-F8E16DF72030@apache.org> Content-Transfer-Encoding: 7bit From: Marc Prud'hommeaux Subject: Re: Help: Failing the build when written orm.xml file Date: Thu, 24 May 2007 10:27:35 -0700 To: open-jpa-dev@incubator.apache.org X-Mailer: Apple Mail (2.752.3) Sender: Marc Prud'hommeaux X-Virus-Checked: Checked by ClamAV on apache.org Praveen- On May 24, 2007, at 7:06 AM, Praveen G wrote: > 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". Nothing strikes me as being incorrect about your persistence.xml or orm.xml. Are these files available in the META-INF/ directory at the root of one of your classpaths? How are you running the enhancer? If you can run it with verbose logging (e.g., by setting the property "openjpa.Log: DefaultLevel=TRACE"), can you send us the output, as well as the exact setting of your CLASSPATH environment variable and the location of your persistence.xml and orm.xml files? > 2. To make an entity readonly in an application(described below). We don't have any support for declaring that an object be read-only. Can you describe more in-depth the scenario in which you need to have instances be marked read-only (as opposed to being just de-facto read- only by way of just never making changes to the instances)? > 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 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 > > > table="CGSS_ROLE"> > > So please help us as soon as possible, to make an entity readonly. > > Thanks, > Praveen Kumar. > > > >