You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Jason Reilly <jd...@renci.org> on 2010/05/05 22:37:32 UTC

openjpa/karaf

Hi all,

I am trying to get a project that uses OpenJPA deployed as a Service in
the Apache Karaf OSGi container.  I am getting an exception when I do an
osgi:install of my project.  The exception message is:

javax.persistence.PersistenceException: No persistence providers for 
"rsp" after trying the following discovered implementations: NONE


This is what my META-INF/persistence.xml looks like:

<?xml version="1.0"?>

<persistence xmlns="http://java.sun.com/xml/ns/persistence" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">

   <persistence-unit name="rsp">

 
<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>

....snip classes....

     <properties>

       <property name="openjpa.ConnectionURL" 
value="jdbc:postgresql://localhost:5432/rsp"/>

       <property name="openjpa.ConnectionDriverName" 
value="org.postgresql.Driver"/>

       <property name="openjpa.ConnectionUserName" value=""/>

       <property name="openjpa.ConnectionPassword" value=""/>

       <property name="openjpa.Log" value="DefaultLevel=WARN, Tool=INFO"/>

     </properties>

   </persistence-unit>

</persistence>


Here is a list of relevant installed bundles:

[  95] [Active     ] [            ] [   60] Commons Lang (2.4)

[ 102] [Active     ] [            ] [   60] Commons Collections (3.2.1)

[ 103] [Active     ] [            ] [   60] Commons Pool (1.5.3)

[ 122] [Active     ] [            ] [   60] postgresql-8.4-701.jdbc4 (0)

[ 145] [Active     ] [            ] [   60] Apache Geronimo JSR-317 JPA 
2.0 Spec API (1.1)

[ 146] [Active     ] [            ] [   60] Apache Geronimo JSR-303 Bean 
Validation Spec API (1.1)

[ 148] [Active     ] [            ] [   60] 
mvn:org.apache.openjpa/openjpa-all/2.1.0-SNAPSHOT


The Karaf version is 1.5.0-SNAPSHOT.

Any insight on how to remedy this error would be great &, of course, let
me know if I need to provide more info.

Thanks,
Jason

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


RE: openjpa/karaf

Posted by Jim Talbut <Ji...@groupgti.com>.
Jason,

I don't know whether this will help: http://yaytay.wordpress.com/2010/05/13/lsned-33-openjpa-in-apache-felix/
Might be more basic that what you are looking for.

Jim

________________________________________
From: Jason Reilly [jdr0887@renci.org]
Sent: 05 May 2010 21:37
To: users@felix.apache.org
Subject: openjpa/karaf

Hi all,

I am trying to get a project that uses OpenJPA deployed as a Service in
the Apache Karaf OSGi container.  I am getting an exception when I do an
osgi:install of my project.  The exception message is:

javax.persistence.PersistenceException: No persistence providers for
"rsp" after trying the following discovered implementations: NONE


This is what my META-INF/persistence.xml looks like:

<?xml version="1.0"?>

<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">

   <persistence-unit name="rsp">


<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>

....snip classes....

     <properties>

       <property name="openjpa.ConnectionURL"
value="jdbc:postgresql://localhost:5432/rsp"/>

       <property name="openjpa.ConnectionDriverName"
value="org.postgresql.Driver"/>

       <property name="openjpa.ConnectionUserName" value=""/>

       <property name="openjpa.ConnectionPassword" value=""/>

       <property name="openjpa.Log" value="DefaultLevel=WARN, Tool=INFO"/>

     </properties>

   </persistence-unit>

</persistence>


Here is a list of relevant installed bundles:

[  95] [Active     ] [            ] [   60] Commons Lang (2.4)

[ 102] [Active     ] [            ] [   60] Commons Collections (3.2.1)

[ 103] [Active     ] [            ] [   60] Commons Pool (1.5.3)

[ 122] [Active     ] [            ] [   60] postgresql-8.4-701.jdbc4 (0)

[ 145] [Active     ] [            ] [   60] Apache Geronimo JSR-317 JPA
2.0 Spec API (1.1)

[ 146] [Active     ] [            ] [   60] Apache Geronimo JSR-303 Bean
Validation Spec API (1.1)

[ 148] [Active     ] [            ] [   60]
mvn:org.apache.openjpa/openjpa-all/2.1.0-SNAPSHOT


The Karaf version is 1.5.0-SNAPSHOT.

Any insight on how to remedy this error would be great &, of course, let
me know if I need to provide more info.

Thanks,
Jason

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: openjpa/karaf

Posted by Guillaume Nodet <gn...@gmail.com>.
The OSGi Enterprise Expert Group has released a specification around using
JPA in OSGi.
You may want to have a look at the Aries project (
http://incubator.apache.org/aries/) which provides an implementation of this
spec.
You should be able to find some examples along with the implementation.

On Wed, May 5, 2010 at 22:37, Jason Reilly <jd...@renci.org> wrote:

> Hi all,
>
> I am trying to get a project that uses OpenJPA deployed as a Service in
> the Apache Karaf OSGi container.  I am getting an exception when I do an
> osgi:install of my project.  The exception message is:
>
> javax.persistence.PersistenceException: No persistence providers for "rsp"
> after trying the following discovered implementations: NONE
>
>
> This is what my META-INF/persistence.xml looks like:
>
> <?xml version="1.0"?>
>
> <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance" version="1.0">
>
>  <persistence-unit name="rsp">
>
>
> <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
>
> ....snip classes....
>
>    <properties>
>
>      <property name="openjpa.ConnectionURL"
> value="jdbc:postgresql://localhost:5432/rsp"/>
>
>      <property name="openjpa.ConnectionDriverName"
> value="org.postgresql.Driver"/>
>
>      <property name="openjpa.ConnectionUserName" value=""/>
>
>      <property name="openjpa.ConnectionPassword" value=""/>
>
>      <property name="openjpa.Log" value="DefaultLevel=WARN, Tool=INFO"/>
>
>    </properties>
>
>  </persistence-unit>
>
> </persistence>
>
>
> Here is a list of relevant installed bundles:
>
> [  95] [Active     ] [            ] [   60] Commons Lang (2.4)
>
> [ 102] [Active     ] [            ] [   60] Commons Collections (3.2.1)
>
> [ 103] [Active     ] [            ] [   60] Commons Pool (1.5.3)
>
> [ 122] [Active     ] [            ] [   60] postgresql-8.4-701.jdbc4 (0)
>
> [ 145] [Active     ] [            ] [   60] Apache Geronimo JSR-317 JPA 2.0
> Spec API (1.1)
>
> [ 146] [Active     ] [            ] [   60] Apache Geronimo JSR-303 Bean
> Validation Spec API (1.1)
>
> [ 148] [Active     ] [            ] [   60]
> mvn:org.apache.openjpa/openjpa-all/2.1.0-SNAPSHOT
>
>
> The Karaf version is 1.5.0-SNAPSHOT.
>
> Any insight on how to remedy this error would be great &, of course, let
> me know if I need to provide more info.
>
> Thanks,
> Jason
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com