-->
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.  [ 9 posts ] 
Author Message
 Post subject: Running the tests
PostPosted: Fri Jan 27, 2006 8:04 pm 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
If I run dist, or any of it's dependant targets, all is well. But I cannot run the junit or compiletest targets. How are the tests typically run?

Code:
D:\workspace-hibtools3\HibernateExt>D:\apache-ant-1.6.5-bin\apache-ant-1.6.5\bin\ant -debug -lib D:\workspace-hibto
ols3\Hibernate3\lib\ junit
Apache Ant version 1.6.5 compiled on June 2 2005
Buildfile: build.xml
Adding reference: ant.PropertyHelper
Detected Java version: 1.4 in: D:\Sun\AppServer\jdk\jre
Detected OS: Windows XP
Adding reference: ant.ComponentHelper
Setting ro project property: ant.version -> Apache Ant version 1.6.5 compiled on June 2 2005
Setting ro project property: ant.file -> D:\workspace-hibtools3\HibernateExt\build.xml
Adding reference: ant.projectHelper
Adding reference: ant.parsing.context
Adding reference: ant.targets
parsing buildfile D:\workspace-hibtools3\HibernateExt\build.xml with URI = file:///D:/workspace-hibtools3/Hibernate
Ext/build.xml
Setting ro project property: ant.project.name -> HibernateExt
Adding reference: HibernateExt
Setting ro project property: ant.file.HibernateExt -> D:\workspace-hibtools3\HibernateExt\build.xml
Project base dir set to: D:\workspace-hibtools3\HibernateExt
+Target:
+Target: dist
+Target: clean
[property] Loading D:\workspace-hibtools3\HibernateExt\build.properties
[property] Unable to find property file: D:\workspace-hibtools3\HibernateExt\build.properties
[property] Loading C:\Documents and Settings\Administrator\.ant.properties
[property] Unable to find property file: C:\Documents and Settings\Administrator\.ant.properties
Setting project property: Name -> Hibernate Extensions
Setting project property: name -> hibernate-extensions
Setting project property: version -> 3.0
Importing file common/common-build.xml from D:\workspace-hibtools3\HibernateExt\build.xml
parsing buildfile D:\workspace-hibtools3\HibernateExt\common\common-build.xml with URI = file:///D:/workspace-hibto
ols3/HibernateExt/common/common-build.xml
Setting ro project property: ant.file.common-build -> D:\workspace-hibtools3\HibernateExt\common\common-build.xml
Adding reference: lib.class.path
Adding reference: support.files
Adding reference: source.files
Adding reference: junit.batchtestset
Adding reference: testsrc.path
Adding reference: junit.classpath
+Target: with.clover
+Target: cloverreport.html
+Target: cloverreport
Already defined in main or a previous import, define clean as common-build.clean
+Target: common-build.clean
+Target: init
+Target: compile
+Target: compiletest
+Target: instrument
+Target: copytest
+Target: copysource
+Target: copylib
+Target: copydoc
+Target: jar
+Target: javadoc
+Target: extras
Already defined in main or a previous import, define dist as common-build.dist
+Target: common-build.dist
+Target: info
+Target: junit
+Target: junitinstrument
+Target: junitreport
+Target: run
+Target: checkstyle
+Target: patch
Setting project property: common-build.basedir -> D:\workspace-hibtools3\HibernateExt\common
[property] Loading D:\workspace-hibtools3\HibernateExt\common\build.properties
[property] Unable to find property file: D:\workspace-hibtools3\HibernateExt\common\build.properties
[property] Loading C:\Documents and Settings\Administrator\.ant.properties
[property] Unable to find property file: C:\Documents and Settings\Administrator\.ant.properties
Setting project property: src.dir -> D:\workspace-hibtools3\HibernateExt\src\java
Setting project property: test.dir -> D:\workspace-hibtools3\HibernateExt\src\test
Setting project property: lib.dir -> D:\workspace-hibtools3\HibernateExt\lib
Setting project property: build.dir -> D:\workspace-hibtools3\HibernateExt\build
Setting project property: classes.dir -> D:\workspace-hibtools3\HibernateExt\build\classes
Setting project property: dist.target.dir -> D:\workspace-hibtools3\HibernateExt\target
Setting project property: dist.dir -> D:\workspace-hibtools3\HibernateExt\target\hibernate-extensions
Setting project property: instrumenttest.out.dir -> instrumenttestout
Setting project property: doc.dir -> D:\workspace-hibtools3\HibernateExt\doc
Setting project property: doc.api.dir -> D:\workspace-hibtools3\HibernateExt\doc\api
Setting project property: doc.reference.dir -> D:\workspace-hibtools3\HibernateExt\doc\reference
Setting project property: dist.doc.dir -> D:\workspace-hibtools3\HibernateExt\target\hibernate-extensions\doc
Setting project property: dist.api.dir -> D:\workspace-hibtools3\HibernateExt\target\hibernate-extensions\doc\api
Setting project property: dist.src.dir -> D:\workspace-hibtools3\HibernateExt\target\hibernate-extensions\src
Setting project property: dist.test.dir -> D:\workspace-hibtools3\HibernateExt\target\hibernate-extensions\test
Setting project property: dist.lib.dir -> D:\workspace-hibtools3\HibernateExt\target\hibernate-extensions\lib
Setting project property: jar.name -> hibernate-extensions
Setting project property: jar.file.name -> D:\workspace-hibtools3\HibernateExt\target\hibernate-extensions/hibernat
e-extensions.jar
Setting project property: javadoc -> http://java.sun.com/j2se/1.4/docs/api
Setting project property: javac.debug -> on
Setting project property: javac.optimize -> off
Setting project property: hibernate-core.home -> D:\workspace-hibtools3\hibernate-3.1
Setting project property: hibernate-core.jar -> D:\workspace-hibtools3\hibernate-3.1\hibernate3.jar
Setting project property: hibernate-core.lib.dir -> D:\workspace-hibtools3\hibernate-3.1\lib
Setting project property: hibernate-core.jdbc.dir -> D:\workspace-hibtools3\hibernate-3.1\lib
Setting project property: hibernate-core.doc.api -> D:\workspace-hibtools3\hibernate-3.1\doc\api
Setting project property: hibernate-cvs.doc.reference -> D:\workspace-hibtools3\Hibernate3\doc\reference
Could not load a dependent class (com/sun/media/jai/codec/FileSeekableStream) for type image
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type sshexec
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type scp
Could not load a dependent class (jdepend/xmlui/JDepend) for type jdepend
fileset: Setup scanner in dir D:\workspace-hibtools3\hibernate-3.1\lib with patternSet{ includes: [junit-*.jar, ant
-junit-*.jar] excludes: [] }
Class org.apache.tools.ant.taskdefs.optional.junit.JUnitTask loaded from parent loader (parentFirst)
Could not load a dependent class (com/sun/media/jai/codec/FileSeekableStream) for type image
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type sshexec
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type scp
Could not load a dependent class (jdepend/xmlui/JDepend) for type jdepend
fileset: Setup scanner in dir D:\workspace-hibtools3\hibernate-3.1\lib with patternSet{ includes: [junit-*.jar, ant
-junit-*.jar] excludes: [] }
Class org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator loaded from parent loader (parentFirst)
Could not load a dependent class (com/sun/media/jai/codec/FileSeekableStream) for type image
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type sshexec
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type scp
Property ${clover.jar} has not been set
Adding reference: lib.class.path
Could not load a dependent class (com/sun/media/jai/codec/FileSeekableStream) for type image
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type sshexec
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type scp
Could not load a dependent class (jdepend/xmlui/JDepend) for type jdepend
Adding reference: support.files
Could not load a dependent class (com/sun/media/jai/codec/FileSeekableStream) for type image
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type sshexec
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type scp
Could not load a dependent class (jdepend/xmlui/JDepend) for type jdepend
Adding reference: source.files
Could not load a dependent class (com/sun/media/jai/codec/FileSeekableStream) for type image
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type sshexec
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type scp
Adding reference: junit.batchtestset
Could not load a dependent class (com/sun/media/jai/codec/FileSeekableStream) for type image
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type sshexec
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type scp
Adding reference: testsrc.path
Setting project property: clover.out.dir -> cloverout
Setting project property: clover.jar -> D:\apache-ant-1.6.5-bin\apache-ant-1.6.5\bin\../lib/clover.jar
  [taskdef] Could not load definitions from resource clovertasks. It could not be found.
