karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Schneider (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (KARAF-4615) Cannot get OpenJPA 2.4.1 to work due to JPA 2.1 being installed
Date Fri, 29 Jul 2016 12:32:20 GMT

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

Christian Schneider edited comment on KARAF-4615 at 7/29/16 12:31 PM:
----------------------------------------------------------------------

I finally found a way to make both hibernate 4.3 and openjpa 2.4.1 work. Of course not at
the same time .. but at least at all.

Just pushed a change on master .. can you test this?


was (Author: chris@die-schneider.net):
I finally found a way to make both hibernate 4.3 and openjpa 2.4.1 work. Of course not at
the same time .. but at least at all.

> 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.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)

Mime
View raw message