2

I'm having trouble creating a dynamic web project within eclipse to include eclipselink implementation.

When I ckeck the JPA checkbox under the Project Facets, choose EclipseLink 2.4.x as Platform and select the library EclipseLink 2.4.0- Juno that I have downloaded, I get an error:

The class 'org.hibernate.SessionFactory' is required to be in the selected libraries.

As I have no intention of using hibernate, I do not understand this...

If I choose to disable library configuration, the project accepts it and it is up to me to include the needed libraries (EclipseLink) in the classpath of the project. Nevertheless, I would like to understand why I can't use this JPA Facet tool to build my project with EclipseLink.

The Facets I'm using are Dynamic Web Module 3.0, Java 1.7 and JPA 2.0. My eclipse is EE for Web Developers Juno 4.2 with WTP platfrorm.

Thanks

Eric C.
  • 3,310
  • 2
  • 22
  • 29
  • When you say "EE for Web Developers", do you mean the Juno "Eclipse IDE for Java EE Developers" package available from eclipse.org? I ask because it seems you have some hibernate tooling installed. – Neil H Sep 12 '12 at 15:50
  • @Neil H: Yes indeed. There is a lot of things in the package, and I guess the problem comes from there. I also installed the `hibernate tools`. Nevertheless, I didn't see anywhere that when you create a dynamic web project, hibernate is automatically included. I don't understand why I can't ONLY use JPA with Eclipse Link... – Eric C. Sep 12 '12 at 15:55

2 Answers2

1

If you are selecting an EclipseLink Platform and are getting this validation message in the library configuration then there is a bug in the Hibernate Tools version that you are using. The EclipseLink platform will not require this class for proper library configuration. You current workaround is sufficient, but if you would like to use library configuration as designed, it sounds like you will need to uninstall Hibernate Tools from your Eclipse install until they are able to resolve this issue. I recommend filing a bug against Hibernate Tools for this issue.

Neil H
  • 356
  • 1
  • 6
  • I uninstalled everything that was hibernate. It still doesn't work. I tried creating a very simple java project (no dynamic web project), enabled facets for that project, and getting same error... It must come from my eclipse installation but don't find where... Thanks for your answer, it may indeed be a bug somewhere ! – Eric C. Sep 12 '12 at 17:12
  • If you are getting that same error message then you still have some Hibernate Plugins installed. You might want to start over with a clean Juno Java EE install. This will most surely fix the problem. – Neil H Sep 12 '12 at 20:40
0

I also got that problem. When I uninstall the JBOSS in my eclipse, the error was fixed. But if you want to create project with jboss installation, select hibernate as the platform. then no errors. project will be configurate correctly

IDF
  • 93
  • 1
  • 9