You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Markus Geiß <ma...@live.de> on 2016/02/03 10:31:54 UTC

Advice needed switching to OpenJPA

Hey all,

hope this finds you well. ; o)
As part of our incubation (Apache Fineract) we need to replace our current
JPA implementation (Hibernate).

Given that we are now part of the Apache family we'd like to use Apache
project whenever possible.

Right now we are facing issues with the enhancement mechanism and
looking for some advice on how to proceed. None of our entites could be
enhanced, but we are not sure why.

Here are some, maybe, useful information, we use:
- Java 8
- Spring Data JPA
- Hibernate 4.3

Best,

Markus

.::YAGNI likes a DRY KISS::. 		 	   		  

RE: Advice needed switching to OpenJPA

Posted by Henno Vermeulen <he...@huizemolenaar.nl>.
Have your solved your issue yet? Alternatively you could run your application using the java agent. We are using it in production and it works fine for us. It may also be quicker than build-time enhancement during development.

You can use it by starting your application using the VM argument

-javaagent:<path\to>\openjpa-2.4.0.jar

Henno

-----Oorspronkelijk bericht-----
Van: Roberto Cortez [mailto:radcortez@yahoo.com.INVALID] 
Verzonden: woensdag 3 februari 2016 18:57
Aan: users@openjpa.apache.org
Onderwerp: Re: Advice needed switching to OpenJPA

I'm not very experience with Gradle, but a colleague of mine was trying to do the same and he was running into issue with the Gradle plugin.
He ended up using the Ant Task org.apache.openjpa.ant.PCEnhancerTask in Gradle and he was able to make it work.
Hope it helps.
Cheers,Roberto
      From: Markus Geiß <ma...@live.de>
 To: "users@openjpa.apache.org" <us...@openjpa.apache.org>
 Sent: Wednesday, February 3, 2016 8:15 AM
 Subject: RE: Advice needed switching to OpenJPA
   
We use a gradle plugin ...

Best,

Markus

.::YAGNI likes a DRY KISS::.

> Date: Wed, 3 Feb 2016 16:12:34 +0000
> From: radcortez@yahoo.com.INVALID
> To: users@openjpa.apache.org
> Subject: Re: Advice needed switching to OpenJPA
> 
> Hi,
> I've been using the maven plugin to perform build enhancement using Java 8 and no problem so far.
> How are you doing the build enhancement? Are you using the Maven plugin? If so, do you see the class listed in the output as being enhanced?
> Cheers,Roberto
> 
> 
>      From: Boblitz John <jo...@bertschi.com>
>  To: "users@openjpa.apache.org" <us...@openjpa.apache.org>
>  Sent: Wednesday, February 3, 2016 3:45 PM
>  Subject: RE: Advice needed switching to OpenJPA
>    
> Hello,
> 
> Is it possible that the class is not included in the list of entities in your persistence.xml?
> 
> Regards,
> 
> John
> 
> > -----Original Message-----
> > From: Markus Geiß [mailto:markus.geiss@live.de]
> > Sent: Mittwoch, 3. Februar 2016 16:40
> > To: users@openjpa.apache.org
> > Subject: RE: Advice needed switching to OpenJPA
> > 
> > This is the expection we get, both cases, runtime and build enhancement:
> > 
> > Caused by: <openjpa-2.4.0-r422266:1674604 fatal user error>
> > org.apache.openjpa.util.MetaDataException: The type "class 
> > org.mifosplatform.useradministration.domain.AppUser" has not been 
> > enhanced.
> > 
> > Best,
> > 
> > Markus
> > 
> > .::YAGNI likes a DRY KISS::.
> > 
> > > Subject: Re: Advice needed switching to OpenJPA
> > > From: tim@cliftonfarm.org
> > > To: users@openjpa.apache.org
> > > Date: Wed, 3 Feb 2016 09:35:02 -0500
> > >
> > > On Wed, 2016-02-03 at 10:31 +0100, Markus Geiß wrote:
> > > > Hey all,
> > > >
> > > > hope this finds you well. ; o)
> > > > As part of our incubation (Apache Fineract) we need to replace 
> > > > our current JPA implementation (Hibernate).
> > > >
> > > > Given that we are now part of the Apache family we'd like to use 
> > > > Apache project whenever possible.
> > > >
> > > > Right now we are facing issues with the enhancement mechanism 
> > > > and looking for some advice on how to proceed. None of our 
> > > > entites could be enhanced, but we are not sure why.
> > > >
> > > Could you provide the error messages you're getting?  I recently 
> > > started using OpenJPA 2.4.0 again after a hiatus and found that I 
> > > had to compile my entities with Java 6 bytecode.  Here's the 
> > > relevant part of the
> > > pom.xml:
> > >
> > > <plugin>
> > >    <groupId>org.apache.maven.plugins</groupId>
> > >    <artifactId>maven-compiler-plugin</artifactId>
> > >    <version>3.5</version>
> > >    <configuration>
> > >          <compilerVersion>1.6</compilerVersion>
> > >        <source>1.6</source>
> > >        <target>1.6</target>
> > >        <debug>true</debug>
> > >        <verbose>false</verbose>
> > >    </configuration>
> > > </plugin>
> > >
> > >
> > >
> > > > Here are some, maybe, useful information, we use:
> > > > - Java 8
> > > > - Spring Data JPA
> > > > - Hibernate 4.3
> > > >
> > > > Best,
> > > >
> > > > Markus
> > > >
> > > > .::YAGNI likes a DRY KISS::.
> > >
> > >
> > 
> 
>  
                         

  

