-->
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: QuickStart example compilation fails
PostPosted: Mon Jul 30, 2007 7:34 pm 
Newbie

Joined: Mon Jul 30, 2007 6:32 pm
Posts: 2
Location: Boulder, CO
I seem to be having a linking problem with junit. But this library is included in the /lib folder. This happens every time I type ant, ant eg, etc.. in the home directory of hibernate. I checked JAVA_HOME environment variable is set correctly. Any thoughts?

-Lee

PS. I'm using hibernate-3.2.4.sp1.tar on OS X 10.4
ant dump:

BUILD FAILED
/Applications/webdev/hibernate-3.2/build.xml:111: taskdef A class needed by class org.apache.tools.ant.taskdefs.optional.junit.JUnitTask cannot be found: junit/framework/Test

Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 30, 2007 10:09 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
http://www.hibernate.org/6.html

"You may need to add junit.jar to your $ANT_HOME/lib directory if it is not there already, or alternatively remove the $ANT_HOME/lib/ant-junit.jar file. For Hibernate3, repeat the steps above, but also copy lib/antlr.jar or remove the $ANT_HOME/lib/ant-antlr.jar file. These steps are necessary because Ant ships with plugin stub libraries in its classpath, so Ant plugins for JUnit or Antlr can't be used without copying or removing files (arguably a dysfunctional distribution). If you don't have Ant installed on your machine or don't want to mess with the default Ant installation then, on Windows, just run build.bat to use the bundled Ant libraries."

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject: QuickStart example compilation fails
PostPosted: Tue Jul 31, 2007 10:25 am 
Newbie

Joined: Mon Jul 30, 2007 6:32 pm
Posts: 2
Location: Boulder, CO
Thanks,
That did seem to fix that problem. Now its giving me this for the same command:

Buildfile: build.xml
[taskdef] Could not load definitions from resource clovertasks. It could not be found.

eg:
[mkdir] Created dir: /Applications/webdev/hibernate-3.2/build/eg
[javac] Compiling 8 source files to /Applications/webdev/hibernate-3.2/build/eg
[javac] /Applications/webdev/hibernate-3.2/eg/org/hibernate/auction/Main.java:10: cannot find symbol
[javac] symbol : class FetchMode
[javac] location: package org.hibernate
[javac] import org.hibernate.FetchMode;
[javac] ^
[javac] /Applications/webdev/hibernate-3.2/eg/org/hibernate/auction/Main.java:11: cannot find symbol
[javac] symbol : class FlushMode
[javac] location: package org.hibernate
[javac] import org.hibernate.FlushMode;
etc....

Someone else in these groups had the same [taskdef] line and someone suggested: "rebuild ejb-persistence from ejb-api"
Unfortunately, I'm new to this whole Java/ant paradigm and I have no idea how to do something like that.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 31, 2007 12:14 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
1. Go to http://caveatemptor.hibernate.org/

2. Download the "Hello World" package of your choice

3. Unpack it and follow the instructions in the included README

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


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.