6 Replies Latest reply on Feb 27, 2003 6:13 PM by garzajd

    Jetty JSP  error

    munisp

      I have a simple jsp file with just simple html. I get a run time exception as follows

      C:\DOCUME~1\pmunis\LOCALS~1\Temp\Jetty__8080___vsbilling\jsp\simple$jsp.java:111: Incompatible
      for method. Explicit cast needed to convert java.lang.Throwable to java.lang.Exception.
      if (pageContext != null) pageContext.handlePageException(t);
      ^
      1 error, 1 warning

      at org.apache.jasper.compiler.Compiler.compile(Compiler.java:289)
      at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548)
      at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.ja
      6)
      at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:188)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:344)
      at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:554)
      at org.mortbay.jetty.servlet.WebApplicationHandler.handle(WebApplicationHandler.java:19
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1572)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1522)
      at org.mortbay.http.HttpServer.service(HttpServer.java:795)
      at org.jboss.jetty.Jetty.service(Jetty.java:531)
      at org.mortbay.http.HttpConnection.service(HttpConnection.java:784)
      at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:941)
      at org.mortbay.http.HttpConnection.handle(HttpConnection.java:799)
      at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:186)
      at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:322)
      at org.mortbay.util.ThreadPool$JobRunner.run(ThreadPool.java:716)
      at java.lang.Thread.run(Thread.java:536)
      Can anyone tell me what i am doing wrong

      Regards

        • 1. Re: Jetty JSP  error

          could it be that 't' is a Throwable and pageContext.handlePageException()expects and Exception ?

          ...

          • 2. Re: Jetty JSP  error
            munisp

            but all i am doing is html with a jsp file. I don't know where the exception is coming from. This same page works on weblogic.
            error message displayed in the browser is :

            HTTP ERROR: 500 Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated. C:\DOCUME~1\pmunis\LOCALS~1\Temp\Jetty__8080___vsbilling\jsp\simple$jsp.java:111: Incompatible type for method. Explicit cast needed to convert java.lang.Throwable to java.lang.Exception. if (pageContext != null) pageContext.handlePageException(t); ^ 1 error, 1 warning


            jsp page content

            <%@ page language="java" contentType="text/html;charset=UTF-8" %>




            Voip Switch billing






















            Check All
            Clear All


            Client ID
            Login





















            Cannot figure out why it throwing the exception since i am not doing any java coding

            • 3. Re: Jetty JSP  error

              If this is JBoss 3.0.[12] - then you are seeing a bug in the version of Jasper1 that Jetty is using.

              If this is JBoss 3.2beta - then the bug is in Jasper2.

              Try getting down 3.0.2 & 3.2beta and taking the jbossweb.sar and jbossweb-ejb.jar from the one you are not using and putting it into the one you are.

              Jules

              • 4. Re: Jetty JSP  error
                jmcason

                i am having the same problem. i've tried switching out a new jetty, a new jasper, i've even tried ripping the whole jbossweb.sar from the new version and putting it into mine...all give the same result.

                i am running jboss3.0.4 with jetty.

                it should be noted that this same page will load up on my old orion server, so i doubt it's a code error...what's the deal?



                14:02:40,086 WARN [jbossweb] WARNING: Exception for /nav.jsp
                org.apache.jasper.JasperException: Unable to compile class for JSP

                An error occurred at line: -1 in the jsp file: null

                Generated servlet error:

                /var/tmp/Jetty_0_0_0_0_8888__/nav_jsp.java:386: handlePageException(java.lang.Exception) in javax.servlet.jsp.PageContext cannot be applied to (java.lang.Throwable)
                if (pageContext != null) pageContext.handlePageException(t);
                ^
                1 error


                at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130)
                at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
                etc etc....

                • 5. Re: Jetty JSP  error
                  jmcason

                  Re: Jetty JSP error Posted: Feb 25, 2003 1:54 PM i am having the same problem. i've tried switching out a new jetty, a new jasper, i've even tried ripping the whole jbossweb.sar from the new version and putting it into mine...all give the same result.

                  i am running jboss3.0.4 with jetty.

                  it should be noted that this same page will load up on my old orion server, so i doubt it's a code error...what's the deal?



                  14:02:40,086 WARN [jbossweb] WARNING: Exception for /nav.jsp
                  org.apache.jasper.JasperException: Unable to compile class for JSP

                  An error occurred at line: -1 in the jsp file: null

                  Generated servlet error:

                  /var/tmp/Jetty_0_0_0_0_8888__/nav_jsp.java:386: handlePageException(java.lang.Exception) in javax.servlet.jsp.PageContext cannot be applied to (java.lang.Throwable)
                  if (pageContext != null) pageContext.handlePageException(t);
                  ^
                  1 error


                  at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130)
                  at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
                  etc etc....

                  • 6. Re: Jetty JSP  error
                    garzajd

                    Anybody found a workaround for this problem yet?

                    I get the same problem with a ear file I deploy. However, if I deploy the ear as a nested directory, jboss doesn't complain, and I get past the error (but if I change any of the contents, I gotta restart jboss or else I get the dreaded jzentry==0 error).

                    Also tried using Jboss-tomcat, but instead of this error, i get a linkage error, which seems even more cryptic...