You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2016/08/05 07:40:20 UTC

[jira] [Commented] (KARAF-4615) Cannot get OpenJPA 2.4.1 to work due to JPA 2.1 being installed

    [ https://issues.apache.org/jira/browse/KARAF-4615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15409076#comment-15409076 ] 

ASF subversion and git services commented on KARAF-4615:
--------------------------------------------------------

Commit 06bc2b76aaebd648e43cd89cc29957b648f4931f in karaf's branch refs/heads/karaf-4.0.x from [~chris@die-schneider.net]
[ https://git-wip-us.apache.org/repos/asf?p=karaf.git;h=06bc2b7 ]

[KARAF-4615] Make sure providers requiring jpa 2.0 and 2.1 can both work


> Cannot get OpenJPA 2.4.1 to work due to JPA 2.1 being installed
> ---------------------------------------------------------------
>
>                 Key: KARAF-4615
>                 URL: https://issues.apache.org/jira/browse/KARAF-4615
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-feature
>    Affects Versions: 4.0.5
>            Reporter: Bengt Rodehav
>            Assignee: Christian Schneider
>             Fix For: 4.1.0, 4.0.6
>
>
> In order to use OpenJPA 2.4.1 both the "openjpa" (2.4.1) feature and the "jpa" (2.3.0) features need to be installed.
> However, OpenJPA needs JPA 2.0 - it does not work with JPA 2.1. But when installing the "jpa" (2.3.0) feature, JPA 2.1 is being installed.
> This has been discussed on the Karaf user list under the subject "Migrating from Karaf 2.4.1 to 4.0.5, JPA problems".
> I have, as a workaround, modified the enterprise-4.0.5-features.xml, feature "jpa" (2.3.0), as follows:
> * I have changed the version range for the peristence-api feature from [2.0.0,2.2.0) to [2.0.0,2.1.0). This disqualifies JPA 2.1 and instead cause JPA 2.0 to be installed.
> * The JPA 2.1 bundle seemed to be providing the package  org.osgi.service.jpa which is mandatory. I therefore added the following dependency:
> ** <bundle dependency="true">mvn:org.osgi/org.osgi.service.jpa/1.0.0</bundle>
> So my modified "jpa" (2.3.0) feature now looks like this:
> <feature name="jpa" description="OSGi Persistence Container" version="2.3.0">
>     <details>JPA implementation provided by Apache Aries JPA 2.x. NB: this feature doesn't provide the JPA engine, you have to install one by yourself (OpenJPA for instance)</details>
>     <feature version="[1.1,2)" prerequisite="false" dependency="false">transaction-api</feature>
>     <bundle dependency="true">mvn:org.osgi/org.osgi.service.jpa/1.0.0</bundle>
>     <feature version="[2.0.0,2.1.0)" prerequisite="false" dependency="false">persistence-api</feature>
>     <bundle dependency="true">mvn:org.apache.felix/org.apache.felix.coordinator/1.0.2</bundle>
>     <bundle dependency="true">mvn:org.osgi/org.osgi.service.jdbc/1.0.0</bundle>
>     <bundle>mvn:org.apache.aries.jpa/org.apache.aries.jpa.api/2.3.0</bundle>
>     <bundle>mvn:org.apache.aries.jpa/org.apache.aries.jpa.container/2.3.0</bundle>
>     <bundle>mvn:org.apache.aries.jpa/org.apache.aries.jpa.support/2.3.0</bundle>
>     <conditional>
>         <condition>aries-blueprint</condition>
>         <bundle>mvn:org.apache.aries.jpa/org.apache.aries.jpa.blueprint/2.3.0</bundle>
>     </conditional>
> </feature>



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)