Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 8FDBE200BC5 for ; Tue, 22 Nov 2016 20:30:02 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 8E89C160B0C; Tue, 22 Nov 2016 19:30:02 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D8349160AF1 for ; Tue, 22 Nov 2016 20:30:01 +0100 (CET) Received: (qmail 2092 invoked by uid 500); 22 Nov 2016 19:29:56 -0000 Mailing-List: contact dev-help@karaf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@karaf.apache.org Delivered-To: mailing list dev@karaf.apache.org Received: (qmail 2080 invoked by uid 99); 22 Nov 2016 19:29:56 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Nov 2016 19:29:56 +0000 Received: from mail-oi0-f52.google.com (mail-oi0-f52.google.com [209.85.218.52]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id C9BB61A00A8 for ; Tue, 22 Nov 2016 19:29:55 +0000 (UTC) Received: by mail-oi0-f52.google.com with SMTP id w63so29362366oiw.0 for ; Tue, 22 Nov 2016 11:29:55 -0800 (PST) X-Gm-Message-State: AKaTC037Dc0uT9QZfaAEN4cm38ExM4TEHKldKttyC+t6xipakWQUuBeWFydmbeCy4iZxAOuszk20GqKQbkFJzQ== X-Received: by 10.202.244.214 with SMTP id s205mr12546526oih.70.1479842994934; Tue, 22 Nov 2016 11:29:54 -0800 (PST) MIME-Version: 1.0 Received: by 10.182.49.3 with HTTP; Tue, 22 Nov 2016 11:29:34 -0800 (PST) In-Reply-To: References: From: Guillaume Nodet Date: Tue, 22 Nov 2016 20:29:34 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: java.transaction.xa not exported? To: dev Content-Type: multipart/alternative; boundary=001a1134fec2095bd50541e8cc2a archived-at: Tue, 22 Nov 2016 19:30:02 -0000 --001a1134fec2095bd50541e8cc2a Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Yes, the long answer is the following: * the javax.transaction.xa package provided by the JRE is incomplete * it contains a few classes used by the jdbc package * if the system bundle exports this package, users will hit NoClassDefFoundError because of the missing class * if the classes from the JRE are not used, there will be ClassCastException when using JDBC because the jdbc package uses the classes from the JRE while the driver deployed as an OSGi bundle will use the classes deployed as a bundle The only solution is the one used in karaf since years: - the system bundle exports javax.transaction; javax.transaction.xa; partial=3Dtrue; mandatory:=3Dpartial This means that the package is exported but not really usable - the system bundle boot delegate javax.transaction and javax.transaction.xa - users should deploy a bundle such as mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1 to provide the full packages 2016-11-22 19:49 GMT+01:00 Achim Nierbeck : > There is a Pax-JDBC Postgres feature, which also includes the Aries TX > because of that. [1] > > regards, Achim > > [1] - > https://github.com/ops4j/org.ops4j.pax.jdbc/blob/master/ > pax-jdbc-features/src/main/resources/features.xml#L83-L90 > > 2016-11-22 19:45 GMT+01:00 Guillaume Nodet : > > > The package provided by the JRE is incomplete so you need to deploy the > XA > > api separately. > > > > 2016-11-22 19:42 GMT+01:00 Fabian Lange : > > > > > Hi, > > > i just tried to use the new postgres driver for java 8: > > > > > > Error executing command: Error executing command on bundles: > > > Error starting bundle 101: Unable to resolve org.postgresql.jdbc42 > > [101](R > > > 101.0): missing requirement [org.postgresql.jdbc42 [101](R 101.0)] > > > osgi.wiring.package; (osgi.wiring.package=3Djavax.transaction.xa) > > Unresolved > > > requirements: [[org.postgresql.jdbc42 [101](R 101.0)] > > osgi.wiring.package; > > > (osgi.wiring.package=3Djavax.transaction.xa)] > > > > > > I see the .xa package is not exported in bootdelegation. I searched f= or > > > this and could not find any reason it is not. is it just missing or i= s > > > there a deeper reason? > > > Fabian > > > > > > -- > > > Fabian Lange | Performance Expert > > > mobil: +49 (0) 160.3673393 > > > > > > codecentric AG | Merscheider Stra=C3=9Fe 1 | 42699 Solingen | Deutsch= land > > > > > > Sitz der Gesellschaft: Solingen | HRB 25917| Amtsgericht Wuppertal > > > Vorstand: Michael Hochg=C3=BCrtel . Mirko Novakovic . Rainer Vehns > > > Aufsichtsrat: Patric Fedlmeier (Vorsitzender) . Klaus J=C3=A4ger . J= =C3=BCrgen > > Sch=C3=BCtz > > > > > > > > > > > -- > > ------------------------ > > Guillaume Nodet > > ------------------------ > > Red Hat, Open Source Integration > > > > Email: gnodet@redhat.com > > Web: http://fusesource.com > > Blog: http://gnodet.blogspot.com/ > > > > > > -- > > Apache Member > Apache Karaf Committer & PMC > OPS4J Pax Web Committer & > Project Lead > blog > Co-Author of Apache Karaf Cookbook > > Software Architect / Project Manager / Scrum Master > --=20 ------------------------ Guillaume Nodet ------------------------ Red Hat, Open Source Integration Email: gnodet@redhat.com Web: http://fusesource.com Blog: http://gnodet.blogspot.com/ --001a1134fec2095bd50541e8cc2a--