-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Classpath in console configuration
PostPosted: Thu May 18, 2006 5:15 pm 
Newbie

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.


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 19, 2006 2:55 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
hmm...i thought that was fixed ;(

the workaround is to use seperated src directories (which is a recommended practice anyway independent of hibernate ;)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 22, 2006 9:11 am 
Newbie

Joined: Wed Feb 08, 2006 3:57 pm
Posts: 16
I have no idea how this workaround can help.
In any case I cannot specify a filesystem directory, whether it contains sources or not.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 22, 2006 6:44 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
the workaround is to *not* put all your .java and .class files in the same directory; but instead have e.g. a /src and /build directory.

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.