Re: Advice needed switching to OpenJPA

Posted by Roberto Cortez <ra...@yahoo.com.INVALID>.
I'm not very experience with Gradle, but a colleague of mine was trying to do the same and he was running into issue with the Gradle plugin.
He ended up using the Ant Task org.apache.openjpa.ant.PCEnhancerTask in Gradle and he was able to make it work.
Hope it helps.
Cheers,Roberto
      From: Markus Geiß <ma...@live.de>
 To: "users@openjpa.apache.org" <us...@openjpa.apache.org> 
 Sent: Wednesday, February 3, 2016 8:15 AM
 Subject: RE: Advice needed switching to OpenJPA
   
We use a gradle plugin ...

Best,

Markus

.::YAGNI likes a DRY KISS::.

> Date: Wed, 3 Feb 2016 16:12:34 +0000
> From: radcortez@yahoo.com.INVALID
> To: users@openjpa.apache.org
> Subject: Re: Advice needed switching to OpenJPA
> 
> Hi,
> I've been using the maven plugin to perform build enhancement using Java 8 and no problem so far.
> How are you doing the build enhancement? Are you using the Maven plugin? If so, do you see the class listed in the output as being enhanced?
> Cheers,Roberto
> 
> 
>      From: Boblitz John <jo...@bertschi.com>
>  To: "users@openjpa.apache.org" <us...@openjpa.apache.org> 
>  Sent: Wednesday, February 3, 2016 3:45 PM
>  Subject: RE: Advice needed switching to OpenJPA
>    
> Hello,
> 
> Is it possible that the class is not included in the list of entities in your persistence.xml?
> 
> Regards,
> 
> John
> 
> > -----Original Message-----
> > From: Markus Geiß [mailto:markus.geiss@live.de]
> > Sent: Mittwoch, 3. Februar 2016 16:40
> > To: users@openjpa.apache.org
> > Subject: RE: Advice needed switching to OpenJPA
> > 
> > This is the expection we get, both cases, runtime and build enhancement:
> > 
> > Caused by: <openjpa-2.4.0-r422266:1674604 fatal user error>
> > org.apache.openjpa.util.MetaDataException: The type "class
> > org.mifosplatform.useradministration.domain.AppUser" has not been
> > enhanced.
> > 
> > Best,
> > 
> > Markus
> > 
> > .::YAGNI likes a DRY KISS::.
> > 
> > > Subject: Re: Advice needed switching to OpenJPA
> > > From: tim@cliftonfarm.org
> > > To: users@openjpa.apache.org
> > > Date: Wed, 3 Feb 2016 09:35:02 -0500
> > >
> > > On Wed, 2016-02-03 at 10:31 +0100, Markus Geiß wrote:
> > > > Hey all,
> > > >
> > > > hope this finds you well. ; o)
> > > > As part of our incubation (Apache Fineract) we need to replace our
> > > > current JPA implementation (Hibernate).
> > > >
> > > > Given that we are now part of the Apache family we'd like to use
> > > > Apache project whenever possible.
> > > >
> > > > Right now we are facing issues with the enhancement mechanism and
> > > > looking for some advice on how to proceed. None of our entites could
> > > > be enhanced, but we are not sure why.
> > > >
> > > Could you provide the error messages you're getting?  I recently
> > > started using OpenJPA 2.4.0 again after a hiatus and found that I had
> > > to compile my entities with Java 6 bytecode.  Here's the relevant part
> > > of the
> > > pom.xml:
> > >
> > > <plugin>
> > >    <groupId>org.apache.maven.plugins</groupId>
> > >    <artifactId>maven-compiler-plugin</artifactId>
> > >    <version>3.5</version>
> > >    <configuration>
> > >          <compilerVersion>1.6</compilerVersion>
> > >        <source>1.6</source>
> > >        <target>1.6</target>
> > >        <debug>true</debug>
> > >        <verbose>false</verbose>
> > >    </configuration>
> > > </plugin>
> > >
> > >
> > >
> > > > Here are some, maybe, useful information, we use:
> > > > - Java 8
> > > > - Spring Data JPA
> > > > - Hibernate 4.3
> > > >
> > > > Best,
> > > >
> > > > Markus
> > > >
> > > > .::YAGNI likes a DRY KISS::.
> > >
> > >
> > 
> 
>  
                         

  

