karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rodrigo Serra <rodrigo.se...@jlab.com.ar>
Subject Re: Aries JPA feature and Eclipselink conflict
Date Tue, 03 Feb 2015 18:17:30 GMT
Yes, is correct. The feature i develop copy jpa feature definition from karaf enterprise, change
jpa-api-hibernate to eclipselink one, and add all other eclipselink dependencies. Is the only
way because eclipselink wired.

Regards,
Rodrigo

> El 3/2/2015, a las 14:54, Jean-Baptiste Onofré <jb@nanthrax.net> escribió:
> 
> 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 <giuseppe.gerla@gmail.com> escribió:
>>> 
>>> 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:=optional,javax.persistence;jp
>>> a="2.1";version="[1.1.0,2.2)",javax.persistence.criteria;jpa="2.1";ve
>>> rsion="[1.1.0,2.2)",javax.persistence.metamodel;jpa="2.1";....
>>> 
>>> 
>>> As you can see they specified the jpa="2.1" that is not present in the
>>> export package of hibernate api:
>>> 
>>> Export-Package: javax.persistence;uses:="javax.persistence.metamodel,j
>>> avax.persistence.criteria,javax.persistence.spi";version="2.1.0",java
>>> x.persistence.criteria;uses:="javax.persistence.metamodel,javax.persi
>>> stence";version="2.1.0",javax.persistence.metamodel;version="2.1.0",j
>>> avax.persistence.spi;uses:="javax.persistence,javax.sql";version="2.1
>>> .0"
>>> 
>>> 
>>> Regards
>>> Giuseppe
>>> 
>>> 2015-02-03 18:06 GMT+01:00 Jean-Baptiste Onofré <jb@nanthrax.net>:
>>> 
>>>> 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 bundle
>>>>> org.eclipse.persistence.jpa [130]: Unable to resolve 130.0: missing
>>>>> requirement [130.0] osgi.wiring.package;
>>>>> (&(osgi.wiring.package=javax.persistence)(jpa=2.1)(version>
>>>>> =1.1.0)(!(version>=2.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=
>>>>> javax.persistence)(jpa=2.1)(version>=1.1.0)(!(version>=2.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:1299)
>>>>>         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é <jb@nanthrax.net>:
>>>>> 
>>>>> 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.
>>>>>>> 
>>>>>>> 
>>>>>>> <feature name="jpa-requirements" version="1.0.0">
>>>>>>> <feature>transaction</feature>
>>>>>>> <feature>jndi</feature>
>>>>>>> <feature>jpa</feature>
>>>>>>> <feature>jms</feature>
>>>>>>> 
>>>>>>> 
>>>>>>> <bundle
>>>>>>> start-level='30'>mvn:org.apache.aries.jpa/org.apache.
>>>>>>> aries.jpa.eclipselink.adapter/1.0.0-SNAPSHOT
>>>>>>> </bundle>
>>>>>>> <bundle>mvn:org.apache.servicemix.bundles/org.apache.
>>>>>>> servicemix.bundles.commons-dbcp/1.4_3
>>>>>>> </bundle>
>>>>>>> <bundle>mvn:mysql/mysql-connector-java/${mysql.connector.version}
>>>>>>> </bundle>
>>>>>>> 
>>>>>>> <bundle>mvn:org.eclipse.persistence/javax.persistence/
>>>>>>> ${jpa.eclipselink.version}
>>>>>>> </bundle>
>>>>>>> <bundle>mvn:org.eclipse.persistence/org.eclipse.persistence.antlr/${
>>>>>>> eclipselink.version}
>>>>>>> </bundle>
>>>>>>> <bundle>mvn:org.eclipse.persistence/org.eclipse.
>>>>>>> persistence.asm/${eclipselink.version}
>>>>>>> </bundle>
>>>>>>> <bundle>mvn:org.eclipse.persistence/org.eclipse.persistence.core/${
>>>>>>> eclipselink.version}
>>>>>>> </bundle>
>>>>>>> <bundle>mvn:org.eclipse.persistence/org.eclipse.
>>>>>>> persistence.jpa/${eclipselink.version}
>>>>>>> </bundle>
>>>>>>> </bundle>
>>>>>>> </feature>
>>>>>>> 
>>>>>>> 
>>>>>>> The problem is that after the installation of this feature, I
have 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?
Is it
>>>>>>> possible install jpa feature excluding hibernate bundle?
>>>>>>> 
>>>>>>> 
>>>>>>> Thanks
>>>>>>> Regards
>>>>>>> Giuseppe
>>>>>>> 
>>>>>>> 
>>>>>>> --
>>>>>> Jean-Baptiste Onofré
>>>>>> jbonofre@apache.org
>>>>>> http://blog.nanthrax.net
>>>>>> Talend - http://www.talend.com
>>>>>> 
>>>>>> 
>>>>> 
>>>> --
>>>> Jean-Baptiste Onofré
>>>> jbonofre@apache.org
>>>> http://blog.nanthrax.net
>>>> Talend - http://www.talend.com
>>>> 
>> 
>> 
> 
> -- 
> Jean-Baptiste Onofré
> jbonofre@apache.org <mailto:jbonofre@apache.org>
> http://blog.nanthrax.net <http://blog.nanthrax.net/>
> Talend - http://www.talend.com <http://www.talend.com/>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message