Return-Path: X-Original-To: apmail-karaf-dev-archive@minotaur.apache.org Delivered-To: apmail-karaf-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C578817849 for ; Tue, 3 Feb 2015 20:12:03 +0000 (UTC) Received: (qmail 7679 invoked by uid 500); 3 Feb 2015 20:12:04 -0000 Delivered-To: apmail-karaf-dev-archive@karaf.apache.org Received: (qmail 7637 invoked by uid 500); 3 Feb 2015 20:12:04 -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 7625 invoked by uid 99); 3 Feb 2015 20:12:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Feb 2015 20:12:04 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of giuseppe.gerla@gmail.com designates 209.85.213.169 as permitted sender) Received: from [209.85.213.169] (HELO mail-ig0-f169.google.com) (209.85.213.169) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Feb 2015 20:11:38 +0000 Received: by mail-ig0-f169.google.com with SMTP id hl2so26980217igb.0 for ; Tue, 03 Feb 2015 12:11:37 -0800 (PST) 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=seM5pZa9JWTcjy/8VSDli4wNuUAPcbCDdB5U2kHle/k=; b=S7aUiy4unvVfO/Lf+5YzPwf4oZNMx/GITeTSfdPsoqtksLAAWwDC6D1tOcUPZ6zEGH lsdd7F4tD6jLBDZ+/3cHJ/9q8wNKzlL59jADOJXkxf7XUj7Nw7k/11NCCeJG+C8cZh9T 4/INovXwn8mVk8YLpXur5xtyyhas2G2oCGQS5hjYdezThpGj/jBSy5FC2kcPPR4rhhqG HZboueosCJkdAvoV7diwUgU3RJzPhe4tuPE6t/cesh1d+dQhWCxUxZM4GlpCwz3vOC4c PH6rO7b+Hwq86Sm8XYUO4fZy+/cmbUgOdGZE6FEm6+b0ZAgijJXKa/xC1LH2l+VXFskl 4gDg== MIME-Version: 1.0 X-Received: by 10.50.143.44 with SMTP id sb12mr20062593igb.3.1422994296927; Tue, 03 Feb 2015 12:11:36 -0800 (PST) Received: by 10.107.36.193 with HTTP; Tue, 3 Feb 2015 12:11:36 -0800 (PST) In-Reply-To: References: <54D0F3E5.4020002@nanthrax.net> <54D10005.1010700@nanthrax.net> <8C756173-4931-41FF-AD1B-EF9D999D0FF2@jlab.com.ar> <54D10B72.5070107@nanthrax.net> Date: Tue, 3 Feb 2015 21:11:36 +0100 Message-ID: Subject: Re: Aries JPA feature and Eclipselink conflict From: Giuseppe Gerla To: dev@karaf.apache.org Content-Type: multipart/alternative; boundary=001a1134be8c95fc42050e34ad8c X-Virus-Checked: Checked by ClamAV on apache.org --001a1134be8c95fc42050e34ad8c Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi all @Rodrigo thanks for suggestion. @JB What do you think about creating a new feature in Karaf for EclipseLink= ? Can be something like this
JPA 2.1 implementation provided by Apache Aries JPA and Eclipselink ${eclipselink-version} JPA provider
transaction mvn:org.eclipse.persistence/javax.persistence/2.= 1.0 mvn:org.apache.aries.jpa/org.apache.aries= .jpa.api/1.0.2 mvn:org.apache.aries.jpa/org.apache.aries= .jpa.blueprint.aries/1.0.4 mvn:org.apache.aries.jpa/org.apache.aries= .jpa.container/1.0.2 mvn:org.apache.aries.jpa/org.apache.aries= .jpa.container.context/1.0.4 mvn:org.apache.aries.jpa/org.apache.aries= .jpa.container.itest.bundle.eclipselink/1.0.0 mvn:org.eclipse.persistence/org.eclipse.persistence.antl= r/${eclipselink-version} mvn:org.eclipse.persistence/org.eclipse.p= ersistence.asm/${eclipselink-version} mvn:org.eclipse.persistence/org.eclipse.p= ersistence.core/${eclipselink-version} mvn:org.eclipse.persistence/org.eclipse.p= ersistence.jpa.jpql/${eclipselink-version} mvn:org.eclipse.persistence/org.eclipse.p= ersistence.jpa/${eclipselink-version}
Note that in this case it must be deployed also the aries eclipselink adapter. regards Giuseppe 2015-02-03 19:17 GMT+01:00 Rodrigo Serra : > Yes, is correct. The feature i develop copy jpa feature definition from > karaf enterprise, change jpa-api-hibernate to eclipselink one, and add al= l > other eclipselink dependencies. Is the only way because eclipselink wired= . > > Regards, > Rodrigo > > > El 3/2/2015, a las 14:54, Jean-Baptiste Onofr=C3=A9 > escribi=C3=B3: > > > > In that case, eclipselink feature should not depend to the jpa feature > and install its own spec bundle (it's weird anyway ;)). > > > > Regards > > JB > > > > On 02/03/2015 06:34 PM, Rodrigo Serra wrote: > >> Hello, > >> > >> Eclipselink need they own jpa spec bundle because others eclipselink > bundle has direct relation with it. See here: > https://bitbucket.org/rmserra/karaf-eclipselink < > https://bitbucket.org/rmserra/karaf-eclipselink>< > https://bitbucket.org/rmserra/karaf-eclipselink < > https://bitbucket.org/rmserra/karaf-eclipselink>> > >> > >> Regards, > >> Rodrigo > >> > >>> El 3/2/2015, a las 14:17, Giuseppe Gerla > escribi=C3=B3: > >>> > >>> no > >>> if I digit the command > >>> karaf@root> list -t 0 | grep gero > >>> [ 56] [Active ] [ ] [ 30] geronimo-jta_1.1_spec > (1.1.1) > >>> [ 70] [Active ] [ ] [ 80] geronimo-jms_1.1_spec > (1.1.1) > >>> [ 95] [Active ] [ ] [ 50] > geronimo-annotation_1.0_spec > >>> (1.1.1) > >>> [ 96] [Active ] [ ] [ 50] > >>> geronimo-j2ee-management_1.1_spec (1.0.1) > >>> [ 115] [Active ] [ ] [ 50] > >>> geronimo-j2ee-connector_1.5_spec (2.0.0) > >>> > >>> > >>> The only JPA api bundle is hibernate 2.1 > >>> > >>> I think that the problem is in eclipselink import package > >>> > >>> Import-Package: javax.naming;resolution:=3Doptional,javax.persistence= ;jp > >>> a=3D"2.1";version=3D"[1.1.0,2.2)",javax.persistence.criteria;jpa=3D"2= .1";ve > >>> rsion=3D"[1.1.0,2.2)",javax.persistence.metamodel;jpa=3D"2.1";.... > >>> > >>> > >>> As you can see they specified the jpa=3D"2.1" that is not present in = the > >>> export package of hibernate api: > >>> > >>> Export-Package: javax.persistence;uses:=3D"javax.persistence.metamode= l,j > >>> avax.persistence.criteria,javax.persistence.spi";version=3D"2.1.0",ja= va > >>> x.persistence.criteria;uses:=3D"javax.persistence.metamodel,javax.per= si > >>> stence";version=3D"2.1.0",javax.persistence.metamodel;version=3D"2.1.= 0",j > >>> avax.persistence.spi;uses:=3D"javax.persistence,javax.sql";version=3D= "2.1 > >>> .0" > >>> > >>> > >>> Regards > >>> Giuseppe > >>> > >>> 2015-02-03 18:06 GMT+01:00 Jean-Baptiste Onofr=C3=A9 : > >>> > >>>> For me, it doesn't seem related specifically to the hibernate API > bundle, > >>>> but more for the version. > >>>> > >>>> So, you use the jpa 2.0 feature (using the Geronimo Spec bundle) ? > >>>> > >>>> Regards > >>>> JB > >>>> > >>>> > >>>> On 02/03/2015 06:03 PM, Giuseppe Gerla wrote: > >>>> > >>>>> I don't know if there is an EclipseLink feature. > >>>>> As you can see in my feature I define each bundle manually. > >>>>> The problem is that EclipseLink bundles don't work with hibernate > api. It > >>>>> shows this error > >>>>> > >>>>> karaf@root> ERROR: Bundle org.eclipse.persistence.jpa [130] Error > >>>>> starting > >>>>> mvn:org.eclipse.persistence/org.eclipse.persistence.jpa/2.5.2 > >>>>> (org.osgi.framework.BundleException: Unresolved constraint in bundl= e > >>>>> org.eclipse.persistence.jpa [130]: Unable to resolve 130.0: missing > >>>>> requirement [130.0] osgi.wiring.package; > >>>>> (&(osgi.wiring.package=3Djavax.persistence)(jpa=3D2.1)(version> > >>>>> =3D1.1.0)(!(version>=3D2.2.0)) > >>>>> )) > >>>>> org.osgi.framework.BundleException: Unresolved constraint in bundle > >>>>> org.eclipse.persistence.jpa [130]: Unable to resolve 130.0: missing > >>>>> requirement [130.0] osgi.wiring.package; (&(osgi.wiring.package=3D > >>>>> javax.persistence)(jpa=3D2.1)(version>=3D1.1.0)(!(version>=3D2.2.0)= )) > >>>>> at > >>>>> > org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4002) > >>>>> at > org.apache.felix.framework.Felix.startBundle(Felix.java:2045) > >>>>> at > >>>>> org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:129= 9) > >>>>> at > >>>>> org.apache.felix.framework.FrameworkStartLevelImpl.run( > >>>>> FrameworkStartLevelImpl.java:304) > >>>>> at java.lang.Thread.run(Thread.java:745) > >>>>> > >>>>> > >>>>> Regards > >>>>> Giuseppe > >>>>> > >>>>> > >>>>> 2015-02-03 17:14 GMT+01:00 Jean-Baptiste Onofr=C3=A9 : > >>>>> > >>>>> Hi, > >>>>>> > >>>>>> we can do a conditional feature. > >>>>>> > >>>>>> The jpa feature (JPA 2.1) installs the Hibernate JPA 2.1 spec > bundle. > >>>>>> > >>>>>> Does it mean that EclipseLink feature install its own JPA spec > bundle ? > >>>>>> > >>>>>> Regards > >>>>>> JB > >>>>>> > >>>>>> > >>>>>> On 02/03/2015 05:10 PM, Giuseppe Gerla wrote: > >>>>>> > >>>>>> Hi all > >>>>>>> I need to use Aries-JPA in combination with eclipselink and mysql= . > >>>>>>> I prepare following feature to install all dependency. > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> transaction > >>>>>>> jndi > >>>>>>> jpa > >>>>>>> jms > >>>>>>> > >>>>>>> > >>>>>>> >>>>>>> start-level=3D'30'>mvn:org.apache.aries.jpa/org.apache. > >>>>>>> aries.jpa.eclipselink.adapter/1.0.0-SNAPSHOT > >>>>>>> > >>>>>>> mvn:org.apache.servicemix.bundles/org.apache. > >>>>>>> servicemix.bundles.commons-dbcp/1.4_3 > >>>>>>> > >>>>>>> mvn:mysql/mysql-connector-java/${mysql.connector.version} > >>>>>>> > >>>>>>> > >>>>>>> mvn:org.eclipse.persistence/javax.persistence/ > >>>>>>> ${jpa.eclipselink.version} > >>>>>>> > >>>>>>> > mvn:org.eclipse.persistence/org.eclipse.persistence.antlr/${ > >>>>>>> eclipselink.version} > >>>>>>> > >>>>>>> mvn:org.eclipse.persistence/org.eclipse. > >>>>>>> persistence.asm/${eclipselink.version} > >>>>>>> > >>>>>>> mvn:org.eclipse.persistence/org.eclipse.persistence.core/= ${ > >>>>>>> eclipselink.version} > >>>>>>> > >>>>>>> mvn:org.eclipse.persistence/org.eclipse. > >>>>>>> persistence.jpa/${eclipselink.version} > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> The problem is that after the installation of this feature, I hav= e > to > >>>>>>> manually uninstall > >>>>>>> > >>>>>>> mvn: org.hibernate.javax.persistence / hibernate-jpa-2.1-api / > >>>>>>> 1.0.0.Final > >>>>>>> > >>>>>>> contained in the jpa feature because it is in conflict with > >>>>>>> > >>>>>>> mvn: org.eclipse.persistence / javax.persistence / 2.1.0 > >>>>>>> > >>>>>>> which is necessary for EclipseLink. > >>>>>>> > >>>>>>> > >>>>>>> Is it possible to uninstall the hibernate bundle automatically? I= s > it > >>>>>>> possible install jpa feature excluding hibernate bundle? > >>>>>>> > >>>>>>> > >>>>>>> Thanks > >>>>>>> Regards > >>>>>>> Giuseppe > >>>>>>> > >>>>>>> > >>>>>>> -- > >>>>>> Jean-Baptiste Onofr=C3=A9 > >>>>>> jbonofre@apache.org > >>>>>> http://blog.nanthrax.net > >>>>>> Talend - http://www.talend.com > >>>>>> > >>>>>> > >>>>> > >>>> -- > >>>> Jean-Baptiste Onofr=C3=A9 > >>>> jbonofre@apache.org > >>>> http://blog.nanthrax.net > >>>> Talend - http://www.talend.com > >>>> > >> > >> > > > > -- > > Jean-Baptiste Onofr=C3=A9 > > jbonofre@apache.org > > http://blog.nanthrax.net > > Talend - http://www.talend.com > --001a1134be8c95fc42050e34ad8c--