RE: Advice needed switching to OpenJPA

Posted by Markus Geiß <ma...@live.de>.
We use a gradle plugin ...

Best,

Markus

.::YAGNI likes a DRY KISS::.

> Date: Wed, 3 Feb 2016 16:12:34 +0000
> From: radcortez@yahoo.com.INVALID
> To: users@openjpa.apache.org
> Subject: Re: Advice needed switching to OpenJPA
> 
> Hi,
> I've been using the maven plugin to perform build enhancement using Java 8 and no problem so far.
> How are you doing the build enhancement? Are you using the Maven plugin? If so, do you see the class listed in the output as being enhanced?
> Cheers,Roberto
> 
> 
>       From: Boblitz John <jo...@bertschi.com>
>  To: "users@openjpa.apache.org" <us...@openjpa.apache.org> 
>  Sent: Wednesday, February 3, 2016 3:45 PM
>  Subject: RE: Advice needed switching to OpenJPA
>    
> Hello,
> 
> Is it possible that the class is not included in the list of entities in your persistence.xml?
> 
> Regards,
> 
> John
> 
> > -----Original Message-----
> > From: Markus Geiß [mailto:markus.geiss@live.de]
> > Sent: Mittwoch, 3. Februar 2016 16:40
> > To: users@openjpa.apache.org
> > Subject: RE: Advice needed switching to OpenJPA
> > 
> > This is the expection we get, both cases, runtime and build enhancement:
> > 
> > Caused by: <openjpa-2.4.0-r422266:1674604 fatal user error>
> > org.apache.openjpa.util.MetaDataException: The type "class
> > org.mifosplatform.useradministration.domain.AppUser" has not been
> > enhanced.
> > 
> > Best,
> > 
> > Markus
> > 
> > .::YAGNI likes a DRY KISS::.
> > 
> > > Subject: Re: Advice needed switching to OpenJPA
> > > From: tim@cliftonfarm.org
> > > To: users@openjpa.apache.org
> > > Date: Wed, 3 Feb 2016 09:35:02 -0500
> > >
> > > On Wed, 2016-02-03 at 10:31 +0100, Markus Geiß wrote:
> > > > Hey all,
> > > >
> > > > hope this finds you well. ; o)
> > > > As part of our incubation (Apache Fineract) we need to replace our
> > > > current JPA implementation (Hibernate).
> > > >
> > > > Given that we are now part of the Apache family we'd like to use
> > > > Apache project whenever possible.
> > > >
> > > > Right now we are facing issues with the enhancement mechanism and
> > > > looking for some advice on how to proceed. None of our entites could
> > > > be enhanced, but we are not sure why.
> > > >
> > > Could you provide the error messages you're getting?  I recently
> > > started using OpenJPA 2.4.0 again after a hiatus and found that I had
> > > to compile my entities with Java 6 bytecode.  Here's the relevant part
> > > of the
> > > pom.xml:
> > >
> > > <plugin>
> > >     <groupId>org.apache.maven.plugins</groupId>
> > >     <artifactId>maven-compiler-plugin</artifactId>
> > >     <version>3.5</version>
> > >     <configuration>
> > >          <compilerVersion>1.6</compilerVersion>
> > >         <source>1.6</source>
> > >         <target>1.6</target>
> > >         <debug>true</debug>
> > >         <verbose>false</verbose>
> > >     </configuration>
> > > </plugin>
> > >
> > >
> > >
> > > > Here are some, maybe, useful information, we use:
> > > > - Java 8
> > > > - Spring Data JPA
> > > > - Hibernate 4.3
> > > >
> > > > Best,
> > > >
> > > > Markus
> > > >
> > > > .::YAGNI likes a DRY KISS::.
> > >
> > >
> > 
> 
>   
 		 	   		  

Re: Advice needed switching to OpenJPA

