Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Unable to generate Canonical Metamodel(Question about Metamodel generation with EclipseLink)
Unable to generate Canonical Metamodel [message #1711514] Fri, 16 October 2015 15:25 Go to next message
Pedro Silva is currently offline Pedro SilvaFriend
Messages: 2
Registered: January 2015
Junior Member
Hi all,

First of all I couldn't find any documentation inside EclipseLink explaining how to configure and use metamodel generation. Is there any?

So, I'm trying to generate metamodel with EclipseLink so that I can use Criteria API. However, even after configuring my maven project with CanonicalAnotationProcessor I ca't get it to work,

Can anyone help me?

This is my maven setup


                                 <plugin>
					<groupId>org.bsc.maven</groupId>
					<artifactId>maven-processor-plugin</artifactId>
					<version>2.2.4</version>
					<executions>
						<execution>
							<id>eclipselink-jpa-metamodel</id>
							<goals>
								<goal>process</goal>
							</goals>
							<phase>generate-sources</phase>
							<configuration>
								<processors>
									<processor>org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor</processor>
								</processors>
							</configuration>
						</execution>
					</executions>
					<dependencies>
						<dependency>
							<groupId>org.eclipse.persistence</groupId>
							<artifactId>org.eclipse.persistence.jpa.modelgen.processor</artifactId>
							<version>2.6.1</version>
						</dependency>
					</dependencies>
				</plugin>



Maven runs fine but it doesn't generate any metadata classes....

I have also tried to use the option


<compilerArguments>-Aeclipselink.persistencexml=src/main/resources/META-INF/persistence.xml</compilerArguments>



but it fails with:

[INFO] --- maven-processor-plugin:2.2.4:process (eclipselink-jpa-metamodel) @ eclipse-foundation-data ---
[WARNING] diagnostic: warning: The following options were not recognized by any processor: '[eclipselink.persistencexml]'


[Updated on: Fri, 16 October 2015 15:40]

Report message to a moderator

Re: Unable to generate Canonical Metamodel [message #1711533 is a reply to message #1711514] Fri, 16 October 2015 17:45 Go to previous message
Petros Splinakis is currently offline Petros SplinakisFriend
Messages: 12
Registered: September 2014
Junior Member
As far as I can tell the only documentation page related to metamodel generation is the following:

https://wiki.eclipse.org/UserGuide/JPA/Using_the_Canonical_Model_Generator_(ELUG)

Going through earlier posts I can see this error being a common one, this could be an issue so please file a bug for that at bugs.eclipse.org.

As a workaround, you can copy persistence.xml to <project_root>/META-INF/persistence.xml. You will need to remove eclipselink.persistencexml argument in that case.
Previous Topic:Eclipselink performance profiler [Total/Local time]
Next Topic:@OrderBy problem
Goto Forum:
  


Current Time: Thu Dec 12 08:35:16 GMT 2024

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

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

Back to the top