olddet (1) [Avatar] Offline
#1
Problem with Topic 7.3
======================

For a test, I will use the ftp task like in chapter 7.3. Butt the example from chapter 7.3 do not work.
I receive the error message
java.lang.NoClassDefFoundError:org/apache/commons/net/ftp/FTPClient

I can't understand this error message. In the $ANT_HOME/lib folder exists a jar file with an ftp client, butt in a different package. Only after download the (closed) commons-net-1.2.2.jar from the apache web site,
the build run to the next error:

java.lang.NoClassDefFoundError: org/apache/oro/text/regex/MalformedPatternException

For solving this error message the jakarta-oro-2.0.8.jar is required.

Please, is this an bug in ant 1.6.2? Or is this an error in Your book?
ErikHatcher (211) [Avatar] Offline
#2
Re: Problem with Topic 7.3
It is a bug in neither. First - our book is about Ant 1.5, so it is only guaranteed accurate up until that version.

Secondly - Ant 1.6.x lists the required library dependencies here:

http://ant.apache.org/manual/install.html#librarydependencies

It looks like you've not quite got the required versions of those dependencies.
zombieinbang (2) [Avatar] Offline
#3
Re: Problem with Topic 7.3
Though a late reply .... better late than never ...

I also faced the same problem and even though had the jars in place the ftp task did not work ...

But when I built the commons-net.jar from the source, it worked well. So, just for records, build the jars from source if you are not able to find the classes.

Z.

http://bangalore.byethost5.com/
zombieinbang (2) [Avatar] Offline
#4
Re: Problem with Topic 7.3
m using Ant 1.6.5 ..

Z.


http://bangalore.byethost5.com/