tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jins Abraham <jinsrabra...@yahoo.com.INVALID>
Subject Re: Class Loader Problems with Tomcat 8 + Ant Task
Date Thu, 22 Oct 2015 14:59:45 GMT
M

Sent from my iPhone

> On Oct 15, 2015, at 10:15 AM, Amit Lonkar <amitlonkar@yahoo.com.INVALID> wrote:
> 
> Any ideas on this one? 
> 
> 
>> On Oct 5, 2015, at 5:11 PM, Amit Lonkar <amitlonkar@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 <chris@christopherschultz.net>
wrote:
>>> 
>>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA256
>>> 
>>> 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/v7bro
>>> ker.war");
>>>> 
>>>> 
>>> oTask.execute();
>>> 
>>> This application works on a clean, fresh Tomcat 7 but not on a clean,
>>> fresh Tomcat 8?
>>> 
>>> - -chris
>>> -----BEGIN PGP SIGNATURE-----
>>> Comment: GPGTools - http://gpgtools.org
>>> 
>>> iQIcBAEBCAAGBQJWBbL0AAoJEBzwKT+lPKRYPaoP/jZywxrZGTFpXZunqTXO6lPi
>>> iU/Cg8KGql1/dxK8rs/SINKiJFpk9nsVkOf3596NKjLtHsD5vobzWwvnQyitnI1q
>>> WXjGX5PgIArZgBvbZOpEDZJpNOPCcJdXisZvhL5cO9qZBY/Pas/98KXKPZgD3LuB
>>> iMK+lns68CjrzYIRQEGsLBWSRMZSq5Mlo0QQkeD+bHJ/hhKSvAd/Fq+KhPuPxhnm
>>> 7YxX9VijsMBOWFtlMzn6+8KSOqvnKNTPV/VUzi5+5zHGWxA5JcEUsJlSP4CXpTRn
>>> HpoPW7d7MnqbHWIJRa6A5jmNe2Dgu/Yqnn0jP/DZ3vldPEkGzsrPK6TEEZ40Av8a
>>> HSrRpBTfO0YnPhrJJoDTbLHYwDxdt0+Pn7IN7fejdZtBfGHAZe2pvpys27Tc2yni
>>> 3IkrBY60TZZAmoShd+Db9nft8aAhJtFYpVuewZYpQBovKv9xNmRkuwzTQ1bDxqAc
>>> a/0wS9d2P4QARYToTD7X8I92Ve7KpTITXrKL6CHTKuzQxGIjpuD4fq/S+Niz2s9X
>>> zkfGE3HNhklaKZejeBvI34u3UvlyFZERpc3Ghz79NgbH6t+axl2DK8dUxqY8PXbQ
>>> UclOeihby91Fa5n5sP00LiGOJq9Pq8CFryYp5THbuMbUYZt3uxS53jiBQV2Wcy8q
>>> vysGmaX3rQK250gUVnj3
>>> =annF
>>> -----END PGP SIGNATURE-----
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message