Home > OS >  Cannot generate JPA Hibernate Metamodel classes in IntelliJ IDEA
Cannot generate JPA Hibernate Metamodel classes in IntelliJ IDEA

Time:11-10

In my Java project, I get "java: cannot find symbol" errors pointing Metamodel classes e.g. Company_.

So, first I checked my-project\target\generated-sources\annotations and see that it is empty. Then, after several search on the web and SO, I see that the necessary settings seems to be ok and this is the first time I get this problem.

Here is corresponding settings in pom.xml:

<dependency>
    <groupId>org.hibernate</groupId>
    <artifactId>hibernate-jpamodelgen</artifactId>
    <version>5.3.7.Final</version>
</dependency>

And I have already had this settings and these have not been changed:

Settings

Settings > Build execution, Deployment > Compiler > Annotation Processors > my-project (selected) :
Enable annotation processing (checked)
Obtain processors from project classpath (selected)
Store generated sources relative to: Module content root
Production sources directory: target\generated-sources\annotations
Test sources directory: target\generated-test-sources\test-annotations

I tried to rebuild project, module, etc. but there is still nothing in my-project\target\generated-sources\annotations directory. So, how can I generate these JPA Hibernate Metamodel classes in IntelliJ IDEA?

CodePudding user response:

Try remove .Final from version or just use another version

  • Related