We actually didn't switch as we didn't provide any jpa features previously ;)

Regards
JB

On 01/14/2014 02:39 PM, Achim Nierbeck wrote:
Looks like we've been to optimistic for the 2.3. version switch ... :/
sorry about that.

regards, Achim


2014/1/14 Dutertry Nicolas <nicolas.duter...@hraccess.com
<mailto:nicolas.duter...@hraccess.com>>

    Thank you Achim, the feature with openjpa 2.2.2 you gave me works !____

    __ __

    I’m wondering why Karaf 3.0.0 provide an openjpa feature if it does
    not work ?____

    __ __

    Regards____

    --
    Nicolas Dutertry

    ____

    *From:*Achim Nierbeck [mailto:bcanh...@googlemail.com
    <mailto:bcanh...@googlemail.com>]
    *Sent:* mardi 14 janvier 2014 12:20
    *To:* user@karaf.apache.org <mailto:user@karaf.apache.org>
    *Subject:* Re: JPA with Karaf____

    __ __

    btw. ____

    __ __

    this is a working feature, I used in a sample with Karaf 3.0____

    __ __

    <feature name='Karaf-JPA-OpenJPA' version='${project.version}'>____

         <!-- Container dependencies -->____

             <feature>transaction</feature>____

             <feature>jpa</feature>____

             <feature>jndi</feature>____

    ____

             <!-- Dependencies for OpenJPA -->____

    
<bundle>mvn:org.apache.geronimo.specs/geronimo-annotation_1.0_spec/1.1.1</bundle>____

    <bundle>mvn:org.apache.geronimo.specs/geronimo-jpa_2.0_spec/1.1</bundle>____

    
<bundle>mvn:org.apache.geronimo.specs/geronimo-servlet_2.5_spec/1.2</bundle>____

    
<bundle>mvn:org.apache.geronimo.specs/geronimo-el_1.0_spec/1.0.1</bundle>____

    
<bundle>mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1</bundle>____

    <bundle>mvn:commons-lang/commons-lang/2.6</bundle>____

    <bundle>mvn:commons-collections/commons-collections/3.2.1</bundle>____

    <bundle>mvn:commons-pool/commons-pool/1.6</bundle>____

    
<bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-dbcp/1.4_3</bundle>____

    
<bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.ant/1.7.0_6</bundle>____

    
<bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.serp/1.14.1_1</bundle>____

    
<bundle>mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/1.1.1</bundle>____

    
<bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.asm/3.3_2</bundle>____

    <bundle>mvn:org.apache.openjpa/openjpa/2.2.2</bundle>____

    </feature>____

    __ __

    2014/1/14 Achim Nierbeck <bcanh...@googlemail.com
    <mailto:bcanh...@googlemail.com>>____

    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
    defined in camel____

    you'll find a working sample :)____

    __ __

    regards, Achim ____

    __ __

    2014/1/14 Jean-Baptiste Onofré <j...@nanthrax.net
    <mailto:j...@nanthrax.net>>____

    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
        bundle’s
        state is set to “GracePeriod” :

        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 ::
        Specs ::
        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.core -
        1.3.0 | Bundle test.jpa is waiting for dependencies
        [(&(&(org.apache.aries.jpa.proxy.factory=true)(osgi.unit.name
        
<http://osgi.unit.name>=test))(objectClass=javax.persistence.EntityManagerFactory))]

        I have attached the sources of my bundle and the full karaf log
        file 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é
    jbono...@apache.org <mailto:jbono...@apache.org>
    http://blog.nanthrax.net
    Talend - http://www.talend.com____



    ____

    __ __

    --

    Apache Karaf <http://karaf.apache.org/> Committer & PMC
    OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
    Committer & Project Lead
    OPS4J Pax for Vaadin
    <http://team.ops4j.org/wiki/display/PAXVAADIN/Home> Commiter &
    Project Lead
    blog <http://notizblog.nierbeck.de/> ____



    ____

    __ __

    --

    Apache Karaf <http://karaf.apache.org/> Committer & PMC
    OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
    Committer & Project Lead
    OPS4J Pax for Vaadin
    <http://team.ops4j.org/wiki/display/PAXVAADIN/Home> Commiter &
    Project Lead
    blog <http://notizblog.nierbeck.de/> ____




--

Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer
& Project Lead
OPS4J Pax for Vaadin <http://team.ops4j.org/wiki/display/PAXVAADIN/Home>
Commiter & Project Lead
blog <http://notizblog.nierbeck.de/>

--
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply via email to