Reputation: 3960
After restarting Eclipse, I get the following error in my project:
This project has the JPA facet, but no JPA project could be created. See the error log for more details.
Nothing I've done (clean project, maven update, etc) will get rid of the error. My JPA Content icon remains greyed out.
It looks like this was a resolved bug at Eclipse bugs...but then why am I still getting it? Should I submit a bug report to Eclipse?
Upvotes: 24
Views: 42335
Reputation: 325
Like kaushikjain said, validate your project and the error will disappear. This worked like a charm to me.
Right click in your project and Validate.
Upvotes: -2
Reputation: 29
Click right button on your project-->properties-->validation-->uncheck JPA Validation .
That works for me!
Upvotes: 1
Reputation: 49
Alt+Enter
in the projectProject facets
JPA
and acceptValidate
Alt+Enter
in the projectProject facets
Upvotes: 4
Reputation: 79
To get rid of this error in Eclipse Luna, I just did a right-click on the project and chose the "Validate" menu item.
Upvotes: 6
Reputation: 1134
Although this is an old thread, will try to give info that might just help someone.
I assume you have imported a project and it is giving this error.
Step 1 : Check under project properties if jpa is configured.
Step 2 : I have used eclipseLink as the user library for jpa. If you are using eclipse as well, try installing the plugin.
Step 3 : Check the version of jpa under project properties-> project facets... check for any conflicts in version, usually seen for java version and or any supporting libs. You should be able to change the version from facets.
JPA installation and configuration JPA installation and config
Step 4 : once JPA is configured for the project, clean and check. This should work.
Upvotes: 2
Reputation: 291
For me all the above didnt worked.
So I tried Project Properties>Validate. It solved my problem.
Upvotes: 24
Reputation: 4137
For me, it was enough to clean the project. Trying to disable JPA in the facet window caused an Exception.
Upvotes: 0
Reputation: 1
If you do not want to use JPA, simply restart your eclipse and clean the project.
I had same problem when I copied JPA Entity to non-JPA project. It worked for me and I hope it does so for yours :)
Upvotes: -3
Reputation: 1
Looks like the problem is in some cases caused by a missing JPA implementation in the classpath. After I added a Maven (test scope) dependency, the Eclipse error message disappeared:
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>4.3.1.Final</version>
<scope>test</scope>
</dependency>
I this special case I had a "war" project that has a "persistence.xml" but no JPA code itself. The JPA stuff is in the referenced libraries (JARs).
Upvotes: 0
Reputation: 1118
This is a configuration problem of the project. To solve this problem go to the project properties, and in the node "project facets" unchecked JPA and apply the changes. Now you can checked JPA and apply again!
Upvotes: 44
Reputation: 65
I had the same problem and resolved it by installing both apt and jdt connectors for m2e.
Go to Window > Preferences > Maven > Discovery > Open Catalog. Look for m2e-apt and m2e-jdt-compiler. Install and then restart eclipse.
Upvotes: 1