4 Replies Latest reply on Feb 14, 2012 8:36 AM by dako_t

    Unable to run a JPA 2 bundle.

    dako_t

      Hi all,

       

      has somebody already installed a JPA 2 bundle in Fuse-ESB 4.4.1?

      Which provider works correctly? OpenJPA 2.1.1 seems not to work with aries JPA (http://aries.apache.org/modules/jpaproject.html).

      A simple example would be nice.

       

      best regards

       

      Edited by: akunze on Feb 13, 2012 11:56 AM

        • 1. Re: Unable to run a JPA 2 bundle.
          dako_t

          I would like to add that all examples which I have found are using JPA 1 and spring xml.

          A blueprint example with a JPA 2 provider would be great.

          • 2. Re: Unable to run a JPA 2 bundle.
            njiang

            Hi

            I don't think Fuse ESB support JPA 2 out of box.

            But you can do some work to try to install JPA API and implementation bundle yourself.

            Please let us know what you find.

             

            Willem

            • 3. Re: Unable to run a JPA 2 bundle.
              dako_t

              OK, i have installed the following bundles and features without an error:

               

              osgi:install -s wrap:mvn:net.sf.jt400/jt400/6.6

              osgi:install -s wrap:mvn:commons-dbcp/commons-dbcp/1.4

               

              features:install jpa

              features:install transaction

               

              osgi:install -s mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.java-persistence-api-2.0/1.8.0

               

              osgi:install -s mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.openjpa/2.0.0_2

               

              After deploying my bundle which is very similiar to:

              http://aries.apache.org/modules/jpaproject.html

               

              Unfortunately I get the following log statements and my bundle doesnt work:

               

              10:52:12,039 | WARN  | use-01-13/deploy | container                        | 305 - org.apache.aries.jpa.container - 0.3.0 | There are no providers available.

               

              10:52:13,164 | INFO  | rint Extender: 3 | BlueprintContainerImpl           | 10 - org.apache.aries.blueprint - 0.3.1 | Bundle business-object-persist-blueprint is waiting for dependencies

               

              Any suggestions?

              • 4. Re: Unable to run a JPA 2 bundle.
                dako_t

                Ok,

                 

                if I install an other openjpa version the jpa provider seems to be identified by aries-jpa.

                 

                osgi:install -s mvn:org.apache.openjpa/openjpa/2.1.1

                 

                But it doesnt work, I get the following error:

                 

                Caused by: javax.naming.NotContextException: aries:services/javax.transaction.TransactionManager

                -


                my persistence xml settings:

                -


                 

                      

                 

                Edited by: akunze on Feb 14, 2012 1:35 PM