3 Replies Latest reply on May 6, 2003 3:43 AM by Jon Barnett

    org.apache.jasper.JasperException: main deprecated

    teigetje205 Newbie


      I have an EJB project which I would like to call in my IE. But whenever I deploy my JSP pages it says te folowing:

      "org.apache.jasper.JasperException: unable to compile class for JSPNote: sun.tool.javac.Main has been deprecated"

      Does someone know what I can do about this error? If I try to open my JSP page in my IE, I get the next message:

      "HTTP ERROR: 500 Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated. C:\DOCUME~1\marsha\LOCALS~1\Temp\Jetty_0_0_0_0_8080__smsweb\index$jsp.java:234: 'catch' without 'try'. } catch (Throwable t) { ^ C:\DOCUME~1\marsha\LOCALS~1\Temp\Jetty_0_0_0_0_8080__smsweb\index$jsp.java:242: '}' expected. } ^ C:\DOCUME~1\marsha\LOCALS~1\Temp\Jetty_0_0_0_0_8080__smsweb\index$jsp.java:243: 'try' without 'catch' or 'finally'. ^ 3 errors, 1 warning"

      The linenumbers that tell me something is wrong within my JSP (line 234, 242 & 243) don't excist. My JSP page contains only 166 lines.
      I planted my JSP pages in server/default/deploy/smsweb.war. So I thought it should work. In deploy/WEB-INF I planted the class files from my EJB project.


        • 1. Re: org.apache.jasper.JasperException: main deprecated
          Jon Barnett Master

          Your JSP gets converted from html with in-line Java into a full Java source file - in your case, called index$jsp.java. If you look at that file in the Temp directory, you will find the lines to which the line numbers refer. Jasper is telling you that it can't compile the derived Java code. You will need to check the code, understand it and reference it back to the original JSP to determine how to fix your JSP. It might be that you have a closing or opening JSP declaration in the wrong place or similar. Or you have an incomplete Java brace in your in-line code.

          • 2. Re: org.apache.jasper.JasperException: main deprecated
            teigetje205 Newbie

            I don't know if you mean the tmpjsp from Eclipse... I'm using Eclipse... but there is nothing stored there... Also I can't find something like index$jsp.java on my computer..
            In the tutorial van Lomboz (plugin for eclipse) they tell me to set JBoss with the next lines:

            But they don't tell me where to put it. They say it should be filled in somewhere to make sure Eclipse can deploy JSP... which it doesnt right now!

            • 3. Re: org.apache.jasper.JasperException: main deprecated
              Jon Barnett Master

              The JSP must be beaing deployed somewhere as Jetty is complaining that it has problems with the derived Java code located at C:\DOCUME~1\marsha\LOCALS~1\Temp\Jetty_0_0_0_0_8080__smsweb\index$jsp.java. The JSP compiler in Jetty has transformed the JSP called index.jsp to index$jsp.java and then tried to compile the resulting Java file. So I would look at this first and work backwards. Don't stop JBoss or Jetty while you are looking at this temporary file.