Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 82428 invoked from network); 2 Jan 2007 22:01:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Jan 2007 22:01:13 -0000 Received: (qmail 83077 invoked by uid 500); 2 Jan 2007 22:01:07 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 83030 invoked by uid 500); 2 Jan 2007 22:01:06 -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 82994 invoked by uid 99); 2 Jan 2007 22:01:06 -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 14:01:06 -0800 X-ASF-Spam-Status: No, hits=2.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [207.69.200.40] (HELO pop06.mail.atl.earthlink.net) (207.69.200.40) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Jan 2007 14:00:55 -0800 Received: from nc-76-3-203-144.dhcp.embarqhsd.net ([76.3.203.144] helo=flossware.homelinux.org) by pop06.mail.atl.earthlink.net with esmtp (Exim 3.36 #1) id 1H1rgP-000799-00 for user@ant.apache.org; Tue, 02 Jan 2007 17:00:33 -0500 Received: from [192.168.168.6] (devserver.flossware.com [192.168.168.6]) by flossware.homelinux.org (Postfix) with ESMTP id D8A6E1D0145 for ; Tue, 2 Jan 2007 17:00:31 -0500 (EST) Message-ID: <459AD5C8.1080408@mindspring.com> Date: Tue, 02 Jan 2007 16:59:36 -0500 From: "Scot P. Floess" Reply-To: floess@mindspring.com User-Agent: Thunderbird 1.5.0.8 (X11/20061025) 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> <459AD403.4080202@vigilos.com> In-Reply-To: <459AD403.4080202@vigilos.com> Content-Type: multipart/alternative; boundary="------------080804040809020806070208" X-Virus-Checked: Checked by ClamAV on apache.org --------------080804040809020806070208 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Oops - my bad...no line wrap :( Well something else to try, add the path to build-tests as part of the=20 path... For instance if build-tests exists as /foo/bar/build-test, put=20 /foo/bar/build-tests in as a path element... Or try using instead of I think the problem is you need to use the path attribute Alasdair Young wrote: > 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: > =20 >> Looks like you need to put ./build-tests in your path element. >> >> > location=3D"./build-tests:.:../java/build:../thirdParty/signedJars/jh.= jar:../thirdParty/signedJars/jai_codec.jar:../thirdParty/signedJars/jccha= rt.jar:../thirdParty/signedJars/jlfgr-1_0.jar:../thirdParty/signedJars/oj= dbc14.jar:../thirdParty/signedJars/scrollabledesktop.jar:../thirdParty/si= gnedJars/ftpbean.jar:../thirdParty/signedJars/jai_core.jar:../thirdParty/= signedJars/jdbcpool-0.99.jar:../thirdParty/signedJars/log4j-1.2.5.jar:../= thirdParty/signedJars/pg73jdbc3.jar:../thirdParty/unsignedJars/jmf.jar:..= /thirdParty/unsignedJars/commons-collections.jar:../thirdParty/unsignedJa= rs/commons-pool-1.1.jar:../thirdParty/unsignedJars/commons-dbcp-1.1.jar:.= =2E/thirdParty/signedJars/jcalendar.jar:${tomcat-dir}/common/lib/servlet-= api.jar:${tomcat-dir}/common/lib/jsp-api.jar:../thirdParty/unsignedJars/j= unit-4.1.jar:./build-tests:../javatest:./build-tests/com/vigilos/apps/set= up/TestScheduledtlTableModel.class" >> >> /> >> >> >> Alasdair Young wrote: >> =20 >>> 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 >>> =20 >>>> Hi! >>>> >>>> I'm trying to set up some automated builds for the first time here a= nd >>>> I'm using a legacy ant build script that I've been hacking away at t= o >>>> 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 >>>> =20 >>>>> test: >>>>> [junit] Testsuite: >>>>> com.vigilos.apps.setup.TestScheduledtlTableModel >>>>> [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 s= ec >>>>> >>>>> [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(Nati= ve >>>>> 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 >>>>> =20 >>>> relevant parts of build.xml: >>>> >>>> =20 >>>> =20 >>>>> >>>>> >>>>> >>>>> >>>>> >>>> location=3D".:../java/build:../thirdParty/signedJars/jh.jar:../thir= dParty/signedJars/jai_codec.jar:../thirdParty/signedJars/jcchart.jar:../t= hirdParty/signedJars/jlfgr-1_0.jar:../thirdParty/signedJars/ojdbc14.jar:.= =2E/thirdParty/signedJars/scrollabledesktop.jar:../thirdParty/signedJars/= ftpbean.jar:../thirdParty/signedJars/jai_core.jar:../thirdParty/signedJar= s/jdbcpool-0.99.jar:../thirdParty/signedJars/log4j-1.2.5.jar:../thirdPart= y/signedJars/pg73jdbc3.jar:../thirdParty/unsignedJars/jmf.jar:../thirdPar= ty/unsignedJars/commons-collections.jar:../thirdParty/unsignedJars/common= s-pool-1.1.jar:../thirdParty/unsignedJars/commons-dbcp-1.1.jar:../thirdPa= rty/signedJars/jcalendar.jar:${tomcat-dir}/common/lib/servlet-api.jar:${t= omcat-dir}/common/lib/jsp-api.jar:../thirdParty/unsignedJars/junit-4.1.ja= r:./build-tests:../javatest:./build-tests/com/vigilos/apps/setup/TestSche= duledtlTableModel.class" >>>>> >>>>> /> >>>>> >>>>> =20 >>>>> =20 >>>> =20 >>>> =20 >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>> includes=3D"**/*.class" /> >>>>> >>>>> >>>>> >>>>> =20 >>>>> =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 tack= ed >>>> 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 i= s >>>> the loaded class that does so. In the case of || it is the ta= sk >>>> 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 = but >>>> 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 >>>> =20 >>> ---------------------------------------------------------------------= >>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org >>> For additional commands, e-mail: user-help@ant.apache.org >>> >>> >>> =20 >>> =20 > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org > > > =20 --=20 Scot P. Floess 27 Lake Royale Louisburg, NC 27549 252-478-8087 (Home) 919-754-4592 (Work) Chief Architect JPlate http://sourceforge.net/projects/jplate Chief Architect JavaPIM http://sourceforge.net/projects/javapim --------------080804040809020806070208--