Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 91809 invoked from network); 13 Dec 2010 19:20:32 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 13 Dec 2010 19:20:32 -0000 Received: (qmail 41845 invoked by uid 500); 13 Dec 2010 19:20:31 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 41801 invoked by uid 500); 13 Dec 2010 19:20:31 -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 41792 invoked by uid 99); 13 Dec 2010 19:20:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Dec 2010 19:20:30 +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; Mon, 13 Dec 2010 19:20:28 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id oBDJK6b5002892 for ; Mon, 13 Dec 2010 19:20:07 GMT Message-ID: <18802527.97011292268006658.JavaMail.jira@thor> Date: Mon, 13 Dec 2010 14:20:06 -0500 (EST) From: "Jody Grassel (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Work started: (OPENJPA-1905) jar-file validation should be deferred until after OpenJPA is confirmed to be the application's chosen provider In-Reply-To: <16034801.65881292017140726.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/OPENJPA-1905?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Work on OPENJPA-1905 started by Jody Grassel. > jar-file validation should be deferred until after OpenJPA is confirmed to be the application's chosen provider > --------------------------------------------------------------------------------------------------------------- > > Key: OPENJPA-1905 > URL: https://issues.apache.org/jira/browse/OPENJPA-1905 > Project: OpenJPA > Issue Type: Bug > Components: usability, validation > Affects Versions: 1.2.0, 1.2.1, 1.2.2, 2.0.0, 2.0.1 > Reporter: Jody Grassel > Assignee: Jody Grassel > Priority: Minor > > While processing a persistence-unit definition in persistence.xml requested by an invocation of PersistenceProvider.createEntityManagerFactory(), validation of elements such as take place during the execution of the SAXParser. If an entry named by the element does not exist, a GeneralException originating from the SAXException fails the createEMF() operation -- the expected and correct behavior in such a situation. > However, this validation occurs before OpenJPA checks to see if it is the JPA Provider requested by the Application. This means that OpenJPA throws this Exception regardless to the fact that the PU may have defined a element requesting a JPA provider other then OpenJPA -- instead of returning the expected null value as expected by the contract. > Thus, there needs to be a change where the first item validated is the requested provider, immediately returning null as per JPA Spec contract if OpenJPA is not the requested provider. This would cause the error in the scenario described above to be reported by the requested JPA provider, instead of short-circuiting the process as can happen currently. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.