7 Replies Latest reply on Jan 24, 2003 2:23 AM by Srikanth Malladi

    JBoss 3.0.4 & Tomcat 4.1.12 - Jasper Exception

    Marcelino Cruz Newbie

      I downloaded the binaries for JBoss 3.0.4/Tomcat 4.1.12 and installed them on a Solaris 8 box. I have Java 1.4 installed and JAVA_HOME set to the correct path. When I start JBoss with "./run.sh" everything comes up fine.

      However, trying to bring up the console by running

      http://myservername:8080/jmx-console/index.jsp fails.

      I believe this is a Tomcat configuration issue. It's having problems compiling a jsp. Has anyone run into this? How can I fix this? This is my first try at JBoss and Tomcat.

      The error follows below:

      org.apache.jasper.JasperException: Unable to compile class for JSP

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

      Generated servlet error:
      [javac] Compiling 1 source file

      /export/home/u01/jboss-3.0.4_tomcat-4.1.12/tomcat-4.1.x/work/MainEngine/localhost/jmx-console/index_jsp.java:51: 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:120)
      at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
      at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:313)
      at org.apache.jasper.compiler.Compiler.compile(Compiler.java:324)
      at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:474)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:184)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:469)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at
      org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1040)
      at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1151)
      at java.lang.Thread.run(Thread.java:536)

        • 1. Re: JBoss 3.0.4 & Tomcat 4.1.12 - Jasper Exception
          John Jorgensen Newbie

          I also first got this problem when I copied files from my Windows to my Linux box and then tried to install. I think the problem was a result of the permissions not being set correctly as a result of the copy process.

          Using the procedure below I had no problems:
          --------------------------------------------
          (1) Logged in to the Linux box using my account (john), not root
          (2) Download the file jboss-3.0.4_tomcat-4.1.12.zip from www.jboss.org into /home/john
          (3) Set the JAVA_HOME=/usr/local/... in my login script (On my machine .bash_profile) JDK version 1.4.1
          (4) Executed the following command so that the JAVA_HOME setting would take effect in
          my current shell session:
          source /home/john/.bash_profile
          (5) Went to directory home/john/jboss3.0.4_tomcat-4.1.12/bin
          (6) Change the permissions on the run script file:
          chmod a+x run.sh
          (7) Execute the script by:
          ./run.sh
          (8) Open the web browser and pointed to http://localhost:8080/jmx-console
          The console came up fine and everything seems to be working.

          I have not tried this as root, but I think that will work fine as well.

          • 2. Re: JBoss 3.0.4 & Tomcat 4.1.12 - Jasper Exception
            Marcelino Cruz Newbie

            Still won't go... I'm running Solaris 8.

            • 3. Re: JBoss 3.0.4 & Tomcat 4.1.12 - Jasper Exception
              Ian Jefferies Newbie

              Are you running JBoss on a JRE or a SDK?

              I've had and fixed this same problem on a Windows box. Sometimes there's a "root cause" exception that points to a NullPointerException in Ant. It appears to be caused by the JRE not including a compiler: Jasper can't compile the intermediate java source built from the JSP.

              Several things you can do:

              1) Run JBoss on top of an SDK instead of a JRE.

              2) Place a copy of tools.jar (found in the /lib dir of the SDK) into the Tomcat common/lib directory.

              This might cause problems if the tools.jar comes from a more recent SDK than the JRE running JBoss.

              Hope this gets you going.

              Ian.

              • 4. Re: JBoss 3.0.4 & Tomcat 4.1.12 - Jasper Exception
                Marcelino Cruz Newbie

                JBoss is running on top of an SDK (JDK1.4.1_01).

                I will try copying the tools.jar to the location you specified and see how that goes.

                MC

                • 5. Re: JBoss 3.0.4 & Tomcat 4.1.12 - Jasper Exception
                  Marcelino Cruz Newbie

                  Nope, didn't work.

                  I'm successfully running JBoss 3.0.2 with Jetty on a W2K box, so I'll stick with that for the time being.

                  Would be nice to run JBoss 3.0.2 with Tomcat 4.1.12 on Solaris, mainly because I'm looking at a couple of apps that have been certified with Tomcat 4.1.x.

                  MC

                  • 6. Re: JBoss 3.0.4 & Tomcat 4.1.12 - Jasper Exception
                    Ian Jefferies Newbie

                    Sorry to hear it's not working for you.

                    A quick verification check that this is the problem: looking in the "work" directory under Tomcat should show that your JSP has been converted into a java source code file, but that there's no compiled class file. BTW, you'll need to do this while JBoss/Tomcat is running, and after you've generated the exception, as this directory appears to be cleaned as part of the shutdown procedure.

                    If you're seeing the java file but not the class, then the problem (as far as I can tell) is the absence of the compiler from the classpath available to Jasper.

                    If you're running JBoss using the SDK then you might find that the tools.jar isn't found either. The SDK includes its own JRE, and quite often this JRE actually ends up hosting JBoss.

                    Hope you can get things fixed. I don't know Solaris or have a box to play on and, though this doesn't help you, this solution got a "works for me" on Win2k using Jboss 3.04/Tomcat 4.1.12.

                    Ian.

                    • 7. Re: JBoss 3.0.4 & Tomcat 4.1.12 - Jasper Exception
                      Srikanth Malladi Newbie

                      Got the same exception on Win2K.
                      Tried 'Place a copy of tools.jar (found in the /lib dir of the SDK) into the Tomcat common/lib directory' as suggested by IanJefferies. It worked.
                      Don't know yet if this introduces any other errors.