May be this help. I use this feature tu run eclipselink 2.5.2 with karaf 3.0.2.
Maven properties:
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<netbeans.hint.license>apache20</netbeans.hint.license>
<karaf.version>3.0.2</karaf.version>
<eclipselink-version>2.5.2</eclipselink-version>
</properties>
Feature
<feature name="jpa-eclipselink" version="1.0.2" description="OSGi
Persistence Container with Eclipselnk provider">
<details>
JPA 2.1 implementation provided by Apache Aries JPA 1.0.2 and
Eclipselink ${eclipselink-version} provider
</details>
<feature>${project.artifactId}</feature>
<bundle
start-level="30">mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1</bundle>
<bundle
start-level="30">mvn:org.eclipse.persistence/javax.persistence/2.1.0</bundle>
<bundle
start-level="30">mvn:org.apache.aries.jpa/org.apache.aries.jpa.api/1.0.1</bundle>
<bundle
start-level="30">mvn:org.apache.aries.jpa/org.apache.aries.jpa.blueprint.aries/1.0.2</bundle>
<bundle
start-level="30">mvn:org.apache.aries.jpa/org.apache.aries.jpa.container/1.0.1</bundle>
<bundle
start-level="30">mvn:org.apache.aries.jpa/org.apache.aries.jpa.container.context/1.0.2</bundle>
<bundle
start-level="30">mvn:org.eclipse.persistence/org.eclipse.persistence.antlr/${eclipselink-version}</bundle>
<bundle
start-level="30">mvn:org.eclipse.persistence/org.eclipse.persistence.asm/${eclipselink-version}</bundle>
<bundle
start-level="30">mvn:org.eclipse.persistence/org.eclipse.persistence.core/${eclipselink-version}</bundle>
<bundle
start-level="30">mvn:org.eclipse.persistence/org.eclipse.persistence.jpa.jpql/${eclipselink-version}</bundle>
<bundle
start-level="30">mvn:org.eclipse.persistence/org.eclipse.persistence.jpa/${eclipselink-version}</bundle>
<bundle
start-level="30">blueprint:mvn:${project.groupId}/${project.artifactId}/${project.version}/eclipselink-provider.xml</bundle>
</feature>
eclipselink-provider.xml
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0">
<manifest xmlns="http://karaf.apache.org/xmlns/deployer/blueprint/v1.0.0">
Bundle-Version: ${eclipselink-version}
Bundle-Description: Eclipselink JPA Provider
Bundle-Name: EclipseLink JPA Provider
Bundle-SymbolicName: org.eclipse.persistence.jpa.PersistenceProvider
</manifest>
<bean id="ECLIPSELINK_PERSISTENCE_PROVIDER"
class="org.eclipse.persistence.jpa.PersistenceProvider">
</bean>
<service ref = "ECLIPSELINK_PERSISTENCE_PROVIDER"
interface = "javax.persistence.spi.PersistenceProvider">
<service-properties>
<entry key = "org.apache.aries.jpa.proxy.factory" value="true"/>
<entry key = "osgi.jndi.service.name"
value = "eclipselink.persistence.provider"/>
<entry key = "osgi.unit.provider"
value = "org.eclipse.persistence.jpa.PersistenceProvider"/>
<entry key = "javax.persistence.provider"
value = "org.eclipse.persistence.jpa.PersistenceProvider"/>
<entry key = "javax.persistence.spi.PersistenceProvider"
value = "org.eclipse.persistence.jpa.PersistenceProvider"/>
<entry key = "javax.persistence.PersistenceProvider"
value = "org.eclipse.persistence.jpa.PersistenceProvider"/>
</service-properties>
</service>
</blueprint>
> El 7/12/2014, a las 14:22, Jean-Baptiste Onofré <[email protected]> escribió:
>
> Hi,
>
> You should update to Aries JPA Container 1.0.2.
>
> The provided jpa feature uses the updated Aries bundle.
>
> Regards
> JB
>
> On 12/07/2014 03:45 PM, lbu wrote:
>> Hi,
>>
>> Following http://comments.gmane.org/gmane.comp.apache.karaf.devel/7411, I'm
>> trying to update my https://github.com/lburgazzoli/lb-karaf-examples-jpa to
>> include EclipseLink 2.5.2 but I fail to get it working:
>>
>> In the log files I see the following error:
>>
>> 2014-11-04 13:47:48,650 | ERROR | l for user karaf | container
>> | 82 - org.apache.aries.jpa.container - 1.0.0 | There was an error while
>> parsing the persistence descriptor META-INF/persistence.xml in the bundle
>> lb-karaf-examples-jpa-eclipselink-25/3.0.2.SNAPSHOT. No persistence units
>> will be managed for this bundle.
>> org.apache.aries.jpa.container.parsing.PersistenceDescriptorParserException:
>> A schema could not be located for the persistence descriptor
>> META-INF/persistence.xml in bundle
>> lb-karaf-examples-jpa-eclipselink-25/3.0.2.SNAPSHOT
>>
>> The code is
>> https://github.com/lburgazzoli/lb-karaf-examples-jpa/tree/master/jpa-eclipselink-25,
>> any hint?
>>
>> PS: by mistake, I've posted the same question karaf-dev, sorry for that
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://karaf.922171.n3.nabble.com/EclipseLink-2-5-2-JPA-2-1-in-Karaf-3-0-2-tp4037031.html
>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>
>
> --
> Jean-Baptiste Onofré
> [email protected]
> http://blog.nanthrax.net
> Talend - http://www.talend.com