• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

NoClassDefFoundError

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am using ANT with Eclipse 3.3.1.1 with Tomcat.

I am getting following error when I am trying to run a FTP target:

Could not create type ftp due to java.lang.NoClassDefFoundError: org/apache/commons/net/ftp/FTPClientConfig

Here is my FTP target:

<target name="ftp">
<ftp server="ftp.test.com" remotedir="/test" userid="user" password="password" depends="no">
<fileset dir="${meta.home}">
<include name="**/context.xml" />
</fileset>
</ftp>
</target>

Please reply if you know why it's happening.

I have also added ant 1.7 lib to my classpath, that did not help either.

Thanks,

Ankur
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. Where did you put Jakarta's Common Net library ?
2. Your target does not seem to use a classpath. How did you define the classpath, and is the above library in it ?
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
See also http://ant.apache.org/manual/install.html#librarydependencies
 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I had the same error message, but only in Eclipse (version 3.3).

I did not get the error on command line. I had setup up ANT_HOME variable correctly and copied the jakarta-oro-2.0.8.jar and commons-net-1.4.1.jar to %ANT_HOME%\lib

However it seems that the ANT Eclipse module does not automatically parse the %ANT_HOME%\lib directory for new jars and I had to add them manually

(preferences->Ant->Runtime, Classpath tab, Ant Home Entries -> Add External JARs...)

Then it worked.
 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

may be the below link is help full for you.

http://jumpintojava.blogspot.com/2011/01/sloution-to-ant-build-error-error.html
 
reply
    Bookmark Topic Watch Topic
  • New Topic