Posted by Roberto Cortez <ra...@yahoo.com.INVALID>.
Hi,
I've been using the maven plugin to perform build enhancement using Java 8 and no problem so far.
How are you doing the build enhancement? Are you using the Maven plugin? If so, do you see the class listed in the output as being enhanced?
Cheers,Roberto


      From: Boblitz John <jo...@bertschi.com>
 To: "users@openjpa.apache.org" <us...@openjpa.apache.org> 
 Sent: Wednesday, February 3, 2016 3:45 PM
 Subject: RE: Advice needed switching to OpenJPA
   
Hello,

Is it possible that the class is not included in the list of entities in your persistence.xml?

Regards,

John

> -----Original Message-----
> From: Markus Geiß [mailto:markus.geiss@live.de]
> Sent: Mittwoch, 3. Februar 2016 16:40
> To: users@openjpa.apache.org
> Subject: RE: Advice needed switching to OpenJPA
> 
> This is the expection we get, both cases, runtime and build enhancement:
> 
> Caused by: <openjpa-2.4.0-r422266:1674604 fatal user error>
> org.apache.openjpa.util.MetaDataException: The type "class
> org.mifosplatform.useradministration.domain.AppUser" has not been
> enhanced.
> 
> Best,
> 
> Markus
> 
> .::YAGNI likes a DRY KISS::.
> 
> > Subject: Re: Advice needed switching to OpenJPA
> > From: tim@cliftonfarm.org
> > To: users@openjpa.apache.org
> > Date: Wed, 3 Feb 2016 09:35:02 -0500
> >
> > On Wed, 2016-02-03 at 10:31 +0100, Markus Geiß wrote:
> > > Hey all,
> > >
> > > hope this finds you well. ; o)
> > > As part of our incubation (Apache Fineract) we need to replace our
> > > current JPA implementation (Hibernate).
> > >
> > > Given that we are now part of the Apache family we'd like to use
> > > Apache project whenever possible.
> > >
> > > Right now we are facing issues with the enhancement mechanism and
> > > looking for some advice on how to proceed. None of our entites could
> > > be enhanced, but we are not sure why.
> > >
> > Could you provide the error messages you're getting?  I recently
> > started using OpenJPA 2.4.0 again after a hiatus and found that I had
> > to compile my entities with Java 6 bytecode.  Here's the relevant part
> > of the
> > pom.xml:
> >
> > <plugin>
> >     <groupId>org.apache.maven.plugins</groupId>
> >     <artifactId>maven-compiler-plugin</artifactId>
> >     <version>3.5</version>
> >     <configuration>
> >          <compilerVersion>1.6</compilerVersion>
> >         <source>1.6</source>
> >         <target>1.6</target>
> >         <debug>true</debug>
> >         <verbose>false</verbose>
> >     </configuration>
> > </plugin>
> >
> >
> >
> > > Here are some, maybe, useful information, we use:
> > > - Java 8
> > > - Spring Data JPA
> > > - Hibernate 4.3
> > >
> > > Best,
> > >
> > > Markus
> > >
> > > .::YAGNI likes a DRY KISS::.
> >
> >
> 

  

RE: Advice needed switching to OpenJPA

Posted by Markus Geiß <ma...@live.de>.
It is.
I do really think that OpenJPA reads some meta data as explained in a follow up message.

Best,

Markus

.::YAGNI likes a DRY KISS::.

