Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 72166 invoked from network); 2 Jan 2007 21:40:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Jan 2007 21:40:55 -0000 Received: (qmail 42105 invoked by uid 500); 2 Jan 2007 21:40:56 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 42078 invoked by uid 500); 2 Jan 2007 21:40:56 -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 42067 invoked by uid 99); 2 Jan 2007 21:40:56 -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:40:56 -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.58] (HELO pop05.mail.atl.earthlink.net) (207.69.200.58) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Jan 2007 13:40:46 -0800 Received: from nc-76-3-203-144.dhcp.embarqhsd.net ([76.3.203.144] helo=flossware.homelinux.org) by pop05.mail.atl.earthlink.net with esmtp (Exim 3.36 #1) id 1H1rMv-0004yF-00 for user@ant.apache.org; Tue, 02 Jan 2007 16:40:25 -0500 Received: from [192.168.168.6] (devserver.flossware.com [192.168.168.6]) by flossware.homelinux.org (Postfix) with ESMTP id C7A971D0145 for ; Tue, 2 Jan 2007 16:40:22 -0500 (EST) Message-ID: <459AD10F.507@mindspring.com> Date: Tue, 02 Jan 2007 16:39:27 -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> In-Reply-To: <459ACBF1.5030201@vigilos.com> Content-Type: multipart/alternative; boundary="------------020208010900090909070506" X-Virus-Checked: Checked by ClamAV on apache.org --------------020208010900090909070506 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Looks like you need to put ./build-tests in your path element. 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 and= >> 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 >> =20 >>> test: >>> [junit] Testsuite: com.vigilos.apps.setup.TestScheduledtlTableMod= el >>> [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec= >>> >>> [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(Native= >>> Method) >>> [junit] at >>> java.net.URLClassLoader.findClass(URLClassLoader.java:188) >>> [junit] at java.lang.ClassLoader.loadClass(ClassLoader.java:3= 06) >>> [junit] at java.lang.ClassLoader.loadClass(ClassLoader.java:2= 51) >>> [junit] at java.lang.ClassLoader.loadClass(ClassLoader.java:2= 51) >>> [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:../thirdP= arty/signedJars/jai_codec.jar:../thirdParty/signedJars/jcchart.jar:../thi= rdParty/signedJars/jlfgr-1_0.jar:../thirdParty/signedJars/ojdbc14.jar:../= thirdParty/signedJars/scrollabledesktop.jar:../thirdParty/signedJars/ftpb= ean.jar:../thirdParty/signedJars/jai_core.jar:../thirdParty/signedJars/jd= bcpool-0.99.jar:../thirdParty/signedJars/log4j-1.2.5.jar:../thirdParty/si= gnedJars/pg73jdbc3.jar:../thirdParty/unsignedJars/jmf.jar:../thirdParty/u= nsignedJars/commons-collections.jar:../thirdParty/unsignedJars/commons-po= ol-1.1.jar:../thirdParty/unsignedJars/commons-dbcp-1.1.jar:../thirdParty/= signedJars/jcalendar.jar:${tomcat-dir}/common/lib/servlet-api.jar:${tomca= t-dir}/common/lib/jsp-api.jar:../thirdParty/unsignedJars/junit-4.1.jar:./= build-tests:../javatest:./build-tests/com/vigilos/apps/setup/TestSchedule= dtlTableModel.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 tacked= >> 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 the= se >> 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 task= >> 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 bu= t >> 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 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 --------------020208010900090909070506--