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] [Commented] (KARAF-4535) OpenJPA 2.4.1 Missing dependencies: objectClass=javax.persistence.EntityManager
Date Tue, 27 Sep 2016 13:35:21 GMT

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

Christian Schneider commented on KARAF-4535:
--------------------------------------------

I just tried to install openjpa and aries jpa:
feature:install jpa openjpa

It will install aries jpa 2.3.0 and openjpa 2.4.1. 

exports | grep javax.persistence
Shows that only the jpa api 2.0 is installed. This should work I think.

> OpenJPA 2.4.1 Missing dependencies: objectClass=javax.persistence.EntityManager
> -------------------------------------------------------------------------------
>
>                 Key: KARAF-4535
>                 URL: https://issues.apache.org/jira/browse/KARAF-4535
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-feature
>    Affects Versions: 4.0.5
>         Environment: Karaf 4.0.5
> OpenJPA 2.4.1
>            Reporter: Jirka
>            Assignee: Christian Schneider
>             Fix For: 4.1.0, 4.0.8
>
>
> OpenJPA 2.4.1 does not start when installed with the jpa feature.
> Problem is that the jpa feature installs persistence api 2.1.0 
> {code}
> <feature version="[2.0.0,2.2.0)" prerequisite="false" dependency="false">persistence-api
> </feature>
> {code}
> It collides with persistence api 2.0.0 installed by the openjpa feature
> {code}
> <feature version="[2.0.0,2.1.0)" prerequisite="false" dependency="false">persistence-api</feature>
> {code}
> Workaround is to use this custom jpa feature instead of the jpa feature. 
> {code}
> 	<feature name="jpa-custom" 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.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.osgi/org.osgi.service.jpa/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>
> {code}
> Changes compared to the karaf jpa feature::
> Removed:
> {code}
> <feature version="[2.0.0,2.2.0)" prerequisite="false" dependency="false">persistence-api</feature>
> {code}
> Added
> {code}
> <bundle>mvn:org.osgi/org.osgi.service.jpa/1.0.0</bundle> added
> {code}



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

Mime
View raw message