> From: john.boblitz@bertschi.com
> To: users@openjpa.apache.org
> Subject: RE: Advice needed switching to OpenJPA
> Date: Wed, 3 Feb 2016 15:45:07 +0000
> 
> Hello,
> 
> Is it possible that the class is not included in the list of entities in your persistence.xml?
> 
> Regards,
> 
> John
> 
> > -----Original Message-----
> > From: Markus Geiß [mailto:markus.geiss@live.de]
> > Sent: Mittwoch, 3. Februar 2016 16:40
> > To: users@openjpa.apache.org
> > Subject: RE: Advice needed switching to OpenJPA
> > 
> > This is the expection we get, both cases, runtime and build enhancement:
> > 
> > Caused by: <openjpa-2.4.0-r422266:1674604 fatal user error>
> > org.apache.openjpa.util.MetaDataException: The type "class
> > org.mifosplatform.useradministration.domain.AppUser" has not been
> > enhanced.
> > 
> > Best,
> > 
> > Markus
> > 
> > .::YAGNI likes a DRY KISS::.
> > 
> > > Subject: Re: Advice needed switching to OpenJPA
> > > From: tim@cliftonfarm.org
> > > To: users@openjpa.apache.org
> > > Date: Wed, 3 Feb 2016 09:35:02 -0500
> > >
> > > On Wed, 2016-02-03 at 10:31 +0100, Markus Geiß wrote:
> > > > Hey all,
> > > >
> > > > hope this finds you well. ; o)
> > > > As part of our incubation (Apache Fineract) we need to replace our
> > > > current JPA implementation (Hibernate).
> > > >
> > > > Given that we are now part of the Apache family we'd like to use
> > > > Apache project whenever possible.
> > > >
> > > > Right now we are facing issues with the enhancement mechanism and
> > > > looking for some advice on how to proceed. None of our entites could
> > > > be enhanced, but we are not sure why.
> > > >
> > > Could you provide the error messages you're getting?  I recently
> > > started using OpenJPA 2.4.0 again after a hiatus and found that I had
> > > to compile my entities with Java 6 bytecode.  Here's the relevant part
> > > of the
> > > pom.xml:
> > >
> > > <plugin>
> > > 	<groupId>org.apache.maven.plugins</groupId>
> > > 	<artifactId>maven-compiler-plugin</artifactId>
> > > 	<version>3.5</version>
> > > 	<configuration>
> > >  		<compilerVersion>1.6</compilerVersion>
> > > 		<source>1.6</source>
> > > 		<target>1.6</target>
> > > 		<debug>true</debug>
> > > 		<verbose>false</verbose>
> > > 	</configuration>
> > > </plugin>
> > >
> > >
> > >
> > > > Here are some, maybe, useful information, we use:
> > > > - Java 8
> > > > - Spring Data JPA
> > > > - Hibernate 4.3
> > > >
> > > > Best,
> > > >
> > > > Markus
> > > >
> > > > .::YAGNI likes a DRY KISS::.
> > >
> > >
> > 
 		 	   		  

RE: Advice needed switching to OpenJPA

Posted by Boblitz John <jo...@bertschi.com>.
Hello,

Is it possible that the class is not included in the list of entities in your persistence.xml?

Regards,

John

> -----Original Message-----
> From: Markus Geiß [mailto:markus.geiss@live.de]
> Sent: Mittwoch, 3. Februar 2016 16:40
> To: users@openjpa.apache.org
> Subject: RE: Advice needed switching to OpenJPA
> 
> This is the expection we get, both cases, runtime and build enhancement:
> 
> Caused by: <openjpa-2.4.0-r422266:1674604 fatal user error>
> org.apache.openjpa.util.MetaDataException: The type "class
> org.mifosplatform.useradministration.domain.AppUser" has not been
> enhanced.
> 
> Best,
> 
> Markus
> 
> .::YAGNI likes a DRY KISS::.
> 
> > Subject: Re: Advice needed switching to OpenJPA
> > From: tim@cliftonfarm.org
> > To: users@openjpa.apache.org
> > Date: Wed, 3 Feb 2016 09:35:02 -0500
> >
> > On Wed, 2016-02-03 at 10:31 +0100, Markus Geiß wrote:
> > > Hey all,
> > >
> > > hope this finds you well. ; o)
> > > As part of our incubation (Apache Fineract) we need to replace our
> > > current JPA implementation (Hibernate).
> > >
> > > Given that we are now part of the Apache family we'd like to use
> > > Apache project whenever possible.
> > >
> > > Right now we are facing issues with the enhancement mechanism and
> > > looking for some advice on how to proceed. None of our entites could
> > > be enhanced, but we are not sure why.
> > >
> > Could you provide the error messages you're getting?  I recently
> > started using OpenJPA 2.4.0 again after a hiatus and found that I had
> > to compile my entities with Java 6 bytecode.  Here's the relevant part
> > of the
> > pom.xml:
> >
> > <plugin>
> > 	<groupId>org.apache.maven.plugins</groupId>
> > 	<artifactId>maven-compiler-plugin</artifactId>
> > 	<version>3.5</version>
> > 	<configuration>
> >  		<compilerVersion>1.6</compilerVersion>
> > 		<source>1.6</source>
> > 		<target>1.6</target>
> > 		<debug>true</debug>
> > 		<verbose>false</verbose>
> > 	</configuration>
> > </plugin>
> >
> >
> >
> > > Here are some, maybe, useful information, we use:
> > > - Java 8
> > > - Spring Data JPA
> > > - Hibernate 4.3
> > >
> > > Best,
> > >
> > > Markus
> > >
> > > .::YAGNI likes a DRY KISS::.
> >
> >
> 

RE: Advice needed switching to OpenJPA

Posted by Markus Geiß <ma...@live.de>.
This is the expection we get, both cases, runtime and build enhancement:

Caused by: <openjpa-2.4.0-r422266:1674604 fatal user error> org.apache.openjpa.util.MetaDataException: The type "class org.mifosplatform.useradministration.domain.AppUser" has not been enhanced.

