Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 13118 invoked from network); 23 Oct 2007 14:12:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Oct 2007 14:12:49 -0000 Received: (qmail 26303 invoked by uid 500); 23 Oct 2007 14:12:33 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 26262 invoked by uid 500); 23 Oct 2007 14:12:33 -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 26251 invoked by uid 99); 23 Oct 2007 14:12:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Oct 2007 07:12:33 -0700 X-ASF-Spam-Status: No, hits=3.7 required=10.0 tests=DNS_FROM_OPENWHOIS,FORGED_HOTMAIL_RCVD2,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Oct 2007 14:12:36 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1IkKUR-0007p9-FN for user@ant.apache.org; Tue, 23 Oct 2007 07:12:15 -0700 Message-ID: <13365206.post@talk.nabble.com> Date: Tue, 23 Oct 2007 07:12:15 -0700 (PDT) From: rolando80 To: user@ant.apache.org Subject: Re: searching help for: class org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter can not be found In-Reply-To: <255d8d690710110701l6100fccx27df0eb72eebda95@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: roland_piazzi@hotmail.com References: <13155870.post@talk.nabble.com> <255d8d690710110701l6100fccx27df0eb72eebda95@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org I've tried the possibilities proposed by you but it didn't work. Could it be that its because the class DefaultCompilerAdapter is within ant.jar and aspectjtools.jar? But i can't leave aspectjtools.jar because it contains the class Ajc which is required. Can anyone help? Dominique Devienne-2 wrote: > > On 10/11/07, Roland Piazzi wrote: >> I try to run the aspectj-compiler with ant but it gives me the following >> error: >> >> A class needed by class org.aspectj.tools.ant.taskdefs.compilers.Ajc can >> not >> be found: >> org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter >> >> >> This class is contained within the file ant.jar which also is in a >> lib-folder which is added to the path. >> >> I don't know how to go on, hope that someone can help me about this? >> >> I attach my build file... http://www.nabble.com/file/p13155870/build.xml >> build.xml > > Sounds like a classloader issue (just a guess). You don't specify a > classpath when you taskdef Ajc, which implies that it's on the Java > classpath, while Ant's classes are loaded from a classloader "higher" > level classloader. > > classname="org.aspectj.tools.ant.taskdefs.compilers.Ajc"> > > > I thought Ant set the context class loader to its classloader, so Ajc > should be able to see the Ant classes... Are you sure you are not > mixing up several versions of Ant on the classpath? > > Try running Ant with the switch to disables the use of a global > CLASSPATH, and explicitly tell Ant where the jar for Ajc is, either: > (1) in the taskdef, (2) via -lib on the command line, or (3) by > putting the jar in $ANT_HOME/lib. If none of these methods work, > that's a more difficult issue likely related to a bad classpath (or > issues in Ajc). --DD > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org > > > -- View this message in context: http://www.nabble.com/searching-help-for%3A-class-org-apache-tools-ant-taskdefs-compilers-DefaultCompilerAdapter-can-not-be-found-tf4607267.html#a13365206 Sent from the Ant - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org