Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » How to use static metamodel from dependency project/library?(Trying to use the static metamodel of a backend project as dependency for others)
How to use static metamodel from dependency project/library? [message #1791410] Fri, 29 June 2018 00:01 Go to next message
jose luis romero is currently offline jose luis romeroFriend
Messages: 3
Registered: July 2016
Junior Member
I'm trying to use in a new project (Jax-ws/SOAP) another project as dependency (a "backend" where are all entities, persistence.xml and StaticMetamodel), but I cant use any method (defined in the backend) that uses Metamodel, they throw NPE

What do I have to do to make the 2nd project recognize/generate the metamodels? or the modifications must be done in the backend project?

I'm using eclipselink 2.6.1

backend POM project is very simple:
<modelVersion>4.0.0</modelVersion>
    <groupId>org</groupId>
    <artifactId>SAOS-backend</artifactId>
    <version>1</version>
    <packaging>jar</packaging>
<dependencies>
            <dependency>
                <groupId>org.eclipse.persistence</groupId>
                <artifactId>eclipselink</artifactId>
                <version>2.6.1</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.persistence</groupId>
                <artifactId>org.eclipse.persistence.jpa.modelgen.processor</artifactId>
                <version>2.6.1</version>
            </dependency>
    ....
    ...


Already tried this https://stackoverflow.com/questions/28876074/jpa2-metamodel-generator-does-not-generate-models-from-dependency-libraries
Re: How to use static metamodel from dependency project/library? [message #1793044 is a reply to message #1791410] Mon, 30 July 2018 01:36 Go to previous message
jose luis romero is currently offline jose luis romeroFriend
Messages: 3
Registered: July 2016
Junior Member
update: the problem persists but not like we thought, there are some metamodels that doesn't throw NPE, can be used in criteria or JPQL but some of them doesn't work.
How is this possible?
The same happens trying to use Metas in JUnit test

[Updated on: Mon, 30 July 2018 01:37]

Report message to a moderator

Previous Topic:potential bug in moxy. Object unmarshalled in Binder doesn't match object from Unmarshaller
Next Topic:Supporting table structure changes in JPA/Eclipselink
Goto Forum:
  


Current Time: Sat May 11 01:17:09 GMT 2024

Powered by FUDForum. Page generated in 0.03888 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top