-->
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.  [ 8 posts ] 
Author Message
 Post subject: CVS build error (quick newbie question)
PostPosted: Thu Jul 21, 2005 5:30 pm 
Newbie

Joined: Wed May 12, 2004 5:09 pm
Posts: 17
Location: Los Angeles
Hi,

Trying to build from source for the first time. Here's what I did:

cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/hibernate co HibernateExt
cd HibernateExt
ant -p

I've got an error about ../hibernate-3.1/lib not found. So I did this:

cd ..
cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/hibernate co Hibernate3
mv Hibernate3 hibernate-3.1
cd HibernateExt/tools
ant -p

And this is what I'm getting:

Buildfile: build.xml
/usr1/home/eelagin/HTools/HibernateExt/tools/build.xml:16: The following error occurred while executing this line:
/usr1/home/eelagin/HTools/HibernateExt/common/common-build.xml:58: taskdef A class needed by class org.apache.tools.ant.taskdefs.optional.junit.JUnitTask cannot be found: junit/framework/Test

junit jar is in ../hibernate-3.1/lib.

What am I doing wrong?

Is there a step-by-step instruction how to build hibernate-tools from the source? I'm assuming there is a build task in build.xml.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 21, 2005 7:10 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
http://www.hibernate.org/268.html

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 21, 2005 7:21 pm 
Newbie

Joined: Wed May 12, 2004 5:09 pm
Posts: 17
Location: Los Angeles
Followed the instuctions, Hibernate 3 built fine. When I try:

cd HibernateExt
sh build.sh

I get:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/Launcher

This class is in ../hibernate-3.1/lib/ant-launcher-1.6.3.jar.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 21, 2005 7:28 pm 
Newbie

Joined: Wed May 12, 2004 5:09 pm
Posts: 17
Location: Los Angeles
The error in my previous post is because the HibernateExt/build.sh assumes ../hibernate-3.0, not 3.1.
So I changed it to 3.1 in build.sh but now I'm getting this:

sh build.sh jar
Buildfile: build.xml

init:
[echo] Build Hibernate Extensions-3.0 (2005-07-21 03:12:38)

BUILD FAILED
/usr1/home/eelagin/HTools/HibernateExt/common/common-build.xml:140: /usr1/home/eelagin/HTools/HibernateExt/src/java not found.

Total time: 2 seconds

src/java is in the tools/ directory on HibernateExt, but there is no build.sh there.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 21, 2005 8:57 pm 
Newbie

Joined: Wed May 12, 2004 5:09 pm
Posts: 17
Location: Los Angeles
It seems there are some inconsistencies in the current HibernateExt and Hibernate3 as they are in cvs.

For instance, HibernateExt/build.sh refers to hibernate 3.0, and HibernateExt/common/common-build.xml - to hibernate 3.1.

So which one should we build tools with? And what exactly is the command? After the jar task in my previous post, I also tried this:

cd HibernateExt
sh build.sh

But after a while is gives:

init:
[echo] Build Hibernate Tools-3.0.0alpha4 (2005-07-21 04:39:41)

common-build.compile:
[javac] Compiling 52 source files to /usr1/home/eelagin/HTools/HibernateExt/tools/build/classes
[javac] /usr1/home/eelagin/HTools/HibernateExt/tools/src/java/org/hibernate/cfg/JDBCMetaDataConfiguration.java:61: <anonymous org.hibernate.cfg.JDBCMetaDataConfiguration$1> is not abstract and does not override abstract method getReferencedPropertyType(java.lang.String,java.lang.String) in org.hibernate.engine.Mapping
[javac] public Type getPropertyType(String persistentClass, String propertyName) throws MappingException {
[javac] ^
[javac] 1 error

Once again, I have the latest Hibernate3, i.e. ../hibernate-3.1/.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 22, 2005 3:31 am 
Pro
Pro

Joined: Mon Jan 24, 2005 5:39 am
Posts: 216
Location: Germany
Hi,

I had the same problems.
And the above mentioned website didnt help.
I managed to compile the tools
project. I just cded to HibernateExt/tools
and started ant:
>ant

You have to have ant in you path for that.
ant reads the build.xml file. You can stop
the build after target jar.
The generated files are in $root\HibernateExt\tools\target
and worked fine for me.

I am not sure about the hibenate3.jar
Maybe I just copied it to
$root\hibernate-3.1
and the other jars to
$root\hibernate-3.1\lib
or perhaps I compiled it.

Hope this helps.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 22, 2005 4:01 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
build.sh should be changed to point to 3.1, patches are welcome.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 22, 2005 1:16 pm 
Newbie

Joined: Wed May 12, 2004 5:09 pm
Posts: 17
Location: Los Angeles
I have to report that though I've tried everything, the most recent HibernateExt just doesn't want to compile.

When I run the build.sh pointing to ../hibernate-3.1 I get the message in my previous post, and when I

cd HibernateExt/tools
ant

as suggested, I get the infamous junit error again:

BUILD FAILED
/usr1/home/eelagin/HTools/HibernateExt/tools/build.xml:16: The following error occurred while executing this line:
/usr1/home/eelagin/HTools/HibernateExt/common/common-build.xml:58: taskdef A class needed by class org.apache.tools.ant.taskdefs.optional.junit.JUnitTask cannot be found: junit/framework/Test

When I commented out junit in HibernateExt/common/common-build.xml and try to run ant in HibernateExt/tools, I get back to the same error I get when running sh build.sh from HibernateExt, namely:

Buildfile: build.xml
Overriding previous definition of reference to testsrc.path

init:
[echo] Build Hibernate Tools-3.0.0alpha4 (2005-07-22 09:01:31)

common-build.compile:
[javac] Compiling 51 source files to /usr1/home/eelagin/HTools/HibernateExt/tools/build/classes
[javac] /usr1/home/eelagin/HTools/HibernateExt/tools/src/java/org/hibernate/cfg/JDBCMetaDataConfiguration.java:61: <anonymous org.hibernate.cfg.JDBCMetaDataConfiguration$1> is not abstract and does not override abstract method getReferencedPropertyType(java.lang.String,java.lang.String) in org.hibernate.engine.Mapping
[javac] public Type getPropertyType(String persistentClass, String propertyName) throws MappingException {
[javac] ^
[javac] 1 error


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 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.