Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 76970 invoked from network); 2 Jan 2007 21:52:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Jan 2007 21:52:32 -0000 Received: (qmail 67401 invoked by uid 500); 2 Jan 2007 21:52:34 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 67368 invoked by uid 500); 2 Jan 2007 21:52:34 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 67357 invoked by uid 99); 2 Jan 2007 21:52:34 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Jan 2007 13:52:34 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of ayoung@vigilos.com designates 216.231.46.252 as permitted sender) Received: from [216.231.46.252] (HELO tonga.vigilos.com) (216.231.46.252) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Jan 2007 13:52:24 -0800 Received: from [192.168.10.181] ([192.168.10.181]) by tonga.vigilos.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 2 Jan 2007 13:52:03 -0800 Message-ID: <459AD403.4080202@vigilos.com> Date: Tue, 02 Jan 2007 13:52:03 -0800 From: Alasdair Young User-Agent: Thunderbird 1.5.0.8 (X11/20061115) MIME-Version: 1.0 To: Ant Users List Subject: Re: "java.lang.ClassNotFoundException" when running junit task References: <459ACB14.4080505@vigilos.com> <459ACBF1.5030201@vigilos.com> <459AD10F.507@mindspring.com> In-Reply-To: <459AD10F.507@mindspring.com> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-OriginalArrivalTime: 02 Jan 2007 21:52:03.0154 (UTC) FILETIME=[3CC1C320:01C72EB8] X-Virus-Checked: Checked by ClamAV on apache.org Thanks for the fast response! I don't think that's it - ./build-tests should be in there - 3rd from the end. any other ideas perhaps? - alasdair Scot P. Floess wrote: > Looks like you need to put ./build-tests in your path element. > > location=3D"./build-tests:.:../java/build:../thirdParty/signedJars/jh.j= ar:../thirdParty/signedJars/jai_codec.jar:../thirdParty/signedJars/jcchar= t.jar:../thirdParty/signedJars/jlfgr-1_0.jar:../thirdParty/signedJars/ojd= bc14.jar:../thirdParty/signedJars/scrollabledesktop.jar:../thirdParty/sig= nedJars/ftpbean.jar:../thirdParty/signedJars/jai_core.jar:../thirdParty/s= ignedJars/jdbcpool-0.99.jar:../thirdParty/signedJars/log4j-1.2.5.jar:../t= hirdParty/signedJars/pg73jdbc3.jar:../thirdParty/unsignedJars/jmf.jar:../= thirdParty/unsignedJars/commons-collections.jar:../thirdParty/unsignedJar= s/commons-pool-1.1.jar:../thirdParty/unsignedJars/commons-dbcp-1.1.jar:..= /thirdParty/signedJars/jcalendar.jar:${tomcat-dir}/common/lib/servlet-api= =2Ejar:${tomcat-dir}/common/lib/jsp-api.jar:../thirdParty/unsignedJars/ju= nit-4.1.jar:./build-tests:../javatest:./build-tests/com/vigilos/apps/setu= p/TestScheduledtlTableModel.class" > > /> > > > Alasdair Young wrote: >> I should also mention that >> ./build-tests/com/vigilos/apps/setup/TestScheduledtlTableModel.class >> exists and is the class I wish to run. >> >> Hmm... could it be an issue with not looking in the right directory? >> >> - alasdair >> >> Alasdair Young wrote: >> =20 >>> Hi! >>> >>> I'm trying to set up some automated builds for the first time here an= d >>> I'm using a legacy ant build script that I've been hacking away at to= >>> get junit working. >>> >>> I am running ant 1.7, Junit 4.1 and java 1.5 on fedora core 5. >>> >>> When I try to get junit to run my tests via ant, I get the following:= >>> >>> =20 >>>> test: >>>> [junit] Testsuite: >>>> com.vigilos.apps.setup.TestScheduledtlTableModel >>>> [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 se= c >>>> >>>> [junit] Null Test: Caused an ERROR >>>> [junit] com.vigilos.apps.setup.TestScheduledtlTableModel >>>> [junit] java.lang.ClassNotFoundException: >>>> com.vigilos.apps.setup.TestScheduledtlTableModel >>>> [junit] at >>>> java.net.URLClassLoader$1.run(URLClassLoader.java:200) >>>> [junit] at java.security.AccessController.doPrivileged(Nativ= e >>>> Method) >>>> [junit] at >>>> java.net.URLClassLoader.findClass(URLClassLoader.java:188) >>>> [junit] at >>>> java.lang.ClassLoader.loadClass(ClassLoader.java:306) >>>> [junit] at >>>> java.lang.ClassLoader.loadClass(ClassLoader.java:251) >>>> [junit] at >>>> java.lang.ClassLoader.loadClass(ClassLoader.java:251) >>>> [junit] at >>>> java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) >>>> [junit] at java.lang.Class.forName0(Native Method) >>>> [junit] at java.lang.Class.forName(Class.java:242) >>>> >>>> >>>> >>>> BUILD FAILED >>>> /home/ayoung/vigilos/subversion/trunk/java/build.xml:42: Test >>>> com.vigilos.apps.setup.TestScheduledtlTableModel failed >>>> =20 >>> relevant parts of build.xml: >>> >>> =20 >>>> >>>> >>>> >>>> >>>> >>> location=3D".:../java/build:../thirdParty/signedJars/jh.jar:../third= Party/signedJars/jai_codec.jar:../thirdParty/signedJars/jcchart.jar:../th= irdParty/signedJars/jlfgr-1_0.jar:../thirdParty/signedJars/ojdbc14.jar:..= /thirdParty/signedJars/scrollabledesktop.jar:../thirdParty/signedJars/ftp= bean.jar:../thirdParty/signedJars/jai_core.jar:../thirdParty/signedJars/j= dbcpool-0.99.jar:../thirdParty/signedJars/log4j-1.2.5.jar:../thirdParty/s= ignedJars/pg73jdbc3.jar:../thirdParty/unsignedJars/jmf.jar:../thirdParty/= unsignedJars/commons-collections.jar:../thirdParty/unsignedJars/commons-p= ool-1.1.jar:../thirdParty/unsignedJars/commons-dbcp-1.1.jar:../thirdParty= /signedJars/jcalendar.jar:${tomcat-dir}/common/lib/servlet-api.jar:${tomc= at-dir}/common/lib/jsp-api.jar:../thirdParty/unsignedJars/junit-4.1.jar:.= /build-tests:../javatest:./build-tests/com/vigilos/apps/setup/TestSchedul= edtlTableModel.class" >>>> >>>> /> >>>> >>>> =20 >>> =20 >>>> >>>> >>>> >>>> >>>> >>>> >>> includes=3D"**/*.class" /> >>>> >>>> >>>> >>>> =20 >>> NOTES: >>> >>> I have junit-4.1.jar in my $ANT_HOME/lib >>> >>> The project.classpath is a mess - several items at the end were tacke= d >>> on as I tried different things. >>> >>> I read the FAQ entry >>> (http://ant.apache.org/faq.html#delegating-classloader) and several >>> blogs that also described the issue - I am not able to make any of >>> these >>> resources useful to me. Either they don't apply or my lack of >>> understanding is getting in the way. >>> >>> (Specifically: "Ant doesn't load the external library directly, it is= >>> the loaded class that does so. In the case of || it is the tas= k >>> implementation itself." doesn't make a lot of sense to me.) >>> >>> So... any ideas? >>> >>> I tried running ant with -debug turned on and didn't notice anything >>> obvious. I think my next step is to take that horrible mess of a >>> project.classpath and turn it into a collection of seperate >>> tags and then find out if any of these can't be found b= ut >>> I would welcome any help that anyone can give me. >>> >>> Kind regards, >>> >>> - alasdair >>> >>> Alasdair Young >>> Vigilos Inc. >>> >>> >>> >>> >>> >>> >>> >>> ---------------------------------------------------------------------= >>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org >>> For additional commands, e-mail: user-help@ant.apache.org >>> >>> >>> =20 >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org >> For additional commands, e-mail: user-help@ant.apache.org >> >> >> =20 > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org