Joined: Wed Feb 08, 2006 3:57 pm Posts: 16
|
Hibernate version:
3.1.3
Tools version:
3.1.0_b5
Also starring:
Eclipse 3.1
Introduction
In classpath section of console configuration I should specify the path to my class-files. Right?
My project is located under c:/work/eclipse/project1
My classes are located under c:/work/eclipse/project1/xflower/objects
Question
How to do that?
Comment
There are two buttons in the dialog window: "Add JAR/Dir" and "Add external JAR".
If I use "Add JAR/Dir" I can select my project "branch" (/project1) and add it to the list.
It appears there as "/project1".
This causes a "Null pointer exception" when I try to create Session Factory from Hibernate perspective.
Using "Add external JAR" button I cannot add the project directory.
Solution
I have found a bad solution, now I'm looking for a good one.
1. Close Eclipse
2. Go to C:\work\eclipse\.metadata\.plugins\org.hibernate.eclipse.console\
3. Open hibernate-console.xml-xx
4. Manually change "/project1" to "c:/work/eclipse/project1".
5. Start Eclipse
Doubts
I don't think editing the hibernate-console.xml file is the best way of adding a directory to classpath.
|
|