Re: Karaf 4.0.3 & JPA

2015-11-30 Thread Christian Schneider
No idea why the namespace handler does not seem to be present. You can look through the bundles with la -s and check if the transaction blueprint 2.0.0 bundle is present. You can then do bundle:service -p to see which services it offers. It should offer the correct blueprint namespace

Re: Karaf 4.0.3 & JPA

2015-11-30 Thread Christian Schneider
On 30.11.2015 16:13, Jason Reilly wrote: Thanks Christian, Then in the pom.xml for building the custom distribution, I have the following relevant bootFeatures: aries-blueprint cxf jdbc transaction-api/1.1.0 This is wrong. You need to install the

Re: Karaf 4.0.3 & JPA

2015-11-30 Thread Jason Reilly
FWIW, I rebundled OpenJPA with the javax.transaction/javax.transaction-api/1.2 dependency & I am now able to successfully connect to the database. Thanks again, Jason On 11/30/2015 10:56 AM, Christian Schneider wrote: Ah .. sorry forgot that you use openjpa. This might be difficult as

Re: Karaf 4.0.3 & JPA

2015-11-30 Thread Christian Schneider
This all looks pretty good. One thing I just found recently is that you need to separate the persistence unit bundle and the bundle injecting the EntityManager. It will not work if both are in the same bundle at least not with blueprint - with ds this seems to work. Christian Am

Re: Karaf 4.0.3 & JPA

2015-11-25 Thread Christian Schneider
Hi Achim, I point people to the my example as it is the easiest way to get a complete picture how to do it. The transition is to change the namespaces, use the enable element and add the annoations. It is a work of 10 minutes for a typical bundle. The example show how it should look like.

Re: Karaf 4.0.3 & JPA

2015-11-25 Thread Christian Schneider
The documentation at the Aries web site already explains the main steps. So I think I would not duplicate this in the karaf dev guide. Maybe in tutorial form but I think the reference documentation should be at Aries. It should be possible to support the old namespace but I would at least

Re: Karaf 4.0.3 & JPA

2015-11-25 Thread Jean-Baptiste Onofré
Hi Christian, good point for the documentation, I was more thinking about a step by step tutorial and a reference to the Aries website. Agree to separate in a new code. The point is more for the users using Karaf 3 to directly use Karaf 4 without changing their application (at least at

Re: Karaf 4.0.3 & JPA

2015-11-25 Thread Christian Schneider
I completely forgot that you can still install jpa 1.x in karaf 4. So people just need to install the feature jpa/1.0.4 instead of just jpa and their old code works without changes. Christian Am 25.11.2015 um 21:12 schrieb Achim Nierbeck: As user of Karaf, I'd expect to run my application as

Re: Karaf 4.0.3 & JPA

2015-11-25 Thread Achim Nierbeck
As user of Karaf, I'd expect to run my application as is without further changing if I stick to the features I used before. That's why we now have the 5th person beeing stuck at a point of agony where everything fails. This is just wrong. And merely pointing to some blogs/turorials out-of-karafs

Re: Karaf 4.0.3 & JPA

2015-11-25 Thread Jean-Baptiste Onofré
Yes, it's what I thought, I remember we discussed about this together. It makes sense ! Maybe just a quick note for the users (in the update notes). Thanks ! Regards JB On 11/25/2015 09:38 PM, Christian Schneider wrote: I completely forgot that you can still install jpa 1.x in karaf 4. So

Re: Karaf 4.0.3 & JPA

2015-11-25 Thread Christian Schneider
The problem is that the karaf resolver installs the higher version by default. So if we want to provide the higher version too by default then it will be the prefered one. This is why I solved the problem differently in transaction as I install both versions at the same time there.

Re: Karaf 4.0.3 & JPA

2015-11-25 Thread Achim Nierbeck
So wouldn't it make much more sense to have this as default behavior and if required install the 2.0.0 of the jpa version. regards, Achim 2015-11-25 21:38 GMT+01:00 Christian Schneider : > I completely forgot that you can still install jpa 1.x in karaf 4. > So people

Re: Karaf 4.0.3 & JPA

2015-11-24 Thread Christian Schneider
The old namespace for jpa is not supported anymore by Aries JPA 2.x. Can you try with the new namespaces like used in my tutorial code? You will need to use annoations then. For transactions you can still use the old namespace but I would also recommend the new one. Christian On 24.11.2015

Re: Karaf 4.0.3 & JPA

2015-11-24 Thread Achim Nierbeck
Christian, it's nice that you have a tutorial and what-so-ever about it but if it's not in the docs it mere doesn't exist. Till now I counted about the 5th complaint about JPA not working with Karaf 4 any more. So please stop advertising your blog but help people to actually get it going again.

Re: Karaf 4.0.3 & JPA

2015-11-24 Thread Jason Reilly
http://www.osgi.org/xmlns/blueprint/v1.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xmlns:tx="http://aries.apache.org/xmlns/transactions/v1.0.0; xmlns:jpa="http://aries.apache.org/xmlns/jpa/v1.0.0; default-activation="eager"> ...snip ...snip

Re: Karaf 4.0.3 & JPA

2015-11-24 Thread Jean-Baptiste Onofré
Can you share the blueprint XML in your hearsay-dao-jpa bundle ? On 11/24/2015 04:57 PM, Jason Reilly wrote: I tried 1.0.0 for those urls & here is the error message: 2015-11-24 10:56:12,317 | INFO | pool-47-thread-1 | BlueprintContainerImpl | 34 - org.apache.aries.blueprint.core -

Re: Karaf 4.0.3 & JPA

2015-11-24 Thread Jean-Baptiste Onofré
Basically, you should have transaction-api 1.1.0 installed (not 1.2.0) and no transaction/1.3.0 feature installed for OpenJPA. Regards JB On 11/24/2015 04:13 PM, Jason Reilly wrote: Hi JB, I was using what I could find out-of-the-boxwhich I think is transaction/1.3.0. I didn't know of a

Re: Karaf 4.0.3 & JPA

2015-11-24 Thread Jean-Baptiste Onofré
By the way, javax.transaction.Synchronization should be available: OpenJPA Aggregate Jar (65) javax/transaction/Synchronization.class Regards JB On 11/24/2015 04:13 PM, Jason Reilly wrote: Hi JB, I was using what I could find out-of-the-boxwhich I think is transaction/1.3.0. I didn't

Re: Karaf 4.0.3 & JPA

2015-11-24 Thread Jason Reilly
I tried 1.0.0 for those urls & here is the error message: 2015-11-24 10:56:12,317 | INFO | pool-47-thread-1 | BlueprintContainerImpl | 34 - org.apache.aries.blueprint.core - 1.4.5 | Bundle hearsay-dao-jpa/0.0.46.SNAPSHOT is waiting for namespace handlers