Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 35737 invoked from network); 26 Aug 2010 18:51:33 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 26 Aug 2010 18:51:33 -0000 Received: (qmail 53694 invoked by uid 500); 26 Aug 2010 18:51:33 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 53651 invoked by uid 500); 26 Aug 2010 18:51:33 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 53644 invoked by uid 99); 26 Aug 2010 18:51:32 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Aug 2010 18:51:32 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Aug 2010 18:51:15 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o7QIorZG015960 for ; Thu, 26 Aug 2010 18:50:54 GMT Message-ID: <3176763.10781282848653888.JavaMail.jira@thor> Date: Thu, 26 Aug 2010 14:50:53 -0400 (EDT) From: "Donald Woods (JIRA)" To: dev@geronimo.apache.org Subject: [jira] Commented: (GERONIMO-5553) Fail to enchance entities on Geronimo In-Reply-To: <2123593.901282808572948.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/GERONIMO-5553?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12902980#action_12902980 ] Donald Woods commented on GERONIMO-5553: ---------------------------------------- I decompiled your org.apache.sample.entities.Book.class and did not see that it had been enhanced. In OpenJPA 2.0, we have turned RuntimeUnenhancedClasses off/unsupported by default (it was enabled in 1.0 and 1.2) - http://openjpa.apache.org/builds/2.0.0/apache-openjpa-2.0.0/docs/manual/manual.html#openjpa.RuntimeUnenhancedClasses To enable runtime enhancement (which we strongly discourage for production applications), you need to update your persistence.xml to set the following property - . . . The better solution, is to use build time enhancement, which can be done via ANT, Maven plugin or Eclipse plugin - http://openjpa.apache.org/entity-enhancement.html > Fail to enchance entities on Geronimo > ------------------------------------- > > Key: GERONIMO-5553 > URL: https://issues.apache.org/jira/browse/GERONIMO-5553 > Project: Geronimo > Issue Type: Bug > Security Level: public(Regular issues) > Components: persistence > Affects Versions: 3.0 > Environment: OS:win xp > Geronimo :3.0 20100824 build > Reporter: Lu Jiang > Fix For: 3.0 > > Attachments: booknew.war > > > I tried to deploy a simple jpa sample on geronimo.But when persist data into database. > Following exception will occur. > org.apache.openjpa.persistence.ArgumentException: Attempt to cast instance "org.apache.sample.entities.Book@97781f" to PersistenceCapable failed. Ensure that it has been enhanced. > FailedObject: org.apache.sample.entities.Book@97781f -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.