Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dali » JPA Facet doesn't recognize Hibernate as legitmate
JPA Facet doesn't recognize Hibernate as legitmate [message #710239] Thu, 04 August 2011 21:01 Go to next message
yurchp is currently offline yurchp
Messages: 3
Registered: August 2011
Junior Member
I am trying to add the JPA 2.0 Facet to an Eclipse 3.7 project. I select Platform: Generic 2.0 and User Library with hibernate-jpa-2.0-api-1.0.0.Final.jar. This gives me the error:

The class 'javax.persistence.Entity' is required to be in the selected libraries.

However, that jar does indeed contain that class. It also has source attached. What am I doing wrong?
Re: JPA Facet doesn't recognize Hibernate as legitmate [message #710246 is a reply to message #710239] Thu, 04 August 2011 21:08 Go to previous messageGo to next message
Paul Fullbright is currently offline Paul Fullbright
Messages: 200
Registered: July 2009
Senior Member
I just tried it. I was able to get a library with that jar (and only that jar) to validate for Generic 2.0.

Is there perhaps something else going on? Is your jar maybe corrupt?
Re: JPA Facet doesn't recognize Hibernate as legitmate [message #710598 is a reply to message #710246] Fri, 05 August 2011 07:48 Go to previous messageGo to next message
yurchp is currently offline yurchp
Messages: 3
Registered: August 2011
Junior Member
Thank you Paul. I do not believe the jar is corrupt, as I have used it in another project and it unzips just fine (that's how I verified the existence of the class). As you said, something else could be interfering. I should have mentioned this, but I am specifically using the Spring Tool Suite version of Eclipse 3.7, and the 64 bit JVM (I'm on Win7 x64). However, I switched to the 32 bit JVM and the error remained. I'll post on the Spring forums to see if others have had this problem, but if anyone here is using STS in this way I'd like to know.
Re: JPA Facet doesn't recognize Hibernate as legitmate [message #711023 is a reply to message #710598] Fri, 05 August 2011 17:32 Go to previous messageGo to next message
Paul Fullbright is currently offline Paul Fullbright
Messages: 200
Registered: July 2009
Senior Member
I downloaded Springsource Tools Suite and tried it again a couple of different ways, all successfully. Sorry I'm not any help. If you do manage to find out a way that works, or you find out what in particular is causing your case to fail, I hope you can give us a heads up on that.
Re: JPA Facet doesn't recognize Hibernate as legitmate [message #711508 is a reply to message #711023] Sat, 06 August 2011 08:24 Go to previous messageGo to next message
yurchp is currently offline yurchp
Messages: 3
Registered: August 2011
Junior Member
Paul, thank you once again. I have no idea why this worked, but rebooting my system fixed the problem (as well as another where java.lib.path wasn't getting updated). I guess the easy thing to do is blame Windows...
Re: JPA Facet doesn't recognize Hibernate as legitmate [message #739274 is a reply to message #710239] Mon, 17 October 2011 09:36 Go to previous messageGo to next message
Le Drogo Jean is currently offline Le Drogo Jean
Messages: 2
Registered: October 2011
Junior Member
Hi everybody,

I had a similar problem and rebooting my computer, don't solve it...

I have a JPA Project that was properly working. To show another developper the configuration that he needs to do, I simply remove from my User Librairy the hibernate-jpa-2.0-api-1.0.0.Final.jar. The error message "The class 'javax.persistence.Entity' is required to be in the selected librairies" appears. That's perfectly normal.

But now, I am tring to put it back and Eclipse doesn't seems to find the class anymore. Puting back the JAR in the User Library and selecting it doesn't change the error message...

Any idea welcome.
Re: JPA Facet doesn't recognize Hibernate as legitmate [message #739292 is a reply to message #739274] Mon, 17 October 2011 10:03 Go to previous messageGo to next message
Le Drogo Jean is currently offline Le Drogo Jean
Messages: 2
Registered: October 2011
Junior Member
Ok, I find the problem !

If my jpa-2.0-api-1.0.0.Final.jar is part of my project (for example in a lib directory of my project) then Eclipse doesn't see the class.
If I just move this directory out of my directory project and try again, it works.

It's very suprising for me and might be a bug.

What make me think of the solution is that the default download directory for EclipseLink is out of the project.
icon7.gif  Re: JPA Facet doesn't recognize Hibernate as legitmate [message #892870 is a reply to message #739292] Sat, 30 June 2012 20:40 Go to previous message
Pawel Wloch is currently offline Pawel Wloch
Messages: 1
Registered: June 2012
Junior Member
Hi Jean,

That's genial you have found it out. Sometimes Eclipse and/or eclipse-plugins leave you without any trace of what could be wrong and often the solution is to start again or search in google Smile.

Best regards,
Pawel
Previous Topic:JPA entites from tables
Next Topic:Eclipselink JPA named query not ignoring white spaces.
Goto Forum:
  


Current Time: Wed Sep 17 21:42:59 GMT 2014

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

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