Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 70490 invoked from network); 11 Jun 2009 20:56:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 11 Jun 2009 20:56:58 -0000 Received: (qmail 79331 invoked by uid 500); 11 Jun 2009 20:57:09 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 79233 invoked by uid 500); 11 Jun 2009 20:57:09 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 79215 invoked by uid 99); 11 Jun 2009 20:57:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Jun 2009 20:57:09 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gnodet@gmail.com designates 209.85.218.211 as permitted sender) Received: from [209.85.218.211] (HELO mail-bw0-f211.google.com) (209.85.218.211) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Jun 2009 20:56:59 +0000 Received: by bwz7 with SMTP id 7so1876003bwz.19 for ; Thu, 11 Jun 2009 13:56:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=MG+QtpKhoWIPJBltjQPDmxdmlUuqIjG3Gvaac1f887A=; b=lBUzRJPyocxIlTpc5uhy6inK+r9ZWbpjsIrfq7dtDvX6ZsrPfDP9kzwQzszpRY58gc zHZCnMcuGLYq8VcwZRQyC7qzAbMaF4cyUoK4y1DcBngeGcMiOI7pcqCHX//YIuQJgVWG E7pSc4u/MxgPNtsKw4nmqGR9lAJwwAq7ypMp4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=Dz2/iuoU/JT9oFe9PL1m2FQRgSYvF3crm40y8KsL7B0Pj5oQ1So+OGsbGJIAJ9ZYZW wTVUF9d9yvNQmb490soTSl1zPsLfXaInw83uitg/UjslXBGsFIBX8pqcGoM/aAfKv9iX h/MuhLR+bxhTRsTlRzJpvjtHUzAN0NCjdHEys= MIME-Version: 1.0 Received: by 10.223.126.10 with SMTP id a10mr2395190fas.17.1244753797895; Thu, 11 Jun 2009 13:56:37 -0700 (PDT) In-Reply-To: References: <5eb405c70906101058sc09bc66pb5d79d74a3b7696f@mail.gmail.com> Date: Thu, 11 Jun 2009 22:56:37 +0200 Message-ID: Subject: Re: jta spec bundle issue in felix From: Guillaume Nodet To: dev@geronimo.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Btw, not sure how you deployed the tx manager (if you did so), but there is an osgi bundle that i wrote to do that: http://svn.apache.org/repos/asf/felix/trunk/transaction/ On Thu, Jun 11, 2009 at 17:03, Guillaume Nodet wrote: > FWIW, Karaf solved the problem was explicitely removing the > javax.transaction package exported by the system bundle and deploying > the geronimo jta jar. > > On Wed, Jun 10, 2009 at 19:58, Jarek Gawor wrote: >> Hey all, >> >> I'm experimenting with JPA (OpenJPA specifically) in osgi environment >> and I ran into an interesting issue with the transaction API. The root >> of the problem is that the JDK provides a *subset* of the >> javax.transaction classes that the JTA specification defines. And that >> creates problems (i.e. java.lang.NoClassDefFoundError) at runtime >> depending on which bundle is used to wire in the transaction packages. >> >> The JVM transaction packages are exported via the system bundle (just >> like any other JVM package). On Felix, the JVM packages are exported >> with the version of the JVM you are running on (e.g. if you are >> running Java 5, the version attribute is set to 1.5.0). Our JTA spec >> bundle (geronimo-jta_1.1_spec-1.1.1.jar) exports the transaction API >> with version 1.1.0. >> >> Now, openjpa has the following javax.transaction imports: >> javax.transaction;version="1.1", javax.transaction.xa;version="1.1". >> On Felix, the container wires these imports using the system bundle >> since the system bundle exports these packages with higher version >> then the JTA bundle and that creates the NoClassDefFoundError >> problems. So, one would think that updating the version in our JTA >> spec bundle to something higher then 1.5 or 1.6 should work. And I >> think that should work but it doesn't seem to be working right on >> Felix. I don't know if this is a bug or if I'm just missing something >> or doing things wrong. When I install the openjpa bundle for the first >> time, its transaction imports get wired to our JTA bundle. But once I >> restart Felix, the openjpa transaction imports are wired to the system >> bundle.... maybe somebody knows what's going on here? >> >> Interestingly enough, Equinox exposes the JVM packages with version >> 0.0.0 and so I don't run into these NoClassDefFoundError errors there. >> >> One thing that worked for me reliably is when I updated the JTA spec >> bundle to be a fragment bundle (attaching itself to the system >> bundle). That way, the missing transaction classes can be loaded >> through the system bundle classloader. So, I'm wondering if we should >> turn the JTA spec bundle into a fragment bundle (just manifest >> updates) to deal with this problem? >> >> Jarek >> > > > > -- > Cheers, > Guillaume Nodet > ------------------------ > Blog: http://gnodet.blogspot.com/ > ------------------------ > Open Source SOA > http://fusesource.com > -- Cheers, Guillaume Nodet ------------------------ Blog: http://gnodet.blogspot.com/ ------------------------ Open Source SOA http://fusesource.com