Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 58779 invoked from network); 5 Sep 2007 09:40:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Sep 2007 09:40:09 -0000 Received: (qmail 69146 invoked by uid 500); 5 Sep 2007 09:39:59 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 69107 invoked by uid 500); 5 Sep 2007 09:39:59 -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 69096 invoked by uid 99); 5 Sep 2007 09:39:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Sep 2007 02:39:59 -0700 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=SPF_SOFTFAIL X-Spam-Check-By: apache.org Received-SPF: softfail (athena.apache.org: transitioning domain of prashant@pramati.com does not designate 196.12.47.8 as permitted sender) Received: from [196.12.47.8] (HELO mail.pramati.com) (196.12.47.8) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Sep 2007 09:39:56 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.pramati.com (Postfix) with ESMTP id 209BDA059F5 for ; Wed, 5 Sep 2007 09:16:55 +0000 (UTC) X-Virus-Scanned: scanned by pramati.com Received: from mail.pramati.com ([127.0.0.1]) by localhost (mail.pramati.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id da9ii72FXsQ8 for ; Wed, 5 Sep 2007 14:46:44 +0530 (IST) Received: from survey-demo.dekoh.com (prashant-r.pramati.com [192.168.1.54]) by mail.pramati.com (Postfix) with ESMTP id 98DB4A06181 for ; Wed, 5 Sep 2007 14:46:34 +0530 (IST) Subject: Re: No class Def Error From: Prashant Reddy Reply-To: prashant@pramati.com To: Ant Users List In-Reply-To: <60f6b5090709050226i2f55e198n43694a63e04871d7@mail.gmail.com> References: <60f6b5090709050226i2f55e198n43694a63e04871d7@mail.gmail.com> Content-Type: text/plain Organization: Pramati Technologies Date: Wed, 05 Sep 2007 15:01:59 +0530 Message-Id: <1188984719.7594.48.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On Wed, 2007-09-05 at 14:56 +0530, Ramu Sethu wrote: > hi > > We are working in EJB and we use jboss-all-clent.jar. We have custom > task which makes use jboss-all-cleint.jar > > When we run our custom task with the taskdef which has > jboss-all-client.jar in classpath, what we get is No class found error > . We avoided this by adding the jar in environment variable class > path. But i don't know why ant doesn't take the class even though we > added the jar in class path > Also our junit task test cases uses the same jar. We don't get no > class def when we run the junit task alone. > > Why custom task doesn't take that from the classpath. Am i missing some thing ? May be ANT is dropping the jar you have arranged in classpath because it points to non-existent file location. Run ant in verbose mode (ant -verbose) and check if the required jars are infact set in classpath. > > > I have added the trace below > > [MyTask] javax.naming.NoInitialContextException: Cannot instantiate > class: org.jnp.interfaces.NamingContextFactory [ > Root exception is java.lang.ClassNotFoundException: > org.jnp.interfaces.NamingContextFactory] Looks like org.jnp.interfaces.NamingContextFactory is not in the classpath. Is the jar that has this class in the classpath ? HTH -Prashant --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org