Himanshu Pratap
1 min readMay 10, 2020

Configure Eclipse IDE for JPA MetaModel Generation for Jhipster Project

Issue:

After generating a project using Jhipster 6.8.0, when the project was imported to Eclipse IDE 2020–03 (4.15.0), Eclipse IDE shows error to <entity name>QueryService.java file. Probably, Eclipse could not generate jpa static meta model classes <entiti name>_ . Even though “hibernate-jpamodelgen” depenedency is present in pom.xml, still it gives the error.

Solution:

You need to enable annotation processing and add two external jar files viz hibernate-jpamodelgen and jaxb-api to the project.

You can download mentioned external jar files viz hibernate-jpamodelgen and jaxb-api from maven repository file. Links are

  1. https://repo1.maven.org/maven2/org/hibernate/hibernate-jpamodelgen/5.4.12.Final/hibernate-jpamodelgen-5.4.12.Final.jar
  2. https://repo1.maven.org/maven2/javax/xml/bind/jaxb-api/2.3.1/jaxb-api-2.3.1.jar

Enable Annotation and Add these external jar as follows:

Under Eclipse project Explorer window ->Right Click Project Name -> Properties -> Java Compiler-> Annotation processing -> [Tick Enable project specific settings, Tick Enable annotation processing] -> Factory Path ->Add External jars -> [ Select downloaded jars]-> Apply & Close.

Enable annotation processing
Add external jar files
Himanshu Pratap
Himanshu Pratap

Written by Himanshu Pratap

System Administrator and Full stack web developer.

No responses yet