Karaf 4.1.3 with Aries JPA missing requirement JavaJPA

2017-11-20 Thread Alex Soto
Hello, This is my first attempt to use JPA with Karaf, so I am trying to follow example from https://github.com/apache/aries-jpa using Karaf 4.1.3, so far unsuccessfully. On a clean Karaf I have installed the following: feature:install hibernate-o

Re: Karaf 4.1.3 with Aries JPA missing requirement JavaJPA

2017-11-20 Thread Jean-Baptiste Onofré
I don't see the jpa engine in your bundle list ? Openjpa, hibernate, eclipselink ? The jpa version depends of the engine. Regards JB On Nov 20, 2017, 20:09, at 20:09, Alex Soto wrote: >Hello, > >This is my first attempt to use JPA with Karaf, so I am trying to >follow example from https://gith

Re: Karaf 4.1.3 with Aries JPA missing requirement JavaJPA

2017-11-20 Thread Alex Soto
Thank you JB for the quick response. OK, so I installed the jpa feature: feature:install jpa karaf@root()> list START LEVEL 100 , List Threshold: 50 ID │ State │ Lvl │ Version│ Name ┼───┼─┼┼

Re: Karaf 4.1.3 with Aries JPA missing requirement JavaJPA

2017-11-20 Thread Jean-Baptiste Onofré
Ok, I see hibernate now. Let me check if I see the jpa spec bundle. Regards JB On Nov 20, 2017, 20:42, at 20:42, Alex Soto wrote: >Thank you JB for the quick response. >OK, so I installed the jpa feature: > > feature:install jpa > >karaf@root()> list >START LEVEL 100 , List Thresho

Re: Karaf 4.1.3 with Aries JPA missing requirement JavaJPA

2017-11-21 Thread Alex Soto
Does anybody know a good, simple step by step tutorial on how to quickly start using JPA 2.1 with Karaf 4.1.3? At this point I am not requiring any specific JPA implementation/version (Hibernate vs. any other). So far using Karaf’s default has not worked for me. I would expect Karaf’s defaults

Re: Karaf 4.1.3 with Aries JPA missing requirement JavaJPA

2017-11-21 Thread Francois Papon
Hi, I use EclipseLink for JPA implementation in a custo Karaf distribution and it work's well. In my persistence feature pom I have this dependencies :                     org.osgi             org.osgi.core             provided                             org.osgi             osgi.cmpn      

Re: Karaf 4.1.3 with Aries JPA missing requirement JavaJPA

2017-11-21 Thread Alex Soto
Thank you Francois, I tried EclipseLink, but it still doesn’t work. I am doing all this interactively on a fresh Karaf installation. In my case since I do not have an actual database server, so I am using H2. I installed the following features: feature:install jdbc feature:install jndi fea

Re: Karaf 4.1.3 with Aries JPA missing requirement JavaJPA

2017-11-21 Thread Jean-Baptiste Onofré
Let me take a look'm. I was swamped on meetings today. Regards JB On Nov 21, 2017, 17:23, at 17:23, Alex Soto wrote: >Thank you Francois, I tried EclipseLink, but it still doesn’t work. I >am doing all this interactively on a fresh Karaf installation. In my >case since I do not have an actual

Re: Karaf 4.1.3 with Aries JPA missing requirement JavaJPA

2017-11-22 Thread João Assunção
I use Hibernate as the persistence engine and the following features: * jdbc * pax-jdbc-h2 * pax-jdbc-postgresql * jpa * hibernate In other projects I used eclipselink and they both work great. I noticed the missing requirement osgi.contract=JavaJPA. I don't use that in my JPA bundles, and after

Re: Karaf 4.1.3 with Aries JPA missing requirement JavaJPA

2017-11-22 Thread Timothy Ward
The contract requirement is the recommended way to use the JPA API in OSGi. The versioning applied by most JSRs (JPA included) is not semantic, and so cannot be relied upon (for example JPA 2.0 is backward compatible with 1.0, Servlet 4 is backward compatible with 3.1). Portable Java Contract d

Re: Karaf 4.1.3 with Aries JPA missing requirement JavaJPA

2017-11-22 Thread Alex Soto
Yes, it is simple to add this to your bundle, but what do you do when the JavaJPA requirement is not met? How do you troubleshoot this error? Error executing command: Error installing bundles: Unable to start bundle mvn:org.apache.aries.jpa.example/org.apache.aries.jpa.example.tasklist.model/

Re: Karaf 4.1.3 with Aries JPA missing requirement JavaJPA

2017-11-22 Thread Timothy Ward
You can use an API bundle which provides the contract (which is typically the one you built against to find the contract in the first place). Aries JPA can re-use any valid API contract, but also provides bundles for JPA 2.0 and JPA 2.1 if you choose to use them: https://repository.apache.org/c

Re: Karaf 4.1.3 with Aries JPA missing requirement JavaJPA

2017-11-22 Thread Alex Soto
I tried using version 2.6.1 of the Aries JPA examples, again with Karaf 4.1.3. Built the project, then copied the org.ops4j.datasource-tasklist.cfg file into the etc directory of a fresh Karaf. Launched Karaf, and installed features: feature:install jdbc feature:install jndi feature:install jpa

Re: Karaf 4.1.3 with Aries JPA missing requirement JavaJPA

2017-11-22 Thread Alex Soto
Isn’t that supposed to be installed when I install the Karaf’s provided jpa feature? I thought the default/standard features (jpa, transaction, etc.) are there so you don’t have to figure out each individual bundle and their compatibly. I expected this would be a lot easier for somebody who wan