Skip to content
This repository has been archived by the owner on Nov 16, 2021. It is now read-only.

JPA spec bundle does not work with jpa 2.1 #25

Open
bjhargrave opened this issue Jul 8, 2016 · 3 comments
Open

JPA spec bundle does not work with jpa 2.1 #25

bjhargrave opened this issue Jul 8, 2016 · 3 comments
Labels
publiccomment Public comment

Comments

@bjhargrave
Copy link
Member

Original bug ID: BZ#189
From: Christian Schneider <chris@die-schneider.net>
Reported version: R6

@bjhargrave
Copy link
Member Author

Comment author: Christian Schneider <chris@die-schneider.net>

I am using the jpa spec bundle from

org.osgi
org.osgi.service.jpa
1.0.0

Unfortunately it does not work with jpa 2.1. The error is:
missing requirement [org.osgi.service.jpa/1.0.0.201505202024] osgi.wiring.package; filter:="(&(osgi.wiring.package=javax.persistence)(version>=1.1.0)(!(version>=2.0.0)))"]]]]]]]]

Will this be fixed in a new version soon?

This prevents the usage of the jpa spec with any modern jpa provider.

@bjhargrave
Copy link
Member Author

Comment author: @bjhargrave

Did you read 127.1.3 in the spec? It indicates that JPA 2.0 has its packages at version=1.1.

@bjhargrave
Copy link
Member Author

Comment author: Christian Schneider <chris@die-schneider.net>

Unfortunately the spec only defines the jpa package properties up to jpa 2.0. Do the OSGi specs already define JPA 2.1 somewhere?

I just checked some of the JPA API bundles and they provide very different package versions.

org.eclipse.persistence:javax.persistence:2.1.0 has javax.persistence;jpa="2.1";version="2.1.0"

org.apache.geronimo.specs:geronimo-jpa_2.1_spec:1.0-alpha-1 has javax.persistence;jpa="2.1";version="1.2"

So the question is .. which of these is correct?

How would a client correctly express the dependency to the jpa 2.0 or 2.1 API?
I see that there is also jpa=2.1 on the package export. Can the be used to describe the import?

@bjhargrave bjhargrave added the publiccomment Public comment label May 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
publiccomment Public comment
Projects
None yet
Development

No branches or pull requests

1 participant