Return-Path: X-Original-To: apmail-karaf-user-archive@minotaur.apache.org Delivered-To: apmail-karaf-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0DEFA10BF7 for ; Tue, 14 Jan 2014 13:41:19 +0000 (UTC) Received: (qmail 82782 invoked by uid 500); 14 Jan 2014 13:41:18 -0000 Delivered-To: apmail-karaf-user-archive@karaf.apache.org Received: (qmail 82751 invoked by uid 500); 14 Jan 2014 13:41:18 -0000 Mailing-List: contact user-help@karaf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@karaf.apache.org Delivered-To: mailing list user@karaf.apache.org Received: (qmail 82743 invoked by uid 99); 14 Jan 2014 13:41:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Jan 2014 13:41:18 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [217.70.183.195] (HELO relay3-d.mail.gandi.net) (217.70.183.195) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Jan 2014 13:41:12 +0000 Received: from mfilter14-d.gandi.net (mfilter14-d.gandi.net [217.70.178.142]) by relay3-d.mail.gandi.net (Postfix) with ESMTP id 18007A8092 for ; Tue, 14 Jan 2014 14:40:52 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mfilter14-d.gandi.net Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by mfilter14-d.gandi.net (mfilter14-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id KBEs060mtnoA for ; Tue, 14 Jan 2014 14:40:50 +0100 (CET) X-Originating-IP: 82.238.224.4 Received: from [192.168.134.11] (bre91-1-82-238-224-4.fbx.proxad.net [82.238.224.4]) (Authenticated sender: jb@nanthrax.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 2FE5CA80F2 for ; Tue, 14 Jan 2014 14:40:50 +0100 (CET) Message-ID: <52D53E60.4000104@nanthrax.net> Date: Tue, 14 Jan 2014 14:40:48 +0100 From: =?windows-1252?Q?Jean-Baptiste_Onofr=E9?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: user@karaf.apache.org Subject: Re: JPA with Karaf References: <27807_1389692013_52D5046D_27807_2111_1_56DC7FCE734E5943A64836578350F5239BE27D@wptxexmbx04.ptx.fr.sopra> <52D51907.20007@nanthrax.net> <968_1389706621_52D53D7D_968_5961_1_56DC7FCE734E5943A64836578350F5239BE7F8@wptxexmbx04.ptx.fr.sopra> In-Reply-To: <968_1389706621_52D53D7D_968_5961_1_56DC7FCE734E5943A64836578350F5239BE7F8@wptxexmbx04.ptx.fr.sopra> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org FYI, Karaf 3.0.1 will provide both OpenJPA 2.2.2 and 2.3.0 features: The issue is in OpenJPA 2.3.0 and has been identified after the Karaf=20 3.0.0 release. Regards JB On 01/14/2014 02:36 PM, Dutertry Nicolas wrote: > Thank you Achim, the feature with openjpa 2.2.2 you gave me works ! > > I=92m wondering why Karaf 3.0.0 provide an openjpa feature if it does n= ot > work ? > > Regards > > -- > Nicolas Dutertry > > *From:*Achim Nierbeck [mailto:bcanhome@googlemail.com] > *Sent:* mardi 14 janvier 2014 12:20 > *To:* user@karaf.apache.org > *Subject:* Re: JPA with Karaf > > btw. > > this is a working feature, I used in a sample with Karaf 3.0 > > > > > > transaction > > jpa > > jndi > > > > mvn:org.apache.geronimo.specs/geronimo-annotation_1.0_spec/1.1.= 1 > > mvn:org.apache.geronimo.specs/geronimo-jpa_2.0_spec/1.1 > > mvn:org.apache.geronimo.specs/geronimo-servlet_2.5_spec/1.2 > > mvn:org.apache.geronimo.specs/geronimo-el_1.0_spec/1.0.1 > > mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1 > > mvn:commons-lang/commons-lang/2.6 > > mvn:commons-collections/commons-collections/3.2.1 > > mvn:commons-pool/commons-pool/1.6 > > mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles= .commons-dbcp/1.4_3 > > mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles= .ant/1.7.0_6 > > mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles= .serp/1.14.1_1 > > mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/1.1.1 > > mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles= .asm/3.3_2 > > mvn:org.apache.openjpa/openjpa/2.2.2 > > > > 2014/1/14 Achim Nierbeck > > > Yes I'm able to confirm, the openjpa 2.3.0 feature does have an issue. > > If you take a look at how the openjpa requirements for 2.2.0 are define= d > in camel > > you'll find a working sample :) > > regards, Achim > > 2014/1/14 Jean-Baptiste Onofr=E9 > > > Hi Nicolas, > > could you try with OpenJPA 2.2.2 ? AFAIR it seems OpenJPA 2.3.0 has an > issue. > > Regards > JB > > > > On 01/14/2014 10:33 AM, Dutertry Nicolas wrote: > > Hi, > > I am trying to use JPA with Karaf 3.0.0 but it does not work. > > First of all I have installed the following features : > > karaf@root()> feature:install jndi jpa transaction openjpa > > Then I have created a simple JPA bundle containing: > > -A HSQLDB datasource configured with blueprint > > -A JPA entity (class Person) and the file META-INF/persistence.xml > > -A service for getting and creating people (class PersonService) > > > > The JPA EntityManager is injected in PersonService using blueprint. > > Finally I have deployed hsqldb and my bundle in Karaf, but my bundl= e=92s > state is set to =93GracePeriod=94 : > > karaf@root()> list > > START LEVEL 100 , List Threshold: 50 > > ID | State | Lvl | Version | Name > > -------------------------------------------------------------------= ------------------------------ > > 86 | Active | 80 | 3.0.0 | Apache Karaf :: JNDI :: > Command > > 114 | Active | 80 | 2.3.0 | Apache ServiceMix :: Spe= cs :: > Java Persistence API 1.4 > > 115 | Active | 80 | 3.2.1 | Commons Collections > > 116 | Active | 80 | 1.6.0 | Commons Pool > > 117 | Active | 80 | 1.4 | Commons DBCP > > 118 | Active | 80 | 2.6 | Commons Lang > > 119 | Active | 80 | 2.3.0 | OpenJPA Aggregate Jar > > 120 | Active | 80 | 2.3.1 | HSQLDB > > 121 | GracePeriod | 80 | 1.0.0.SNAPSHOT | Test JPA OSGi Bundle > > In the log file we found : > > 2014-01-14 10:04:28,388 | INFO | raf-3.0.0/deploy | > BlueprintContainerImpl | 4 - org.apache.aries.blueprint.c= ore - > 1.3.0 | Bundle test.jpa is waiting for dependencies > [(&(&(org.apache.aries.jpa.proxy.factory=3Dtrue)(osgi.unit.name > =3Dtest))(objectClass=3Djavax.persistence.En= tityManagerFactory))] > > I have attached the sources of my bundle and the full karaf log fil= e in > this mail. > > Is there a bug in Karaf or am I missing something ? > > Thanks for your help. > > -- > Nicolas Dutertry > HR Access - http://www.hraccess.com > > > -- > Jean-Baptiste Onofr=E9 > jbonofre@apache.org > http://blog.nanthrax.net > Talend - http://www.talend.com > > > > -- > > Apache Karaf Committer & PMC > OPS4J Pax Web Committer > & Project Lead > OPS4J Pax for Vaadin > Commiter & Project Lead > blog > > > > -- > > Apache Karaf Committer & PMC > OPS4J Pax Web Committer > & Project Lead > OPS4J Pax for Vaadin > Commiter & Project Lead > blog > --=20 Jean-Baptiste Onofr=E9 jbonofre@apache.org http://blog.nanthrax.net Talend - http://www.talend.com