Found a good explenation for my error here:
http://www.jspwiki.org/wiki/A2AClassCastException
Building a servlet that invokes Ant,
one should not use the Launcher.java in favor of the Ant class Project.java:
This is my invoker - assuming ant.jar, ant-launcher.jar and e.g.
ant-trax.jar in WEB-I
Dear Tomcat professionals,
I tried to automate some installation over the Web
I got a class cast exception when trying to launch Ant from a servlet.
The program works fine if I execute it from the command line.
In a servlet under Tomcat it causes a
java.lang.ClassCastException: org.apache.tools.