Best,

Markus

.::YAGNI likes a DRY KISS::.

> Subject: Re: Advice needed switching to OpenJPA
> From: tim@cliftonfarm.org
> To: users@openjpa.apache.org
> Date: Wed, 3 Feb 2016 09:35:02 -0500
> 
> On Wed, 2016-02-03 at 10:31 +0100, Markus Geiß wrote:
> > Hey all,
> > 
> > hope this finds you well. ; o)
> > As part of our incubation (Apache Fineract) we need to replace our current
> > JPA implementation (Hibernate).
> > 
> > Given that we are now part of the Apache family we'd like to use Apache
> > project whenever possible.
> > 
> > Right now we are facing issues with the enhancement mechanism and
> > looking for some advice on how to proceed. None of our entites could be
> > enhanced, but we are not sure why.
> > 
> Could you provide the error messages you're getting?  I recently started
> using OpenJPA 2.4.0 again after a hiatus and found that I had to compile
> my entities with Java 6 bytecode.  Here's the relevant part of the
> pom.xml:
> 
> <plugin>
> 	<groupId>org.apache.maven.plugins</groupId>
> 	<artifactId>maven-compiler-plugin</artifactId>
> 	<version>3.5</version>
> 	<configuration>
>  		<compilerVersion>1.6</compilerVersion>
> 		<source>1.6</source>
> 		<target>1.6</target>
> 		<debug>true</debug>
> 		<verbose>false</verbose>
> 	</configuration>
> </plugin>
> 
> 
> 
> > Here are some, maybe, useful information, we use:
> > - Java 8
> > - Spring Data JPA
> > - Hibernate 4.3
> > 
> > Best,
> > 
> > Markus
> > 
> > .::YAGNI likes a DRY KISS::. 		 	   		  
> 
> 
 		 	   		  

Re: Advice needed switching to OpenJPA

Posted by Tim Watts <ti...@cliftonfarm.org>.
On Wed, 2016-02-03 at 10:31 +0100, Markus Geiß wrote:
> Hey all,
> 
> hope this finds you well. ; o)
> As part of our incubation (Apache Fineract) we need to replace our current
> JPA implementation (Hibernate).
> 
> Given that we are now part of the Apache family we'd like to use Apache
> project whenever possible.
> 
> Right now we are facing issues with the enhancement mechanism and
> looking for some advice on how to proceed. None of our entites could be
> enhanced, but we are not sure why.
> 
Could you provide the error messages you're getting?  I recently started
using OpenJPA 2.4.0 again after a hiatus and found that I had to compile
my entities with Java 6 bytecode.  Here's the relevant part of the
pom.xml:

<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-compiler-plugin</artifactId>
	<version>3.5</version>
	<configuration>
 		<compilerVersion>1.6</compilerVersion>
		<source>1.6</source>
		<target>1.6</target>
		<debug>true</debug>
		<verbose>false</verbose>
	</configuration>
</plugin>



> Here are some, maybe, useful information, we use:
> - Java 8
> - Spring Data JPA
> - Hibernate 4.3
> 
> Best,
> 
> Markus
> 
> .::YAGNI likes a DRY KISS::. 		 	   		  



Re: Advice needed switching to OpenJPA

Posted by Maxim Solodovnik <so...@gmail.com>.
here is the ANT example:
https://github.com/apache/openmeetings/blob/3.0.x/build.xml#L738
https://github.com/apache/openmeetings/blob/3.0.x/build.xml#L759

and Maven example
https://github.com/apache/openmeetings/blob/3.1.x/openmeetings-db/pom.xml#L110


On Wed, Feb 3, 2016 at 3:41 PM, Markus Geiß <ma...@live.de> wrote:

> We already played around with a green field application and are facing the
> same issue, even if we set openjpa.RuntimeUnenhancedClasses to force
> runtime enhancement.
>
> I'll look at your code to see any difference.
>
> Best,
>
> Markus
>
> .::YAGNI likes a DRY KISS::.
>
> > Date: Wed, 3 Feb 2016 15:35:01 +0600
> > Subject: Re: Advice needed switching to OpenJPA
> > From: solomax666@gmail.com
> > To: users@openjpa.apache.org
> >
> > We did such migration for our project (openmeetings.apache.org) with the
> > exception we are not using java8 features
> > our entities are being enchanced with no issues if both java7 and java8
> are
> > being used for compilation
> >
> > maybe you can share your code+build files?
> > Or maybe try to localize the problem by creating tiny project
> >
> > On Wed, Feb 3, 2016 at 3:31 PM, Markus Geiß <ma...@live.de>
> wrote:
> >
> > > Hey all,
> > >
> > > hope this finds you well. ; o)
> > > As part of our incubation (Apache Fineract) we need to replace our
> current
> > > JPA implementation (Hibernate).
> > >
> > > Given that we are now part of the Apache family we'd like to use Apache
> > > project whenever possible.
> > >
> > > Right now we are facing issues with the enhancement mechanism and
> > > looking for some advice on how to proceed. None of our entites could be
> > > enhanced, but we are not sure why.
> > >
> > > Here are some, maybe, useful information, we use:
> > > - Java 8
> > > - Spring Data JPA
> > > - Hibernate 4.3
> > >
> > > Best,
> > >
> > > Markus
> > >
> > > .::YAGNI likes a DRY KISS::.
> >
> >
> >
> >
> > --
> > WBR
> > Maxim aka solomax
>




-- 
WBR
Maxim aka solomax

RE: Advice needed switching to OpenJPA

Posted by Markus Geiß <ma...@live.de>.
We already played around with a green field application and are facing the
same issue, even if we set openjpa.RuntimeUnenhancedClasses to force
runtime enhancement.

I'll look at your code to see any difference.

Best,

Markus

.::YAGNI likes a DRY KISS::.

> Date: Wed, 3 Feb 2016 15:35:01 +0600
> Subject: Re: Advice needed switching to OpenJPA
> From: solomax666@gmail.com
> To: users@openjpa.apache.org
> 
> We did such migration for our project (openmeetings.apache.org) with the
> exception we are not using java8 features
> our entities are being enchanced with no issues if both java7 and java8 are
> being used for compilation
> 
> maybe you can share your code+build files?
> Or maybe try to localize the problem by creating tiny project
> 
> On Wed, Feb 3, 2016 at 3:31 PM, Markus Geiß <ma...@live.de> wrote:
> 
> > Hey all,
> >
> > hope this finds you well. ; o)
> > As part of our incubation (Apache Fineract) we need to replace our current
> > JPA implementation (Hibernate).
> >
> > Given that we are now part of the Apache family we'd like to use Apache
> > project whenever possible.
> >
> > Right now we are facing issues with the enhancement mechanism and
> > looking for some advice on how to proceed. None of our entites could be
> > enhanced, but we are not sure why.
> >
> > Here are some, maybe, useful information, we use:
> > - Java 8
> > - Spring Data JPA
> > - Hibernate 4.3
> >
> > Best,
> >
> > Markus
> >
> > .::YAGNI likes a DRY KISS::.
> 
> 
> 
> 
> -- 
> WBR
> Maxim aka solomax
 		 	   		  

Re: Advice needed switching to OpenJPA

Posted by Maxim Solodovnik <so...@gmail.com>.
We did such migration for our project (openmeetings.apache.org) with the
exception we are not using java8 features
our entities are being enchanced with no issues if both java7 and java8 are
being used for compilation

maybe you can share your code+build files?
Or maybe try to localize the problem by creating tiny project

On Wed, Feb 3, 2016 at 3:31 PM, Markus Geiß <ma...@live.de> wrote:

> Hey all,
>
> hope this finds you well. ; o)
> As part of our incubation (Apache Fineract) we need to replace our current
> JPA implementation (Hibernate).
>
> Given that we are now part of the Apache family we'd like to use Apache
> project whenever possible.
>
> Right now we are facing issues with the enhancement mechanism and
> looking for some advice on how to proceed. None of our entites could be
> enhanced, but we are not sure why.
>
> Here are some, maybe, useful information, we use:
> - Java 8
> - Spring Data JPA
> - Hibernate 4.3
>
> Best,
>
> Markus
>
> .::YAGNI likes a DRY KISS::.




-- 
WBR
Maxim aka solomax

Re: Advice needed switching to OpenJPA

Posted by Francesco Chicchiriccò <il...@apache.org>.
On 03/02/2016 11:58, Markus Geiß wrote:
> Is OpenJPA using meta data from the database to do enhancements?

Not aware of OpenJPA internals - not a dev - but I feel so, here's why 
we pass an in-memory H2 instance to openjpa-maven-plugin (as you can see).