Could not load a dependent class (com/sun/media/jai/codec/FileSeekableStream) for type image
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type sshexec
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type scp
Adding reference: junit.classpath
Attempting to create object of type org.apache.tools.ant.helper.DefaultExecutor
Adding reference: ant.executor
Build sequence for target(s) `junit' is [init, compile, compiletest, junit]
Complete build sequence is [init, compile, compiletest, junit, copytest, instrument, common-build.clean, copysource
, checkstyle, patch, javadoc, jar, copylib, with.clover, junitreport, cloverreport.html, cloverreport, extras, copy
doc, common-build.dist, run, dist, clean, junitinstrument, info, ]

init:
Setting project property: subversion -> 2006-01-27 02:55:17
Setting project property: DSTAMP -> 20060127
Setting project property: TSTAMP -> 1455
Setting project property: TODAY -> January 27 2006
     [echo] Build Hibernate Extensions-3.0 (2006-01-27 02:55:17)

BUILD FAILED
D:\workspace-hibtools3\HibernateExt\common\common-build.xml:167: D:\workspace-hibtools3\HibernateExt\src\java not f
ound.
        at org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(AbstractFileSet.java:349)
        at org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:404)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
        at org.apache.tools.ant.Main.runBuild(Main.java:668)
        at org.apache.tools.ant.Main.startAnt(Main.java:187)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)

Total time: 1 second


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 28, 2006 4:31 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
cd tools
..\build junit

but in my day2day testing i just use eclipse to run the tests.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 28, 2006 4:58 am 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
danke

what is the difference between dist in the build file under HibernateExt and dist in the build file under tools and dist in the build file under common?

I don't know if you remember, but I know I have told you that I could never get the tests to run w/out changing whether or not junit uses the fork attribute. Perhaps it was because I was doing this from an entirely wrong build file.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 28, 2006 5:10 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
the main build file is not really maintained at the moment.

the dist in tools "extends" what is being done in common as far as i remember.

note, the build/contribute instructions always talk about tools build.xml - if it doesn't let me know and i'll fix it.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 28, 2006 5:14 am 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
Hmm ...

still getting one of these for most,

java.io.FileNotFoundException: D:\src\testsupport\anttest-build.xml

Are you setting anything via .properties file ?

... and lots of these

java.lang.NoClassDefFoundError: org/dom4j/DocumentException

even though dom4j is clearly in the classpath for ant (w/in eclipse) .

How are you putting this in the classpath ?

and yes, these are probably basic ant issues ;)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 28, 2006 5:22 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
why run the tests via ant from eclipse anyway ? Just run ToolAllTests.

but anyway i dont remember having issues with running the ant from eclipse...will check and get back to you.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 28, 2006 5:25 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
just ran them ... had some errors, but no ant problems.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 28, 2006 5:27 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
and the error was just that i hadn't put hsqldb.jar into the libs.

but again, just run ToolAlltTests

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 28, 2006 5:28 am 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
I'll do it in the morning ... thanks .... zzzzzzz


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