Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 44959 invoked from network); 11 Oct 2006 09:59:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 11 Oct 2006 09:59:57 -0000 Received: (qmail 57293 invoked by uid 500); 11 Oct 2006 09:59:52 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 57262 invoked by uid 500); 11 Oct 2006 09:59:51 -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 57251 invoked by uid 99); 11 Oct 2006 09:59:51 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Oct 2006 02:59:51 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [130.231.61.23] (HELO ee.oulu.fi) (130.231.61.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Oct 2006 02:59:49 -0700 Received: from sinfpc56 (s-inf-pc56 [130.231.50.186]) by ee.oulu.fi (8.13.8/8.13.8) with ESMTP id k9B9xRrL013957 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Wed, 11 Oct 2006 12:59:27 +0300 (EEST) Message-ID: <005301c6ed1b$f03e4330$ba32e782@sinfpc56> From: "tharanga wijethilake" To: Subject: Problems in running ant in WebSphere studio site deveoper in bundles Date: Wed, 11 Oct 2006 12:59:22 +0300 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0050_01C6ED35.12803700" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_NextPart_000_0050_01C6ED35.12803700 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I am using the WSSD 5.1.2 trial version and I am trying to run an ant = script in side a bundle using a java program. It is as follows. package oulu.info.capnet.samples; import java.io.File; import org.apache.tools.ant.Project; import org.apache.tools.ant.ProjectHelper; /** * @Author: Tharanga Wijethilake * @Time : 10:54:25=20 */ public class AntRunner implements Runnable{ private String fileName=3D"C:\\Documents and Settings\\tharanga\\My = Documents\\IBM\\wssitedev51\\workspace\\Runner\\build.xml"; private static AntRunner ar; private Thread thread; /** *=20 */ public AntRunner() { super();=20 } /* (non-Javadoc) * @see java.lang.Runnable#run() */ public void run() { antRun(); } public static AntRunner getInstance(){ if(ar=3D=3Dnull){ ar=3Dnew AntRunner();=20 } return ar; } public void antRun(){ File buildFile=3Dnew File(fileName); if(buildFile.exists()){ Project p=3Dnew Project(); p.setUserProperty("ant.file",buildFile.getAbsolutePath()); p.init(); ProjectHelper helper=3DProjectHelper.getProjectHelper(); p.addReference("ant.projectHelper", helper); helper.parse(p, buildFile); p.executeTarget(p.getDefaultTarget()); } else{ System.out.println("File not found"); }=20 } public void start(){ thread=3Dnew Thread(this); thread.start(); } public void stop(){ thread=3Dnull; } } I did Every thing as indicated in the article "Invoking Apache Ant = programmatically" = (http://www-128.ibm.com/developerworks/websphere/library/techarticles/050= 2_gawor/0502_gawor.html) and I am tring to run the same ant script given in the article. but when = I run the bundle activator it gives the following error. java.lang.NoClassDefFoundError: org/apache/tools/ant/Project at oulu.info.capnet.samples.AntRunner.antRun(AntRunner.java:47) at oulu.info.capnet.samples.AntRunner.run(AntRunner.java:34) at java.lang.Thread.run(Thread.java:513) Can some one suggest me what is wrong with this. I can run the class = given in the article as a java application, it is only that I can not = run it as a SMF bundle. I hope some one would answer me. Thank you in Advance.=20 Tharanga Wijethilake ------=_NextPart_000_0050_01C6ED35.12803700--