> If so, this may explain it a bit, we are using a meta database for tenant
> configuration  without the table layout used by the app, and separate
> db instances per tenant for the application related layout.
>> Subject: Re: Advice needed switching to OpenJPA
>> To: users@openjpa.apache.org
>> From: ilgrosso@apache.org
>> Date: Wed, 3 Feb 2016 10:39:05 +0100
>>
>> On 03/02/2016 10:31, Markus Geiß wrote:
>>> Hey all,
>>>
>>> hope this finds you well. ; o)
>>> As part of our incubation (Apache Fineract) we need to replace our current
>>> JPA implementation (Hibernate).
>>>
>>> Given that we are now part of the Apache family we'd like to use Apache
>>> project whenever possible.
>>>
>>> Right now we are facing issues with the enhancement mechanism and
>>> looking for some advice on how to proceed. None of our entites could be
>>> enhanced, but we are not sure why.
>>>
>>> Here are some, maybe, useful information, we use:
>>> - Java 8
>>> - Spring Data JPA
>>> - Hibernate 4.3 	   		
>> Hi Markus,
>> welcome to the Apache Family :-)
>>
>> At Syncope we had to do the same switch back in 2012, for exactly the
>> same reason; since then we are still on OpenJPA.
>>
>> You can take a look at the relevant sections of this POM [1] -
>> especially the usage of OpenJPA Maven plugin.
>>
>> HTH
>> Regards.
>>
>> [1] https://github.com/apache/syncope/blob/master/core/persistence-jpa/pom.xml

-- 
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Involved at The Apache Software Foundation:
member, Syncope PMC chair, Cocoon PMC, Olingo PMC, CXF committer
http://home.apache.org/~ilgrosso/


RE: Advice needed switching to OpenJPA

Posted by Markus Geiß <ma...@live.de>.
Is OpenJPA using meta data from the database to do enhancements?

If so, this may explain it a bit, we are using a meta database for tenant
configuration  without the table layout used by the app, and separate
db instances per tenant for the application related layout.

Best,

Markus

.::YAGNI likes a DRY KISS::.

> Subject: Re: Advice needed switching to OpenJPA
> To: users@openjpa.apache.org
> From: ilgrosso@apache.org
> Date: Wed, 3 Feb 2016 10:39:05 +0100
> 
> On 03/02/2016 10:31, Markus Geiß wrote:
> > Hey all,
> >
> > hope this finds you well. ; o)
> > As part of our incubation (Apache Fineract) we need to replace our current
> > JPA implementation (Hibernate).
> >
> > Given that we are now part of the Apache family we'd like to use Apache
> > project whenever possible.
> >
> > Right now we are facing issues with the enhancement mechanism and
> > looking for some advice on how to proceed. None of our entites could be
> > enhanced, but we are not sure why.
> >
> > Here are some, maybe, useful information, we use:
> > - Java 8
> > - Spring Data JPA
> > - Hibernate 4.3 	   		
> 
> Hi Markus,
> welcome to the Apache Family :-)
> 
> At Syncope we had to do the same switch back in 2012, for exactly the 
> same reason; since then we are still on OpenJPA.
> 
> You can take a look at the relevant sections of this POM [1] - 
> especially the usage of OpenJPA Maven plugin.
> 
> HTH
> Regards.
> 
> [1] 
> https://github.com/apache/syncope/blob/master/core/persistence-jpa/pom.xml
> 
> -- 
> Francesco Chicchiriccò
> 
> Tirasa - Open Source Excellence
> http://www.tirasa.net/
> 
> Involved at The Apache Software Foundation:
> member, Syncope PMC chair, Cocoon PMC, Olingo PMC, CXF committer
> http://home.apache.org/~ilgrosso/
> 
> 
 		 	   		  

Re: Advice needed switching to OpenJPA

Posted by Francesco Chicchiriccò <il...@apache.org>.
On 03/02/2016 10:31, Markus Geiß wrote:
> Hey all,
>
> hope this finds you well. ; o)
> As part of our incubation (Apache Fineract) we need to replace our current
> JPA implementation (Hibernate).
>
> Given that we are now part of the Apache family we'd like to use Apache
> project whenever possible.
>
> Right now we are facing issues with the enhancement mechanism and
> looking for some advice on how to proceed. None of our entites could be
> enhanced, but we are not sure why.
>
> Here are some, maybe, useful information, we use:
> - Java 8
> - Spring Data JPA
> - Hibernate 4.3 	   		

Hi Markus,
welcome to the Apache Family :-)

At Syncope we had to do the same switch back in 2012, for exactly the 
same reason; since then we are still on OpenJPA.

You can take a look at the relevant sections of this POM [1] - 
especially the usage of OpenJPA Maven plugin.

HTH
Regards.

[1] 
https://github.com/apache/syncope/blob/master/core/persistence-jpa/pom.xml

-- 
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Involved at The Apache Software Foundation:
member, Syncope PMC chair, Cocoon PMC, Olingo PMC, CXF committer
http://home.apache.org/~ilgrosso/