Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 54150 invoked from network); 6 Mar 2009 17:28:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Mar 2009 17:28:18 -0000 Received: (qmail 71330 invoked by uid 500); 6 Mar 2009 17:28:17 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 71308 invoked by uid 500); 6 Mar 2009 17:28: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 71297 invoked by uid 99); 6 Mar 2009 17:28:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Mar 2009 09:28:17 -0800 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.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Mar 2009 17:28:17 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id ECD5C234C4D3 for ; Fri, 6 Mar 2009 09:27:56 -0800 (PST) Message-ID: <684501684.1236360476968.JavaMail.jira@brutus> Date: Fri, 6 Mar 2009 09:27:56 -0800 (PST) From: "Jeremy Bauer (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Commented: (OPENJPA-932) Runtime enhancer doesn't work propery if there is a trailing persistence.xml file on the classpath. In-Reply-To: <809053699.1235159461806.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/OPENJPA-932?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12679657#action_12679657 ] Jeremy Bauer commented on OPENJPA-932: -------------------------------------- Comments on patch dated 2009-03-06 08:24 AM: - I don't think a new trace group should be added specifically for this warning. (OpenJPA trace groups are well documented in the manual, so if a new group would need to be doc'd if consensus is that a new group should be added.). While this exception shows up during enhancement, it is in product derivation code so openjpa.Runtime may be better? - I'm still struggling a bit with constructing a new config to get a logger, but OpenJPA doesn't really have anything configured at this point and I can't think of a cleaner way to get this important warning out there without other potentially messy changes. The null check is good, IMHO. The comment regarding its necessity can be removed. - The error message isn't completely clear as to what the problem is or how to fix it. I think wording which includes the notion that "persistence unit names should be unique" may help. (I'd say must, but as this problem points out, we don't enforce it) > Runtime enhancer doesn't work propery if there is a trailing persistence.xml file on the classpath. > --------------------------------------------------------------------------------------------------- > > Key: OPENJPA-932 > URL: https://issues.apache.org/jira/browse/OPENJPA-932 > Project: OpenJPA > Issue Type: Bug > Components: kernel > Affects Versions: 1.2.0, 2.0.0-M1, 2.0.0 > Reporter: Rick Curtis > Attachments: OPENJPA-932-2.0.patch > > > I have an application where I am using runtime class enhancement via the javaagent and I set openjpa.RuntimeUnenhancedClasses=unsupported. My application works fine when running on 1.1.0 but when I moved to 1.2.0 (and 2.0.0) I started getting errors because my classes aren't being enhanced. > After debugging I determined that I had a jar on the end of my classpath that had a META-INF/persistence.xml file in it. The extra persistence.xml file has no PUs defined, and should have been ignored. When I removed that jar from my classpath things starting working again. It also works if I put my META-INF/persistence.xml file on the end of my classpath. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.