I am struggling with the configuration of the Eclipse Dali plugin and Hibernate. The version I'm using is as recommended:
- Eclipse 3.6.1 (Helios SR1) IDE for Java EE Developers (including Dali 2.3)
- JBoss Tools 3.2 (for the Hibernate Tools plugin)
When configuring the Java Persistence properties for my project, I crea开发者_如何转开发ted a user library named "Hibernate JPA" and included the following JARs:
- hibernate-distribution-3.6.1.Final\hibernate3.jar
- hibernate-distribution-3.6.1.Final\lib\jpa\hibernate-jpa-2.0-api-1.0.0.Final.jar
- hibernate-distribution-3.6.1.Final\lib\required\dom4j-1.6.1.jar
- hibernate-distribution-3.6.1.Final\lib\required\slf4j-api-1.6.1.jar
- hibernate-distribution-3.6.1.Final\lib\required\javassist-3.12.0.GA.jar
- hibernate-distribution-3.6.1.Final\lib\required\commons-collections-3.1.jar
- hibernate-distribution-3.6.1.Final\lib\required\antlr-2.7.6.jar
- hibernate-distribution-3.6.1.Final\lib\required\jta-1.1.jar
As long as the hibernate-distribution-3.6.1.Final folder is outside of my project directory, everything works fine. However, if I put the Hibernate folder into the project directory, I get an error saying "Required class org.hibernate.SessionFactory does not exist in selected libraries":
The error text is wrong, the required class is definitely included in hibernate3.jar, and everything works as expected when I move the JARs outside of my project directory.
I have two questions about that:
- I do not understand why the User Library behaves differently depending on whether the JARs are placed inside or outside of my project directory. Could anybody explain what's happening here?
- I would like to have my project in SVN, including all the required libraries. Is there any way to configure Dali to accept User Libraries within the project directory?
Thank you very much.
I was having the same problem cos I forgot to add hibernate-jpa-2.0-api-1.0.0.Final.jar. The only difference is that I'm using 3.5.1-Final cos 3.6.x seems not stable at the moment.
Actually, I'd prefer EclipseLink: everything works fine as a charm. I've wasted many hours with environment configuration :( Last time I've used Hibernate was years ago and looks like troubles to configure still are the same :(
精彩评论