Questions tagged [openjpa-maven-plugin]

OpenJPA Maven Plugin provides useful tasks for building and maintaining an OpenJPA project with maven.

OpenJPA Maven plugin provides useful tasks for building and maintaining an OpenJPA project with maven. All goals work on a given set of JPA entities.

28 questions
10
votes
1 answer

How to enhance a class from a separate jar at build time with openJPA?

I am trying to enhance an Entity class coming from another Jar using maven plugin openjpa-maven-plugin and unfortunately I didn't find a correct way to do it. I have one class MyPojo from module MyDomain packaged in jar my-domain.jar : public class…
fabien7474
  • 16,300
  • 22
  • 96
  • 124
4
votes
3 answers

How to enhance classes properly at build time using Maven? OpenJPA

I am trying to enhance (entities) classes so i will not get this Exception: Exception in thread "main" org.apache.op enjpa.persistence.ArgumentException: Attempt to cast instance…
Wortig
  • 963
  • 2
  • 11
  • 37
4
votes
0 answers

openjpa-maven-plugin does not enhance entity classes at buildtime

I got another Problem with OpenJPA. It seems like my Entities didnt get enhanced even though I inserted the openjpa-maven-plugin in my pom.xml. Here the error code:
Demli95
  • 136
  • 1
  • 12
4
votes
1 answer

warning: annotation processor 'org.apache.openjpa.persistence.meta.AnnotationProcessor6' less than -source '1.8'

I'm getting the warning listed below from the maven-processor-plugin when used to process the Open JPA meta model for Java 8. My project actually builds, but is there a version of this for Java 8 that does not generate this warning? I don't see a…
Mr Smith
  • 3,318
  • 9
  • 47
  • 85
4
votes
0 answers

XML-less @Configuration (no persistence.xml) and openjpa-maven-plugin

Trying to convert my app (spring + jpa) to spring's annotation based @Configuration and get rid of spring app context xml and persistence.xml. All good except openjpa-maven-plugin 2.2.2 i use for build time class enhancement won't work without…
Maxim Suponya
  • 1,419
  • 2
  • 20
  • 43
3
votes
1 answer

Upgrade application using OpenJPA to Java 8

I am trying to upgrade my application to Java 8, but it uses OpenJPA with build time enhancement through the openjpa-maven-plugin 2.3.0, which seems to be the last version. When I build my application, I get an IllegalArgumentException because that…
2
votes
1 answer

Openjpa maven plugin error: Failed to execute goal : enhance

I am working on a migration activity (JDK 1.8 to JDK 11). My pom.xml having org.apache.openjpa openjpa-maven-plugin 3.0.0
Payal
  • 133
  • 7
2
votes
1 answer

Passing the JDBC URL to openjpa-maven-plugin to refresh data in PostgreSQL

In pom.xml I have (taken from http://struberg.wordpress.com/2012/05/10/using-jpa-in-real-projects-part-1/): refresh org.postgresql.Driver
Alexey Romanov
  • 167,066
  • 35
  • 309
  • 487
1
vote
1 answer

How can I perform build time enhancement of JPA entities while running an Arquillian test?

Technology stack: Arquillian embedded-tomee, HSQLDB, openJpa, jdk 1.8. I have spent several days trying to figure out how I can get this all to work together and have come very close IMO. And now I am stuck with this one very generic…
1
vote
1 answer

Cannot run static enhancement of OpenJPA entities with Spring Boot

mvn package fails at the openjpa-maven-plugin:enhance stage when I try to enhance my JPA entities in a Spring Boot app. There's a long error description enhance failed: MetaDataFactory could not be configured (conf.newMetaDataFactoryInstance()…
Adam
  • 5,215
  • 5
  • 51
  • 90
1
vote
0 answers

Failed to query by spring-data-jpa query methods with suffix IN due to the cachedCriteriaQuery is not correct on openjpa 2.4.1

Update: After I digged into the source code of spring-data-jpa repository query methods, I found the root cause is the createQuery method of PartTreeJpaQuery as below. This method will be called by the invoke method of the…
1
vote
0 answers

Include schema generation in openjpa:sql task

I'm using the openjpa-maven-plugin to generate DDL files from my OpenJPA persistence entities. For example: @Entity @Table(schema = "myschema", name = "mytable") public class MyEntity { .... } The openjpa:sql task generates the following…
metacubed
  • 7,031
  • 6
  • 36
  • 65
1
vote
1 answer

Runtime Enhancement in OSGi environment using code

Problem : 1. JPA Classes/entities are in Bundle 1 and Bundle 2 using same persistence unit 2. Bundle 3 is trying to access(wrapper APIs for DB API abstraction) the classes in Bundle 1 and Bundle 2. 3. Runtime enhancement is not working. So…
1
vote
1 answer

slf4j don't work in JBOSS when using openJpa module

My EAR application runs fine when i don't use openJpa. Once i use open JPA i get the "SLF4J fail to load class blaaa ". How to configure the openJpa module to use the SL4J which i provide from pom.xml and avoid that error? I use JBOSS…
user1595858
  • 3,700
  • 15
  • 66
  • 109
1
vote
1 answer

Maven Open JPA Plugin Enhance: Seems to be working but It did not enhance my entity

When I compiled my Maven Project it says that my entity is enhanced. However when I start a database connection through EntityManagerFactory, Error happend on the code here: em = factory.createEntityManager(); I believe that I had followed all the…
toksis
  • 139
  • 1
  • 4
  • 14
1
2