facebook

javax.servlet.ServletException: org.apache.tools.ant.taskdef

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse Archived
  2.  > 
  3. Application Servers and Deployment
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #234025 Reply

    gjamal
    Member

    My Webserver is Tomcat 4.1.31 I am using MyEclipse 3.8.2.

    I am running into the following issue when running tomcat within MyEclipse.
    This error does not happen when I run Tomcat outside of MyEclipse and sometimes if I create a new project, import the source code into it, the error may disappear in the new project but remain in the old project.

    When attempting to access my webpage, I get the following error:

    javax.servlet.ServletException: org.apache.tools.ant.taskdefs.Javac.setDebug(Z)V
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:195)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:627)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:382)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:306)
    at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
    at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
    at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
    at java.lang.Thread.run(Thread.java:534)

    root cause

    java.lang.NoSuchMethodError: org.apache.tools.ant.taskdefs.Javac.setDebug(Z)V
    at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:257)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:328)
    at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:427)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:142)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:627)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:382)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:306)
    at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
    at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)

    Any help would be appreciated. Thx.
    gulam

    #234040

    Scott Anderson
    Participant

    gulam,

    It looks like you’ve configured Tomcat to run with just a JRE rather than a full JDK so Ant can’t find the javac command since that’s included in the JDK. If you’re running within MyEclipse, please verify the setting of Window > Preferences > MyEclipse > Tomcat 4 > JDK and be sure the listed environment points to the top level of a full JDK install. To tell, the directory indicated in teh configuration should contain a directory called ‘jre’, but don’t point ot JRE directly. For more information on setting up Tomcat, please see the Application Server quickstart in the Documentation section here: http://www.myeclipseide.com/ContentExpress-display-ceid-67.html

    #234586

    gjamal
    Member

    @support-scott wrote:

    gulam,

    It looks like you’ve configured Tomcat to run with just a JRE rather than a full JDK so Ant can’t find the javac command since that’s included in the JDK. If you’re running within MyEclipse, please verify the setting of Window > Preferences > MyEclipse > Tomcat 4 > JDK and be sure the listed environment points to the top level of a full JDK install. To tell, the directory indicated in teh configuration should contain a directory called ‘jre’, but don’t point ot JRE directly. For more information on setting up Tomcat, please see the Application Server quickstart in the Documentation section here: http://www.myeclipseide.com/ContentExpress-display-ceid-67.html

    Scott,
    I think you have made a mistake in your conclusion. I am pointing to the JDK, namely: c:\j2sdk1.4.2_01. If I was pointing to a JRE, then I would be having trouble starting and stopping Tomcat from Eclipse. So based on this I know your answer is not correct. Also, as I mentioned before, my project was able to run initially and then it would show up a few days after I’ve been working on the project. Then if I start a new project, this may or may not exhibit the problem.
    Please help.

    thx
    gulam

    #234591

    Riyad Kalla
    Member

    Gulam,
    Looking at the error:

    java.lang.NoSuchMethodError: org.apache.tools.ant.taskdefs.Javac.setDebug(Z)V

    It seems that Jasper2 (the JSP engine in Tomcat) is trying to set the debug flag on the javac Ant task right before it compiles the JSP page. The NoSuchMethodError I think sends up a red flag that there is something wrong with your Tomcat classpath here or possibly even your Tomcat install (if you have customized the JARs sufficientlly, it’s possible you introduced incompatible versions of some libraries into it).

    1) So the easy thing to check is to navigate to your Window > Prefs > MyEclipse > App Servers > Tomcat 4 > Paths settings, do you have anything in any of the 3 boxes? If so, what?

    2) If there was nothing weird about #1, then I suggest you re-download Tomcat 4.1.31, and unzip it to a new location (grab the ZIP not the EXE), put it in C:\test\tomcat-4.1.31, or something like that. Then navigate back to your Tomcat 4 settings and point the Tomcat Home dir to that new dir and hit OK. Now try working with that install, is it behaving itself?

    NOTE: If you had JDBC drivers in the common/lib dir in your previous Tomcat install, be sure to copy them to the new install. Please don’t do a mass-JAR copy from old to new, because we are trying to exclude any flaky JARs as this point. I’m only referring to moving 1 JAR like connector-j-3.1.jar or oracle-jdbc.jar, something like that, not the whole dir.

    #234609

    gjamal
    Member

    Hi Scott,
    Thank-you — I had a weblogic.jar file in #1 (for netscape ldap support). Once I removed it, the problem went away.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: javax.servlet.ServletException: org.apache.tools.ant.taskdef

You must be logged in to post in the forum log in