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 41474704E for ; Tue, 13 Dec 2011 21:26:03 +0000 (UTC) Received: (qmail 58367 invoked by uid 500); 13 Dec 2011 21:26:03 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 58319 invoked by uid 500); 13 Dec 2011 21:26:03 -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 58311 invoked by uid 99); 13 Dec 2011 21:26:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Dec 2011 21:26:03 +0000 X-ASF-Spam-Status: No, hits=-2001.5 required=5.0 tests=ALL_TRUSTED,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; Tue, 13 Dec 2011 21:25:53 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 8275E1101AE for ; Tue, 13 Dec 2011 21:25:31 +0000 (UTC) Date: Tue, 13 Dec 2011 21:25:31 +0000 (UTC) From: "Jody Grassel (Work started) (JIRA)" To: dev@openjpa.apache.org Message-ID: <508576421.7466.1323811531535.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <391482088.7463.1323811531446.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Work started] (OPENJPA-2094) Metadata processing needs to support jar:file URLs that address Jar directories 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-2094?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Work on OPENJPA-2094 started by Jody Grassel. > Metadata processing needs to support jar:file URLs that address Jar directories > ------------------------------------------------------------------------------- > > Key: OPENJPA-2094 > URL: https://issues.apache.org/jira/browse/OPENJPA-2094 > Project: OpenJPA > Issue Type: Bug > Components: lib > Reporter: Jody Grassel > Assignee: Jody Grassel > > The JPA specification makes the following assertion about PersistenceUnitInfo's PersistenceUnitRootUrl value: > /** > * Returns the URL for the jar file or directory that is the > * root of the persistence unit. (If the persistence unit is > * rooted in the WEB-INF/classes directory, this will be the > * URL of that directory.) > * The URL will either be a file: URL referring to a jar file > * or referring to a directory that contains an exploded jar > * file, or some other URL from which an InputStream in jar > * format can be obtained. > * > * @return a URL referring to a jar file or directory. > */ > public URL getPersistenceUnitRootUrl(); > Currently, OpenJPA supports the following URL patterns: > 1) file: URL which addresses a jar file or an exploded jar file (directory) > 2) jar: URL which addresses a jar file that terminates with "!/" (i.e., jar:file:somepath/myjar!/) > 3) Any URL that ends with ".jar" > What it does not support is a jar URL of this pattern: jar:file:somepath/myjar!/WEB-INF/classes > OpenJPA's AbstractCFMetaDataFactory.parsePersistentTypeNames() method will find that the > URL doesn't match the three scenarios listed above, and defaults to attempting to parse it as an > XML file, which is obviously not an appropriate behavior for processing a Jar file. > The "jar:file:somepath/myjar!/WEB-INF/classes" pattern must be supported to accommodate > J2EE application servers that pass such a URL into PersistenceUnitInfo._persistenceUnitRootUrl -- 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