Re: OpenJPA with AriesJPA Java.peristence

2018-05-11 Thread Alex Soto
That was it, I just tested without the "jdbc/“ prefix and it came up! Thanks for all the help. Hopefully this thread can help somebody else in the future. Best regards, Alex soto > On May 11, 2018, at 4:30 PM, Tim Ward wrote: > > Yes, it looks like your jta-datasource-name is wrong. The n

Re: OpenJPA with AriesJPA Java.peristence

2018-05-11 Thread Tim Ward
Yes, it looks like your jta-datasource-name is wrong. The name is set to responder, not jdbc/responder, so I’m pretty sure that the filter in your JNDI name won’t match. Tim Sent from my iPhone > On 11 May 2018, at 21:07, Alex Soto wrote: > > Thank you Tim, I appreciate the help. > Yes, an

Re: OpenJPA with AriesJPA Java.peristence

2018-05-11 Thread Alex Soto
Thank you Tim, I appreciate the help. Yes, an EntityManagerFactoryBuilder is registered as a service by my bundle: karaf@root()> service:list org.osgi.service.jpa.EntityManagerFactoryBuilder [org.osgi.service.jpa.EntityManagerFactoryBuilder] -- osgi

Re: OpenJPA with AriesJPA Java.peristence

2018-05-11 Thread Tim Ward
Hi Alex, So the logs you’ve sent indicate that your persistence bundle is being found, and that it’s being matched with OpenJPA. These are both good things. The next step in the process is to locate and set up the connections to the database. Depending on how you’re setting up your persistence

Re: OpenJPA with AriesJPA Java.peristence

2018-05-11 Thread Alex Soto
What is strange is that (based on the logs) it seems as if the persistence unit is being discovered: 14:50:44.050 INFO [features-3-thread-1] Found persistence unit responderPersistenUnit in bundle org.enquery.encryptedquery.responder-data-jpa-entity-manager with provider org.apache.openjpa.pe

Re: OpenJPA with AriesJPA Java.peristence

2018-05-11 Thread Alex Soto
Ok, I made some progress (I guess) I am no longer getting the original error: java.lang.ClassCastException: org.apache.openjpa.persistence.PersistenceProviderImpl cannot be cast to javax.persistence.spi.PersistenceProvider I added my own version of the jpa feature, in which I substitute the l

Re: OpenJPA with AriesJPA Java.peristence

2018-05-11 Thread Tim Ward
> On 11 May 2018, at 15:53, Alex Soto wrote: > > Thanks for the help Tim. > >> On May 11, 2018, at 10:24 AM, Tim Ward > > wrote: >> >> Aries JPA can work with either JPA 2.0, or JPA 2.1, and is tested with >> EclipseLink, Hibernate and OpenJPA. > > I am looking

Re: OpenJPA with AriesJPA Java.peristence

2018-05-11 Thread Alex Soto
Thanks for the help Tim. > On May 11, 2018, at 10:24 AM, Tim Ward wrote: > > Aries JPA can work with either JPA 2.0, or JPA 2.1, and is tested with > EclipseLink, Hibernate and OpenJPA. I am looking at these integration tests, but the test itself does not uses the feature, as defined in the

Re: OpenJPA with AriesJPA Java.peristence

2018-05-11 Thread Tim Ward
Aries JPA can work with either JPA 2.0, or JPA 2.1, and is tested with EclipseLink, Hibernate and OpenJPA. It is highly recommended that you use the JavaJPA contract in any of your bundles using JPA so that you are isolated from the API version number changes in the future (most Java EE specif

Re: OpenJPA with AriesJPA Java.peristence

2018-05-11 Thread Alex Soto
I had accidentally replied directly to Tim. Repeating here: Let me see if I understand this correctly: Karaf version 4.2.0 enterprise repository depends on version 2.6.1 of AriesJPA. AriesJPA version 2.6.1 depends on javax.persistence version 2.1.0. Karaf’s enterprise repository defines a openj

Re: OpenJPA with AriesJPA Java.peristence

2018-05-10 Thread Tim Ward
OpenJPA 2.4.x supports JPA 2.0 (not 2.1) you can get the API you need from Apache Aries, as well as the JPA container. This is also all used and tested with Aries Transaction Control, so you can look at the bundles used there. Best Regards, Tim Sent from my iPhone > On 10 May 2018, at 20:43,

Re: OpenJPA with AriesJPA Java.peristence

2018-05-10 Thread Jean-Baptiste Onofré
Anyway, let me check if OpenJPA 2.4.2 supports JPA 2.1 (it's what I thought). Regards JB On 05/10/2018 09:36 PM, Alex Soto wrote: > I am sorry I only see one version: > > karaf@root()> feature:list | grep jpa > openjpa                                  │ 2.4.2            │          │ > Started  

Re: OpenJPA with AriesJPA Java.peristence

2018-05-10 Thread Jean-Baptiste Onofré
You have to register the enterprise-legacy features repository. Regards JB On 05/10/2018 09:36 PM, Alex Soto wrote: > I am sorry I only see one version: > > karaf@root()> feature:list | grep jpa > openjpa                                  │ 2.4.2            │          │ > Started     │ enterprise

Re: OpenJPA with AriesJPA Java.peristence

2018-05-10 Thread Alex Soto
I am sorry I only see one version: karaf@root()> feature:list | grep jpa openjpa │ 2.4.2│ │ Started │ enterprise-4.2.0 │ Apache OpenJPA 2.4.x persistence engine support camel-jpa│ 2.21.1

Re: OpenJPA with AriesJPA Java.peristence

2018-05-10 Thread Jean-Baptiste Onofré
Karaf provides both jpa 1.x and 2.x feature. You just have to install the right one depending of the engine you are using: feature:install jpa/1.x feature:install openjpa Regards JB On 05/10/2018 09:23 PM, Alex Soto wrote: > Thanks JB, > > I was hoping to use whatever was defined in the Kar

Re: OpenJPA with AriesJPA Java.peristence

2018-05-10 Thread Alex Soto
Thanks JB, I was hoping to use whatever was defined in the Karaf’s enterprise feature, but if that doesn’t work ,then which version do I need? I am afraid if I deviate from the versions selected by Kara’s Enterprise feature I will get into more version mismatch problems. Also what do I put i

Re: OpenJPA with AriesJPA Java.peristence

2018-05-10 Thread Jean-Baptiste Onofré
Hi, OpenJPA 2.x still uses JPA 1.x. By default, jpa feature will provide 2.x version. You should specify the jpa feature version. Regards JB On 05/10/2018 09:08 PM, Alex Soto wrote: > Hello, > > I am running Karaf 4.2.0, trying to setup a project with OpenJPA.  I am > getting > error: > >

OpenJPA with AriesJPA Java.peristence

2018-05-10 Thread Alex Soto
Hello, I am running Karaf 4.2.0, trying to setup a project with OpenJPA. I am getting error: 14:44:07.799 ERROR [FelixDispatchQueue] FrameworkEvent ERROR - org.apache.aries.jpa.container java.lang.ClassCastException: org.apache.openjpa.persistence.PersistenceProviderImpl cannot be cast to j