Hi Chris All jar files are sitting in the webapp/WEB-INF/lib. Please see attached screen shot.
The ant jar is apache ant 1.9.6. I have small maven project can be used to reproduce this problem, if that helps I can share it. Thx Amit > On Oct 15, 2015, at 12:17 PM, Christopher Schultz > <ch...@christopherschultz.net> wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > Amit, > > On 10/15/15 11:15 AM, Amit Lonkar wrote: >> Any ideas on this one? > > You said that ant.jar was in your classpath. Where exactly is that JAR > file? In fact... where are all the JARs required for using Tomcat's > ant tasks? > > - -chris > >>> On Oct 5, 2015, at 5:11 PM, Amit Lonkar >>> <amitlon...@yahoo.com.INVALID> wrote: >>> >>> Hi Chris >>> >>> Any ideas why the Ant Task might be failing in Tomcat 8? Yes the >>> application works on a clean fresh tomcat 7 but not on tomcat 8. >>> >>> We have a Administrator application that is used for patching our >>> scheduling software. The patch includes the war files and get >>> deployed to all nodes using the Ant Task. >>> >>> Thanks Amit >>> >>>> On Sep 25, 2015, at 2:47 PM, Christopher Schultz >>>> <ch...@christopherschultz.net> wrote: >>>> >> Amit, >> >> On 9/24/15 2:24 PM, Amit Lonkar wrote: >>>>>> We are trying to upgrade from Tomcat 7 to Tomcat 8. One of >>>>>> the functionalities we have is to deploy a war file using >>>>>> the DeployTask class. I have a simple test servlet that >>>>>> uses the DeployClass. >> >> Stop right there. >> >> You have a servlet that is using the DeployTask for something? >> That sounds ... astoundingly weird to me. Can you explain this use >> case? The only thing I can think of is a web application used to >> deploy web applications. >> >>>>>> I keep getting he following exception. I have ant 1.9.6 and >>>>>> catalina-ant-8.0.26 in the class path. The maven project >>>>>> is attached. Works fine on Tomcat 7.0.64 but not on Tomcat >>>>>> 8.0.26. >>>>>> >>>>>> *Tomcat Version: *8.0.26 *Java:* jdk1.8.0_45 *OS:* OSX >>>>>> *Class Path:* >>>>>> >>>>>> * ant-1.9.6 * ant-launcher-1.9.6 * javax.servlet-api-3.1.0 >>>>>> * tomcat-api-8.0.26 * tomcat-catalina-ant-8.0.26 * >>>>>> tomcat-juli-8.0.26 * tomcat-servlet-api-8.0.26 * >>>>>> tomcat-util-8.0.26 * tomcat-util-scan-8.0.26 >>>>>> >>>>>> >>>>>> *Exception Message:* javax.servlet.ServletException: >>>>>> Servlet execution threw an exception >>>>>> >>>>>> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java > :52) >>>>>> >>>>>> >>>>>> > *root cause* >>>>>> >>>>>> java.lang.NoClassDefFoundError: org/apache/tools/ant/Task >>>>>> java.lang.ClassLoader.defineClass1(Native Method) >>>>>> java.lang.ClassLoader.defineClass(ClassLoader.java:760) >>>>>> java.security.SecureClassLoader.defineClass(SecureClassLoader.java > :142 >> >>>>>> > ) >>>>>> >>>>>> >> java.net.URLClassLoader.defineClass(URLClassLoader.java:467) >>>>>> java.net.URLClassLoader.access$100(URLClassLoader.java:73) >>>>>> java.net.URLClassLoader$1.run(URLClassLoader.java:368) >>>>>> >>>>>> >>>>>> // Exception is thrown when trying to instantiate >>>>>> DeployTask >>>>>> >>>>>> DeployTask oTask = new DeployTask(); >>>>>> oTask.setAlwaysLog(true); oTask.setAppend(false); >>>>>> oTask.setCreateEmptyFiles(true); >>>>>> oTask.setError(oTaskError); oTask.setFailonerror(true); >>>>>> oTask.setLogError(true); oTask.setOutput(oTaskOutput); >>>>>> oTask.setPassword("adminManagerScript"); >>>>>> oTask.setPath("/broker"); oTask.setProject(new Project()); >>>>>> oTask.setTag("v7"); oTask.setUpdate(true); >>>>>> oTask.setUrl("http://localhost:8080/manager/text"); >>>>>> oTask.setUsername("adminManagerScript"); >>>>>> oTask.setWar("/Users/amitlonkar/Documents/Builds/2015-09-23_1612/v > 7bro >> >>>>>> > ker.war"); >>>>>> >>>>>> >> oTask.execute(); >> >> This application works on a clean, fresh Tomcat 7 but not on a >> clean, fresh Tomcat 8? >> >> -chris >>>> >>>> -------------------------------------------------------------------- > - - >>>> >>>> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >>>> For additional commands, e-mail: users-h...@tomcat.apache.org >>>> >>> >>> >>> --------------------------------------------------------------------- >>> >>> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >>> For additional commands, e-mail: users-h...@tomcat.apache.org >>> >> >> >> --------------------------------------------------------------------- >> >> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> > -----BEGIN PGP SIGNATURE----- > Comment: GPGTools - http://gpgtools.org > > iQIcBAEBCAAGBQJWH+21AAoJEBzwKT+lPKRYVgYP/22TnmfBXRlCUhxnKKrVjaz5 > OdsATH/oNCWa0A8EXRZg2P/q2w8P01tLkdudtO1CRGfH2+gwbvjwBUEI97LMgVRU > US5XwpIVSXLNTvzdvYR5l9Qhjy8I3IXxN5nt+uJDR4swA5nW60/tu6cjdeTBC1aV > +yENHSWvIQI3ZiwDr6Pnt7JZjIzRRcbXNgAzoNSe40q68wdy3w0aw7WvnT9f9fgJ > +enLRCgaNhqMSP19qVEVtF8v/ZR5egXcBmwLZ+/0aRUZtyA434VEcG0kHb0FfgfB > z6xhmczA1I9Ufo90yvuBU0/wHUl9MlOtEKRWHX4t0jmqKODwZgkLKha9/R4NSH7l > v0TyHQPzABfo0RLHO69JgltqL5nwsq4YkwyBcjoXPrIGHpbPtYJ5Xg49CohWW0rt > zesplta14TW3Mg7tZ1b2oYjx8D7W4Xwos67/hjLPSISJc3S+skMorqnh9i/Hw7Cn > GVkTzAxO6OBT2Ax3ef0CSrecCyw4Kqq3SPvGhP+dyzy6f2ZY/s7DMnn/X20rE41i > Ax5qxkPOPef2/1EjYzdODuruwDD9au36SSxwxJba045pS1yjxL3WeeFq5X35YxvN > pPyKA223UcOpBWTpP9dqX1HhGJ6jnQImcRG8GkYwqPcQH7gnrI2aNQqTOqa5J4b9 > sTYeJc6LUjkSUWQVTk3c > =Sz/Y > -----END PGP SIGNATURE----- > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org >