Return-Path: X-Original-To: apmail-openjpa-dev-archive@www.apache.org Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1733C98A0 for ; Thu, 2 Feb 2012 16:31:18 +0000 (UTC) Received: (qmail 60188 invoked by uid 500); 2 Feb 2012 16:31:17 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 60138 invoked by uid 500); 2 Feb 2012 16:31:17 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 60125 invoked by uid 99); 2 Feb 2012 16:31:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Feb 2012 16:31:17 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Feb 2012 16:31:15 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 4AC8B188847 for ; Thu, 2 Feb 2012 16:30:54 +0000 (UTC) Date: Thu, 2 Feb 2012 16:30:54 +0000 (UTC) From: "Albert Lee (Closed) (JIRA)" To: dev@openjpa.apache.org Message-ID: <742667344.3309.1328200254307.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Closed] (OPENJPA-1778) Improved error information for unenhanced classes. 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/OPENJPA-1778?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Albert Lee closed OPENJPA-1778. ------------------------------- Close issue in preparation for 2.2.0 release. > Improved error information for unenhanced classes. > --------------------------------------------------- > > Key: OPENJPA-1778 > URL: https://issues.apache.org/jira/browse/OPENJPA-1778 > Project: OpenJPA > Issue Type: Improvement > Components: Enhance, jpa > Affects Versions: 2.0.0 > Reporter: Rick McGuire > Assignee: Rick Curtis > Priority: Minor > Fix For: 2.1.1, 2.2.0 > > > The exception message issued by openjpa 2.0 for the use of an unenhanced class is not as useful as the message issued by the 1.x versions. In 2.0, the following message is received: > 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 > While the same application run using openjpa 1.x gives this message: > org.apache.openjpa.persistence.ArgumentException: No metadata was found for type "class org.apache.sample.entities.Book". The class does not appear in the list of persistent types: [org.apache.geronimo.sample.entities.Book]. > The 2.0 message no longer points to the persistence.xml definition as the potential source of error. It should give some possible solutions to "Ensure that is has been enhanced". Perhaps something like "Ensure that the class is included in the list of persistent types or enhanced as part of the application build". -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira