karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré ...@nanthrax.net>
Subject Re: Aries JPA feature and Eclipselink conflict
Date Tue, 03 Feb 2015 17:06:13 GMT
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

Mime
View raw message