You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by "seba.wagner@gmail.com" <se...@gmail.com> on 2011/08/18 09:24:04 UTC

openJPA dependcies with latest openJPA-2.1.x and javax.persistance.PersistanceProvider / javaee-apo

Hi,

we are migrating a larger Open Source project (OpenMeetings) from Hibernate
to openJPA for Apache incubation and face some issues with openJPA's
dependencies to javax.persistance.PersistanceProvider:


We already have the javaee-api-5.1.1.jar (
http://openmeetings.googlecode.com/svn/trunk/singlewebapp/server/red5/lib/javaee-api-5.1.1.jar)
in the servers lib that has an incompatible version of the interface
javax.persistance.PersistanceProvide.
The application server is a modified Tomcat server integrated with Spring.

Now the questions is:
When we use the openjpa-2.1.x-all.jar and remove the javax.persistance.*
classes from javaee-api-5.1.1.jar we HAVE to move openjpa-2.1.x-all.jar to
the servers/lib (instead of webapps/openmeetings/WEB-INF/lib) because the
application server itself needs the javax.perstistance.* classes available
too.

Separating the javax.perstistance.* from the openjpa-2.1.x-all.jar and just
moving that to the server-lib doesn't work too as those javax.perstistance.*
from the openjpa-2.1.x-all.jar seem to have some depencies to
*apache.geronimo.xyz*.

So my questions are:
Where can we get a javax.persistance.* library that is compatible with
openJPA-2.1.x ? The one from the maven directory:
http://download.java.net/maven/2/javax/javaee-api/6.0/ does NOT work. It
throws some Exception about invalid class. Seems like a compile error in
their build server.

Where is the best place to put the openJPA-2.1.x JAR(s) ? Servers-lib or
WEB-INF/lib ? We want to be able to deploy multiple times the
openmeetings-webapp into the same applications server. From my point of view
you have to put them into WEB-INF/lib then?


Thank you very much,
Sebastian


-- 
Sebastian Wagner
http://www.webbase-design.de
http://openmeetings.googlecode.com
http://www.wagner-sebastian.com
seba.wagner@gmail.com

Re: openJPA dependcies with latest openJPA-2.1.x and javax.persistance.PersistanceProvider / javaee-apo

Posted by "seba.wagner@gmail.com" <se...@gmail.com>.
Hi Michael,


thanks for pointing to the rights JARs for the persistance-package.
I was able to solve that conflict by putting the javax.persistance.* (so the
geronimo-jpa_2.0_spec-1.1.jar) in the Tomcat-lib and all the other JARs
including openJPA Jar itself in the webapps-WEB-INF/lib.

However I am still wonder if there is an advice on this? We have scenarios
from users and customers that would like to run multiple instances of
openmeetings in the same tomcat servlet container.
Maybe somebody has some advice on that?

Also we face a *slight* problem with the Relations that openJPA is not able
to load after it is updated on its relations.

Example Relation
Users.java<http://code.google.com/p/openmeetings/source/browse/branches/dev/injection/src/app/org/openmeetings/app/persistence/beans/user/Users.java><=>
Organisation_User.java<http://code.google.com/p/openmeetings/source/browse/branches/dev/injection/src/app/org/openmeetings/app/persistence/beans/domain/Organisation_Users.java><=>
Organisation.java<http://code.google.com/p/openmeetings/source/browse/branches/dev/injection/src/app/org/openmeetings/app/persistence/beans/domain/Organisation_Users.java>

so the User Object has an
attribute<http://code.google.com/p/openmeetings/source/browse/branches/dev/injection/src/app/org/openmeetings/app/persistence/beans/user/Users.java#84>
:
@OneToMany(fetch = FetchType.EAGER)
    @JoinColumn(name = "user_id", insertable = true, updatable = true)
    private List<Organisation_Users> organisation_users;

We need this extra object Organization_Users cause we have an attribute
*isModerator* in each Organization_Users-Object to mark special Users with
Moderator privileges for certain Orgs.

We update/add Users and Organization_Users INDEPENTLY.
Meaning:
we have a Java Method: addUser => Persists the Users-Object
and we have Java Method: addUserToOrganization => Persists the
Organization_Users-Object

If we invoke addUser + addUserToOrganization
=> the User has afterwards NO organisation_users set, no matter if we do:
session.refresh(user) or session.flush() or whatever.

Methode Call:
http://code.google.com/p/openmeetings/source/browse/branches/dev/injection/src/app/org/openmeetings/app/data/user/Usermanagement.java#514


Links to source files:
http://code.google.com/p/openmeetings/source/browse/branches/dev/injection/src/app/org/openmeetings/app/persistence/beans/user/Users.java
http://code.google.com/p/openmeetings/source/browse/branches/dev/injection/src/app/org/openmeetings/app/persistence/beans/domain/Organisation_Users.java
http://code.google.com/p/openmeetings/source/browse/branches/dev/injection/src/app/org/openmeetings/app/persistence/beans/domain/Organisation_Users.java


persistance.xml:
http://code.google.com/p/openmeetings/source/browse/branches/dev/injection/src/META-INF/persistence.xml

Spring Config EntityManager / SessionConfig:
http://code.google.com/p/openmeetings/source/browse/branches/dev/injection/WebContent/WEB-INF/openmeetings-applicationContext.xml

Thank you very much,
Sebastian

2011/8/18 Michael Dick <mi...@gmail.com>

> Hi Sebastian,
>
> The binary downloads of OpenJPA includes the Java EE jars we use with
> OpenJPA (look in the lib directory). The spec implementations we use come
> from Geronimo, but any Java EE 6.0 compliant version of the API should work
> for you.
>
> You can also find these jars in the maven central repository at :
> http://search.maven.org/#search|ga|1|a%3A%22geronimo-jpa_2.0_spec%22<http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22geronimo-jpa_2.0_spec%22>
> <
> http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22geronimo-jpa_2.0_spec%22
> >
>
> I did check the geronimo-jpa jar and it does contain a few geronimo
> specific
> classes, I believe these are used with OSGi and should not cause any
> problems for you.
>
> I'm sorry I don't have sufficient experience with Tomcat to give advice on
> where the jars should go. Hopefully someone else on the list can help with
> that.
>
> -mike
>
> On Thu, Aug 18, 2011 at 10:28 AM, Craig L Russell
> <cr...@oracle.com>wrote:
>
> > Cross posting from users...
> >
> > Can anyone help?
> >
> > Craig
> >
> > Begin forwarded message:
> >
> >  From: "seba.wagner@gmail.com" <se...@gmail.com>
> >> Date: August 18, 2011 12:24:04 AM PDT
> >> To: users@openjpa.apache.org
> >> Subject: openJPA dependcies with latest openJPA-2.1.x and
> >> javax.persistance.**PersistanceProvider / javaee-apo
> >> Reply-To: users@openjpa.apache.org
> >>
> >>
> >> Hi,
> >>
> >> we are migrating a larger Open Source project (OpenMeetings) from
> >> Hibernate
> >> to openJPA for Apache incubation and face some issues with openJPA's
> >> dependencies to javax.persistance.**PersistanceProvider:
> >>
> >>
> >> We already have the javaee-api-5.1.1.jar (
> >> http://openmeetings.**googlecode.com/svn/trunk/**
> >> singlewebapp/server/red5/lib/**javaee-api-5.1.1.jar<
> http://openmeetings.googlecode.com/svn/trunk/singlewebapp/server/red5/lib/javaee-api-5.1.1.jar
> >
> >> )
> >> in the servers lib that has an incompatible version of the interface
> >> javax.persistance.**PersistanceProvide.
> >> The application server is a modified Tomcat server integrated with
> Spring.
> >>
> >> Now the questions is:
> >> When we use the openjpa-2.1.x-all.jar and remove the javax.persistance.*
> >> classes from javaee-api-5.1.1.jar we HAVE to move openjpa-2.1.x-all.jar
> to
> >> the servers/lib (instead of webapps/openmeetings/WEB-INF/**lib) because
> >> the
> >> application server itself needs the javax.perstistance.* classes
> available
> >> too.
> >>
> >> Separating the javax.perstistance.* from the openjpa-2.1.x-all.jar and
> >> just
> >> moving that to the server-lib doesn't work too as those
> >> javax.perstistance.*
> >> from the openjpa-2.1.x-all.jar seem to have some depencies to
> >> *apache.geronimo.xyz*.
> >>
> >> So my questions are:
> >> Where can we get a javax.persistance.* library that is compatible with
> >> openJPA-2.1.x ? The one from the maven directory:
> >> http://download.java.net/**maven/2/javax/javaee-api/6.0/<
> http://download.java.net/maven/2/javax/javaee-api/6.0/>does NOT work. It
> >> throws some Exception about invalid class. Seems like a compile error in
> >> their build server.
> >>
> >> Where is the best place to put the openJPA-2.1.x JAR(s) ? Servers-lib or
> >> WEB-INF/lib ? We want to be able to deploy multiple times the
> >> openmeetings-webapp into the same applications server. From my point of
> >> view
> >> you have to put them into WEB-INF/lib then?
> >>
> >>
> >> Thank you very much,
> >> Sebastian
> >>
> >>
> >> --
> >> Sebastian Wagner
> >> http://www.webbase-design.de
> >> http://openmeetings.**googlecode.com <
> http://openmeetings.googlecode.com>
> >> http://www.wagner-sebastian.**com <http://www.wagner-sebastian.com>
> >> seba.wagner@gmail.com
> >>
> >
> > Craig L Russell
> > Architect, Oracle
> > http://db.apache.org/jdo
> > 408 276-5638 mailto:Craig.Russell@oracle.**com <Craig.Russell@oracle.com
> >
> > P.S. A good JDO? O, Gasp!
> >
> >
>



-- 
Sebastian Wagner
http://www.webbase-design.de
http://openmeetings.googlecode.com
http://www.wagner-sebastian.com
seba.wagner@gmail.com

Re: openJPA dependcies with latest openJPA-2.1.x and javax.persistance.PersistanceProvider / javaee-apo

Posted by "seba.wagner@gmail.com" <se...@gmail.com>.
Hi Michael,


thanks for pointing to the rights JARs for the persistance-package.
I was able to solve that conflict by putting the javax.persistance.* (so the
geronimo-jpa_2.0_spec-1.1.jar) in the Tomcat-lib and all the other JARs
including openJPA Jar itself in the webapps-WEB-INF/lib.

However I am still wonder if there is an advice on this? We have scenarios
from users and customers that would like to run multiple instances of
openmeetings in the same tomcat servlet container.
Maybe somebody has some advice on that?

Also we face a *slight* problem with the Relations that openJPA is not able
to load after it is updated on its relations.

Example Relation
Users.java<http://code.google.com/p/openmeetings/source/browse/branches/dev/injection/src/app/org/openmeetings/app/persistence/beans/user/Users.java><=>
Organisation_User.java<http://code.google.com/p/openmeetings/source/browse/branches/dev/injection/src/app/org/openmeetings/app/persistence/beans/domain/Organisation_Users.java><=>
Organisation.java<http://code.google.com/p/openmeetings/source/browse/branches/dev/injection/src/app/org/openmeetings/app/persistence/beans/domain/Organisation_Users.java>

so the User Object has an
attribute<http://code.google.com/p/openmeetings/source/browse/branches/dev/injection/src/app/org/openmeetings/app/persistence/beans/user/Users.java#84>
:
@OneToMany(fetch = FetchType.EAGER)
    @JoinColumn(name = "user_id", insertable = true, updatable = true)
    private List<Organisation_Users> organisation_users;

We need this extra object Organization_Users cause we have an attribute
*isModerator* in each Organization_Users-Object to mark special Users with
Moderator privileges for certain Orgs.

We update/add Users and Organization_Users INDEPENTLY.
Meaning:
we have a Java Method: addUser => Persists the Users-Object
and we have Java Method: addUserToOrganization => Persists the
Organization_Users-Object

If we invoke addUser + addUserToOrganization
=> the User has afterwards NO organisation_users set, no matter if we do:
session.refresh(user) or session.flush() or whatever.

Methode Call:
http://code.google.com/p/openmeetings/source/browse/branches/dev/injection/src/app/org/openmeetings/app/data/user/Usermanagement.java#514


Links to source files:
http://code.google.com/p/openmeetings/source/browse/branches/dev/injection/src/app/org/openmeetings/app/persistence/beans/user/Users.java
http://code.google.com/p/openmeetings/source/browse/branches/dev/injection/src/app/org/openmeetings/app/persistence/beans/domain/Organisation_Users.java
http://code.google.com/p/openmeetings/source/browse/branches/dev/injection/src/app/org/openmeetings/app/persistence/beans/domain/Organisation_Users.java


persistance.xml:
http://code.google.com/p/openmeetings/source/browse/branches/dev/injection/src/META-INF/persistence.xml

Spring Config EntityManager / SessionConfig:
http://code.google.com/p/openmeetings/source/browse/branches/dev/injection/WebContent/WEB-INF/openmeetings-applicationContext.xml

Thank you very much,
Sebastian

2011/8/18 Michael Dick <mi...@gmail.com>

> Hi Sebastian,
>
> The binary downloads of OpenJPA includes the Java EE jars we use with
> OpenJPA (look in the lib directory). The spec implementations we use come
> from Geronimo, but any Java EE 6.0 compliant version of the API should work
> for you.
>
> You can also find these jars in the maven central repository at :
> http://search.maven.org/#search|ga|1|a%3A%22geronimo-jpa_2.0_spec%22<http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22geronimo-jpa_2.0_spec%22>
> <
> http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22geronimo-jpa_2.0_spec%22
> >
>
> I did check the geronimo-jpa jar and it does contain a few geronimo
> specific
> classes, I believe these are used with OSGi and should not cause any
> problems for you.
>
> I'm sorry I don't have sufficient experience with Tomcat to give advice on
> where the jars should go. Hopefully someone else on the list can help with
> that.
>
> -mike
>
> On Thu, Aug 18, 2011 at 10:28 AM, Craig L Russell
> <cr...@oracle.com>wrote:
>
> > Cross posting from users...
> >
> > Can anyone help?
> >
> > Craig
> >
> > Begin forwarded message:
> >
> >  From: "seba.wagner@gmail.com" <se...@gmail.com>
> >> Date: August 18, 2011 12:24:04 AM PDT
> >> To: users@openjpa.apache.org
> >> Subject: openJPA dependcies with latest openJPA-2.1.x and
> >> javax.persistance.**PersistanceProvider / javaee-apo
> >> Reply-To: users@openjpa.apache.org
> >>
> >>
> >> Hi,
> >>
> >> we are migrating a larger Open Source project (OpenMeetings) from
> >> Hibernate
> >> to openJPA for Apache incubation and face some issues with openJPA's
> >> dependencies to javax.persistance.**PersistanceProvider:
> >>
> >>
> >> We already have the javaee-api-5.1.1.jar (
> >> http://openmeetings.**googlecode.com/svn/trunk/**
> >> singlewebapp/server/red5/lib/**javaee-api-5.1.1.jar<
> http://openmeetings.googlecode.com/svn/trunk/singlewebapp/server/red5/lib/javaee-api-5.1.1.jar
> >
> >> )
> >> in the servers lib that has an incompatible version of the interface
> >> javax.persistance.**PersistanceProvide.
> >> The application server is a modified Tomcat server integrated with
> Spring.
> >>
> >> Now the questions is:
> >> When we use the openjpa-2.1.x-all.jar and remove the javax.persistance.*
> >> classes from javaee-api-5.1.1.jar we HAVE to move openjpa-2.1.x-all.jar
> to
> >> the servers/lib (instead of webapps/openmeetings/WEB-INF/**lib) because
> >> the
> >> application server itself needs the javax.perstistance.* classes
> available
> >> too.
> >>
> >> Separating the javax.perstistance.* from the openjpa-2.1.x-all.jar and
> >> just
> >> moving that to the server-lib doesn't work too as those
> >> javax.perstistance.*
> >> from the openjpa-2.1.x-all.jar seem to have some depencies to
> >> *apache.geronimo.xyz*.
> >>
> >> So my questions are:
> >> Where can we get a javax.persistance.* library that is compatible with
> >> openJPA-2.1.x ? The one from the maven directory:
> >> http://download.java.net/**maven/2/javax/javaee-api/6.0/<
> http://download.java.net/maven/2/javax/javaee-api/6.0/>does NOT work. It
> >> throws some Exception about invalid class. Seems like a compile error in
> >> their build server.
> >>
> >> Where is the best place to put the openJPA-2.1.x JAR(s) ? Servers-lib or
> >> WEB-INF/lib ? We want to be able to deploy multiple times the
> >> openmeetings-webapp into the same applications server. From my point of
> >> view
> >> you have to put them into WEB-INF/lib then?
> >>
> >>
> >> Thank you very much,
> >> Sebastian
> >>
> >>
> >> --
> >> Sebastian Wagner
> >> http://www.webbase-design.de
> >> http://openmeetings.**googlecode.com <
> http://openmeetings.googlecode.com>
> >> http://www.wagner-sebastian.**com <http://www.wagner-sebastian.com>
> >> seba.wagner@gmail.com
> >>
> >
> > Craig L Russell
> > Architect, Oracle
> > http://db.apache.org/jdo
> > 408 276-5638 mailto:Craig.Russell@oracle.**com <Craig.Russell@oracle.com
> >
> > P.S. A good JDO? O, Gasp!
> >
> >
>



-- 
Sebastian Wagner
http://www.webbase-design.de
http://openmeetings.googlecode.com
http://www.wagner-sebastian.com
seba.wagner@gmail.com

Re: openJPA dependcies with latest openJPA-2.1.x and javax.persistance.PersistanceProvider / javaee-apo

Posted by Mark Struberg <st...@yahoo.de>.
regarding tomcat:

vi conf/catalina.properties

add the following line
shared.loader=${catalina.base}/webapps/lib/*.jar

then put all your shared classes into webapps/lib.
This is kind of an EAR scenario without EJBs ;)
The SharedClassLoader will become the parent of all WebappClassLoaders.

LieGrue,
strub

--- On Thu, 8/18/11, Michael Dick <mi...@gmail.com> wrote:

> From: Michael Dick <mi...@gmail.com>
> Subject: Re: openJPA dependcies with latest openJPA-2.1.x and javax.persistance.PersistanceProvider / javaee-apo
> To: dev@openjpa.apache.org, users@openjpa.apache.org
> Date: Thursday, August 18, 2011, 3:31 PM
> Hi Sebastian,
> 
> The binary downloads of OpenJPA includes the Java EE jars
> we use with
> OpenJPA (look in the lib directory). The spec
> implementations we use come
> from Geronimo, but any Java EE 6.0 compliant version of the
> API should work
> for you.
> 
> You can also find these jars in the maven central
> repository at :
> http://search.maven.org/#search|ga|1|a%3A%22geronimo-jpa_2.0_spec%22<http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22geronimo-jpa_2.0_spec%22>
> 
> I did check the geronimo-jpa jar and it does contain a few
> geronimo specific
> classes, I believe these are used with OSGi and should not
> cause any
> problems for you.
> 
> I'm sorry I don't have sufficient experience with Tomcat to
> give advice on
> where the jars should go. Hopefully someone else on the
> list can help with
> that.
> 
> -mike
> 
> On Thu, Aug 18, 2011 at 10:28 AM, Craig L Russell
> <cr...@oracle.com>wrote:
> 
> > Cross posting from users...
> >
> > Can anyone help?
> >
> > Craig
> >
> > Begin forwarded message:
> >
> >  From: "seba.wagner@gmail.com"
> <se...@gmail.com>
> >> Date: August 18, 2011 12:24:04 AM PDT
> >> To: users@openjpa.apache.org
> >> Subject: openJPA dependcies with latest
> openJPA-2.1.x and
> >> javax.persistance.**PersistanceProvider /
> javaee-apo
> >> Reply-To: users@openjpa.apache.org
> >>
> >>
> >> Hi,
> >>
> >> we are migrating a larger Open Source project
> (OpenMeetings) from
> >> Hibernate
> >> to openJPA for Apache incubation and face some
> issues with openJPA's
> >> dependencies to
> javax.persistance.**PersistanceProvider:
> >>
> >>
> >> We already have the javaee-api-5.1.1.jar (
> >> http://openmeetings.**googlecode.com/svn/trunk/**
> >>
> singlewebapp/server/red5/lib/**javaee-api-5.1.1.jar<http://openmeetings.googlecode.com/svn/trunk/singlewebapp/server/red5/lib/javaee-api-5.1.1.jar>
> >> )
> >> in the servers lib that has an incompatible
> version of the interface
> >> javax.persistance.**PersistanceProvide.
> >> The application server is a modified Tomcat server
> integrated with Spring.
> >>
> >> Now the questions is:
> >> When we use the openjpa-2.1.x-all.jar and remove
> the javax.persistance.*
> >> classes from javaee-api-5.1.1.jar we HAVE to move
> openjpa-2.1.x-all.jar to
> >> the servers/lib (instead of
> webapps/openmeetings/WEB-INF/**lib) because
> >> the
> >> application server itself needs the
> javax.perstistance.* classes available
> >> too.
> >>
> >> Separating the javax.perstistance.* from the
> openjpa-2.1.x-all.jar and
> >> just
> >> moving that to the server-lib doesn't work too as
> those
> >> javax.perstistance.*
> >> from the openjpa-2.1.x-all.jar seem to have some
> depencies to
> >> *apache.geronimo.xyz*.
> >>
> >> So my questions are:
> >> Where can we get a javax.persistance.* library
> that is compatible with
> >> openJPA-2.1.x ? The one from the maven directory:
> >> http://download.java.net/**maven/2/javax/javaee-api/6.0/<http://download.java.net/maven/2/javax/javaee-api/6.0/>does
> NOT work. It
> >> throws some Exception about invalid class. Seems
> like a compile error in
> >> their build server.
> >>
> >> Where is the best place to put the openJPA-2.1.x
> JAR(s) ? Servers-lib or
> >> WEB-INF/lib ? We want to be able to deploy
> multiple times the
> >> openmeetings-webapp into the same applications
> server. From my point of
> >> view
> >> you have to put them into WEB-INF/lib then?
> >>
> >>
> >> Thank you very much,
> >> Sebastian
> >>
> >>
> >> --
> >> Sebastian Wagner
> >> http://www.webbase-design.de
> >> http://openmeetings.**googlecode.com
> <http://openmeetings.googlecode.com>
> >> http://www.wagner-sebastian.**com <http://www.wagner-sebastian.com>
> >> seba.wagner@gmail.com
> >>
> >
> > Craig L Russell
> > Architect, Oracle
> > http://db.apache.org/jdo
> > 408 276-5638 mailto:Craig.Russell@oracle.**com <Cr...@oracle.com>
> > P.S. A good JDO? O, Gasp!
> >
> >
> 

Re: openJPA dependcies with latest openJPA-2.1.x and javax.persistance.PersistanceProvider / javaee-apo

Posted by Mark Struberg <st...@yahoo.de>.
regarding tomcat:

vi conf/catalina.properties

add the following line
shared.loader=${catalina.base}/webapps/lib/*.jar

then put all your shared classes into webapps/lib.
This is kind of an EAR scenario without EJBs ;)
The SharedClassLoader will become the parent of all WebappClassLoaders.

LieGrue,
strub

--- On Thu, 8/18/11, Michael Dick <mi...@gmail.com> wrote:

> From: Michael Dick <mi...@gmail.com>
> Subject: Re: openJPA dependcies with latest openJPA-2.1.x and javax.persistance.PersistanceProvider / javaee-apo
> To: dev@openjpa.apache.org, users@openjpa.apache.org
> Date: Thursday, August 18, 2011, 3:31 PM
> Hi Sebastian,
> 
> The binary downloads of OpenJPA includes the Java EE jars
> we use with
> OpenJPA (look in the lib directory). The spec
> implementations we use come
> from Geronimo, but any Java EE 6.0 compliant version of the
> API should work
> for you.
> 
> You can also find these jars in the maven central
> repository at :
> http://search.maven.org/#search|ga|1|a%3A%22geronimo-jpa_2.0_spec%22<http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22geronimo-jpa_2.0_spec%22>
> 
> I did check the geronimo-jpa jar and it does contain a few
> geronimo specific
> classes, I believe these are used with OSGi and should not
> cause any
> problems for you.
> 
> I'm sorry I don't have sufficient experience with Tomcat to
> give advice on
> where the jars should go. Hopefully someone else on the
> list can help with
> that.
> 
> -mike
> 
> On Thu, Aug 18, 2011 at 10:28 AM, Craig L Russell
> <cr...@oracle.com>wrote:
> 
> > Cross posting from users...
> >
> > Can anyone help?
> >
> > Craig
> >
> > Begin forwarded message:
> >
> >  From: "seba.wagner@gmail.com"
> <se...@gmail.com>
> >> Date: August 18, 2011 12:24:04 AM PDT
> >> To: users@openjpa.apache.org
> >> Subject: openJPA dependcies with latest
> openJPA-2.1.x and
> >> javax.persistance.**PersistanceProvider /
> javaee-apo
> >> Reply-To: users@openjpa.apache.org
> >>
> >>
> >> Hi,
> >>
> >> we are migrating a larger Open Source project
> (OpenMeetings) from
> >> Hibernate
> >> to openJPA for Apache incubation and face some
> issues with openJPA's
> >> dependencies to
> javax.persistance.**PersistanceProvider:
> >>
> >>
> >> We already have the javaee-api-5.1.1.jar (
> >> http://openmeetings.**googlecode.com/svn/trunk/**
> >>
> singlewebapp/server/red5/lib/**javaee-api-5.1.1.jar<http://openmeetings.googlecode.com/svn/trunk/singlewebapp/server/red5/lib/javaee-api-5.1.1.jar>
> >> )
> >> in the servers lib that has an incompatible
> version of the interface
> >> javax.persistance.**PersistanceProvide.
> >> The application server is a modified Tomcat server
> integrated with Spring.
> >>
> >> Now the questions is:
> >> When we use the openjpa-2.1.x-all.jar and remove
> the javax.persistance.*
> >> classes from javaee-api-5.1.1.jar we HAVE to move
> openjpa-2.1.x-all.jar to
> >> the servers/lib (instead of
> webapps/openmeetings/WEB-INF/**lib) because
> >> the
> >> application server itself needs the
> javax.perstistance.* classes available
> >> too.
> >>
> >> Separating the javax.perstistance.* from the
> openjpa-2.1.x-all.jar and
> >> just
> >> moving that to the server-lib doesn't work too as
> those
> >> javax.perstistance.*
> >> from the openjpa-2.1.x-all.jar seem to have some
> depencies to
> >> *apache.geronimo.xyz*.
> >>
> >> So my questions are:
> >> Where can we get a javax.persistance.* library
> that is compatible with
> >> openJPA-2.1.x ? The one from the maven directory:
> >> http://download.java.net/**maven/2/javax/javaee-api/6.0/<http://download.java.net/maven/2/javax/javaee-api/6.0/>does
> NOT work. It
> >> throws some Exception about invalid class. Seems
> like a compile error in
> >> their build server.
> >>
> >> Where is the best place to put the openJPA-2.1.x
> JAR(s) ? Servers-lib or
> >> WEB-INF/lib ? We want to be able to deploy
> multiple times the
> >> openmeetings-webapp into the same applications
> server. From my point of
> >> view
> >> you have to put them into WEB-INF/lib then?
> >>
> >>
> >> Thank you very much,
> >> Sebastian
> >>
> >>
> >> --
> >> Sebastian Wagner
> >> http://www.webbase-design.de
> >> http://openmeetings.**googlecode.com
> <http://openmeetings.googlecode.com>
> >> http://www.wagner-sebastian.**com <http://www.wagner-sebastian.com>
> >> seba.wagner@gmail.com
> >>
> >
> > Craig L Russell
> > Architect, Oracle
> > http://db.apache.org/jdo
> > 408 276-5638 mailto:Craig.Russell@oracle.**com <Cr...@oracle.com>
> > P.S. A good JDO? O, Gasp!
> >
> >
> 

Re: openJPA dependcies with latest openJPA-2.1.x and javax.persistance.PersistanceProvider / javaee-apo

Posted by Michael Dick <mi...@gmail.com>.
Hi Sebastian,

The binary downloads of OpenJPA includes the Java EE jars we use with
OpenJPA (look in the lib directory). The spec implementations we use come
from Geronimo, but any Java EE 6.0 compliant version of the API should work
for you.

You can also find these jars in the maven central repository at :
http://search.maven.org/#search|ga|1|a%3A%22geronimo-jpa_2.0_spec%22<http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22geronimo-jpa_2.0_spec%22>

I did check the geronimo-jpa jar and it does contain a few geronimo specific
classes, I believe these are used with OSGi and should not cause any
problems for you.

I'm sorry I don't have sufficient experience with Tomcat to give advice on
where the jars should go. Hopefully someone else on the list can help with
that.

-mike

On Thu, Aug 18, 2011 at 10:28 AM, Craig L Russell
<cr...@oracle.com>wrote:

> Cross posting from users...
>
> Can anyone help?
>
> Craig
>
> Begin forwarded message:
>
>  From: "seba.wagner@gmail.com" <se...@gmail.com>
>> Date: August 18, 2011 12:24:04 AM PDT
>> To: users@openjpa.apache.org
>> Subject: openJPA dependcies with latest openJPA-2.1.x and
>> javax.persistance.**PersistanceProvider / javaee-apo
>> Reply-To: users@openjpa.apache.org
>>
>>
>> Hi,
>>
>> we are migrating a larger Open Source project (OpenMeetings) from
>> Hibernate
>> to openJPA for Apache incubation and face some issues with openJPA's
>> dependencies to javax.persistance.**PersistanceProvider:
>>
>>
>> We already have the javaee-api-5.1.1.jar (
>> http://openmeetings.**googlecode.com/svn/trunk/**
>> singlewebapp/server/red5/lib/**javaee-api-5.1.1.jar<http://openmeetings.googlecode.com/svn/trunk/singlewebapp/server/red5/lib/javaee-api-5.1.1.jar>
>> )
>> in the servers lib that has an incompatible version of the interface
>> javax.persistance.**PersistanceProvide.
>> The application server is a modified Tomcat server integrated with Spring.
>>
>> Now the questions is:
>> When we use the openjpa-2.1.x-all.jar and remove the javax.persistance.*
>> classes from javaee-api-5.1.1.jar we HAVE to move openjpa-2.1.x-all.jar to
>> the servers/lib (instead of webapps/openmeetings/WEB-INF/**lib) because
>> the
>> application server itself needs the javax.perstistance.* classes available
>> too.
>>
>> Separating the javax.perstistance.* from the openjpa-2.1.x-all.jar and
>> just
>> moving that to the server-lib doesn't work too as those
>> javax.perstistance.*
>> from the openjpa-2.1.x-all.jar seem to have some depencies to
>> *apache.geronimo.xyz*.
>>
>> So my questions are:
>> Where can we get a javax.persistance.* library that is compatible with
>> openJPA-2.1.x ? The one from the maven directory:
>> http://download.java.net/**maven/2/javax/javaee-api/6.0/<http://download.java.net/maven/2/javax/javaee-api/6.0/>does NOT work. It
>> throws some Exception about invalid class. Seems like a compile error in
>> their build server.
>>
>> Where is the best place to put the openJPA-2.1.x JAR(s) ? Servers-lib or
>> WEB-INF/lib ? We want to be able to deploy multiple times the
>> openmeetings-webapp into the same applications server. From my point of
>> view
>> you have to put them into WEB-INF/lib then?
>>
>>
>> Thank you very much,
>> Sebastian
>>
>>
>> --
>> Sebastian Wagner
>> http://www.webbase-design.de
>> http://openmeetings.**googlecode.com <http://openmeetings.googlecode.com>
>> http://www.wagner-sebastian.**com <http://www.wagner-sebastian.com>
>> seba.wagner@gmail.com
>>
>
> Craig L Russell
> Architect, Oracle
> http://db.apache.org/jdo
> 408 276-5638 mailto:Craig.Russell@oracle.**com <Cr...@oracle.com>
> P.S. A good JDO? O, Gasp!
>
>

Re: openJPA dependcies with latest openJPA-2.1.x and javax.persistance.PersistanceProvider / javaee-apo

Posted by Michael Dick <mi...@gmail.com>.
Hi Sebastian,

The binary downloads of OpenJPA includes the Java EE jars we use with
OpenJPA (look in the lib directory). The spec implementations we use come
from Geronimo, but any Java EE 6.0 compliant version of the API should work
for you.

You can also find these jars in the maven central repository at :
http://search.maven.org/#search|ga|1|a%3A%22geronimo-jpa_2.0_spec%22<http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22geronimo-jpa_2.0_spec%22>

I did check the geronimo-jpa jar and it does contain a few geronimo specific
classes, I believe these are used with OSGi and should not cause any
problems for you.

I'm sorry I don't have sufficient experience with Tomcat to give advice on
where the jars should go. Hopefully someone else on the list can help with
that.

-mike

On Thu, Aug 18, 2011 at 10:28 AM, Craig L Russell
<cr...@oracle.com>wrote:

> Cross posting from users...
>
> Can anyone help?
>
> Craig
>
> Begin forwarded message:
>
>  From: "seba.wagner@gmail.com" <se...@gmail.com>
>> Date: August 18, 2011 12:24:04 AM PDT
>> To: users@openjpa.apache.org
>> Subject: openJPA dependcies with latest openJPA-2.1.x and
>> javax.persistance.**PersistanceProvider / javaee-apo
>> Reply-To: users@openjpa.apache.org
>>
>>
>> Hi,
>>
>> we are migrating a larger Open Source project (OpenMeetings) from
>> Hibernate
>> to openJPA for Apache incubation and face some issues with openJPA's
>> dependencies to javax.persistance.**PersistanceProvider:
>>
>>
>> We already have the javaee-api-5.1.1.jar (
>> http://openmeetings.**googlecode.com/svn/trunk/**
>> singlewebapp/server/red5/lib/**javaee-api-5.1.1.jar<http://openmeetings.googlecode.com/svn/trunk/singlewebapp/server/red5/lib/javaee-api-5.1.1.jar>
>> )
>> in the servers lib that has an incompatible version of the interface
>> javax.persistance.**PersistanceProvide.
>> The application server is a modified Tomcat server integrated with Spring.
>>
>> Now the questions is:
>> When we use the openjpa-2.1.x-all.jar and remove the javax.persistance.*
>> classes from javaee-api-5.1.1.jar we HAVE to move openjpa-2.1.x-all.jar to
>> the servers/lib (instead of webapps/openmeetings/WEB-INF/**lib) because
>> the
>> application server itself needs the javax.perstistance.* classes available
>> too.
>>
>> Separating the javax.perstistance.* from the openjpa-2.1.x-all.jar and
>> just
>> moving that to the server-lib doesn't work too as those
>> javax.perstistance.*
>> from the openjpa-2.1.x-all.jar seem to have some depencies to
>> *apache.geronimo.xyz*.
>>
>> So my questions are:
>> Where can we get a javax.persistance.* library that is compatible with
>> openJPA-2.1.x ? The one from the maven directory:
>> http://download.java.net/**maven/2/javax/javaee-api/6.0/<http://download.java.net/maven/2/javax/javaee-api/6.0/>does NOT work. It
>> throws some Exception about invalid class. Seems like a compile error in
>> their build server.
>>
>> Where is the best place to put the openJPA-2.1.x JAR(s) ? Servers-lib or
>> WEB-INF/lib ? We want to be able to deploy multiple times the
>> openmeetings-webapp into the same applications server. From my point of
>> view
>> you have to put them into WEB-INF/lib then?
>>
>>
>> Thank you very much,
>> Sebastian
>>
>>
>> --
>> Sebastian Wagner
>> http://www.webbase-design.de
>> http://openmeetings.**googlecode.com <http://openmeetings.googlecode.com>
>> http://www.wagner-sebastian.**com <http://www.wagner-sebastian.com>
>> seba.wagner@gmail.com
>>
>
> Craig L Russell
> Architect, Oracle
> http://db.apache.org/jdo
> 408 276-5638 mailto:Craig.Russell@oracle.**com <Cr...@oracle.com>
> P.S. A good JDO? O, Gasp!
>
>

Fwd: openJPA dependcies with latest openJPA-2.1.x and javax.persistance.PersistanceProvider / javaee-apo

Posted by Craig L Russell <cr...@oracle.com>.
Cross posting from users...

Can anyone help?

Craig

Begin forwarded message:

> From: "seba.wagner@gmail.com" <se...@gmail.com>
> Date: August 18, 2011 12:24:04 AM PDT
> To: users@openjpa.apache.org
> Subject: openJPA dependcies with latest openJPA-2.1.x and  
> javax.persistance.PersistanceProvider / javaee-apo
> Reply-To: users@openjpa.apache.org
>
> Hi,
>
> we are migrating a larger Open Source project (OpenMeetings) from  
> Hibernate
> to openJPA for Apache incubation and face some issues with openJPA's
> dependencies to javax.persistance.PersistanceProvider:
>
>
> We already have the javaee-api-5.1.1.jar (
> http://openmeetings.googlecode.com/svn/trunk/singlewebapp/server/red5/lib/javaee-api-5.1.1.jar)
> in the servers lib that has an incompatible version of the interface
> javax.persistance.PersistanceProvide.
> The application server is a modified Tomcat server integrated with  
> Spring.
>
> Now the questions is:
> When we use the openjpa-2.1.x-all.jar and remove the  
> javax.persistance.*
> classes from javaee-api-5.1.1.jar we HAVE to move openjpa-2.1.x- 
> all.jar to
> the servers/lib (instead of webapps/openmeetings/WEB-INF/lib)  
> because the
> application server itself needs the javax.perstistance.* classes  
> available
> too.
>
> Separating the javax.perstistance.* from the openjpa-2.1.x-all.jar  
> and just
> moving that to the server-lib doesn't work too as those  
> javax.perstistance.*
> from the openjpa-2.1.x-all.jar seem to have some depencies to
> *apache.geronimo.xyz*.
>
> So my questions are:
> Where can we get a javax.persistance.* library that is compatible with
> openJPA-2.1.x ? The one from the maven directory:
> http://download.java.net/maven/2/javax/javaee-api/6.0/ does NOT  
> work. It
> throws some Exception about invalid class. Seems like a compile  
> error in
> their build server.
>
> Where is the best place to put the openJPA-2.1.x JAR(s) ? Servers- 
> lib or
> WEB-INF/lib ? We want to be able to deploy multiple times the
> openmeetings-webapp into the same applications server. From my point  
> of view
> you have to put them into WEB-INF/lib then?
>
>
> Thank you very much,
> Sebastian
>
>
> -- 
> Sebastian Wagner
> http://www.webbase-design.de
> http://openmeetings.googlecode.com
> http://www.wagner-sebastian.com
> seba.wagner@gmail.com

Craig L Russell
Architect, Oracle
http://db.apache.org/jdo
408 276-5638 mailto:Craig.Russell@oracle.com
P.S. A good JDO? O, Gasp!