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 90A9A102AA for ; Wed, 5 Jun 2013 13:23:28 +0000 (UTC) Received: (qmail 72648 invoked by uid 500); 5 Jun 2013 13:23:28 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 72482 invoked by uid 500); 5 Jun 2013 13:23:25 -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 72444 invoked by uid 99); 5 Jun 2013 13:23:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Jun 2013 13:23:23 +0000 X-ASF-Spam-Status: No, hits=2.4 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of allee8285@gmail.com designates 209.85.192.180 as permitted sender) Received: from [209.85.192.180] (HELO mail-pd0-f180.google.com) (209.85.192.180) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Jun 2013 13:23:19 +0000 Received: by mail-pd0-f180.google.com with SMTP id 10so1826204pdi.11 for ; Wed, 05 Jun 2013 06:22:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=El9r1jRqV5Zl13+v4Ndfm73YOgFqmfPOWeNPMzY93sc=; b=DfePtdTLbq5KKVkV/jA5Eyz3OCQZmsSY6igb4+MUOOhjq+oBqeSJGRp6wrQyXhN2/W /6uo97+GNo7NGS0Z1uArDlOdK/pNMzRD+kg6RkLpbGTjHkLXwNlrbvaSwEtwt3VGSili qSKw1CUg7YDpLg0QtDxTGBdj2b3KN1PKkOUQ5iw5xGMxSf2JBFumaGJ4CNfZBi3R7Ew4 TuA9zdJHFGJKfGItPAQispAyvGnyVjCCMCMTK5ZgE5O4cf3XVe1bQlSLPwFKK3Zex7+d LrkL7ZGl7RFcUmczgkWVWOUNwPPoIVaTG4GTHqSpQMqYQmJS75fBDzaDUukB5SgkZeKy j5JA== MIME-Version: 1.0 X-Received: by 10.66.250.131 with SMTP id zc3mr33660549pac.157.1370438579271; Wed, 05 Jun 2013 06:22:59 -0700 (PDT) Received: by 10.70.91.194 with HTTP; Wed, 5 Jun 2013 06:22:59 -0700 (PDT) In-Reply-To: References: Date: Wed, 5 Jun 2013 08:22:59 -0500 Message-ID: Subject: Re: [jira] [Comment Edited] (OPENJPA-915) PCEnhancer cannot enhance an entity bean in a jar From: Albert Lee To: open-jpa-dev Content-Type: multipart/alternative; boundary=047d7b15ad79b43c6804de681822 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b15ad79b43c6804de681822 Content-Type: text/plain; charset=ISO-8859-1 I am not familiar with Karaf. From just browsing the Karaf home site, it looks like it is a osgi based runtime but without JPA container-managed persistence support. Therefore it does not perform runtime enhancement. Just a guess, I wonder if you can use -javaagent when launching Karaf so that the enhancer can be tapped into Karaf's runtime. On Wed, Jun 5, 2013 at 4:26 AM, yangjun (JIRA) wrote: > > [ > https://issues.apache.org/jira/browse/OPENJPA-915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13675735#comment-13675735] > > yangjun edited comment on OPENJPA-915 at 6/5/13 9:25 AM: > --------------------------------------------------------- > > I am now facing the same issue. > Right now MyEntity extends super class from dependency jar which could not > enhanced at build time. > Since I am using Karaf as container, there are no ways to introduce > runtime Enhancement as far as I could see. > Any body has opinions? > > was (Author: acyangjun): > I am now facing the same issue. > > > PCEnhancer cannot enhance an entity bean in a jar > > ------------------------------------------------- > > > > Key: OPENJPA-915 > > URL: https://issues.apache.org/jira/browse/OPENJPA-915 > > Project: OpenJPA > > Issue Type: Improvement > > Environment: linux, java 1.6.0_12 > > Reporter: Adam Hardy > > > > The PCEnhancer fails when trying to enhance an entity bean found in a > jar. It tries and fails to write the enhanced class output to the jar > rather than the build directory of the project. > > This means I cannot have my entity bean superclass in a seperate > framework-centric project for re-use by all JPA-based projects, unless I > enhance the class when jarring up the framework project. This would prevent > me from sharing the jar with other JPA-based projects which don't use > OpenJPA. > > I would recommend that the PCEnhancer checks the file path to write the > enhanced class to before writing and removes any Jar-prefix if present, > writing the class to the normal build directory. > > -- > This message is automatically generated by JIRA. > If you think it was sent incorrectly, please contact your JIRA > administrators > For more information on JIRA, see: http://www.atlassian.com/software/jira > -- Albert Lee. --047d7b15ad79b43c6804de681822--