8 Replies Latest reply on Jul 14, 2004 9:40 AM by tiredofworkingfortheman

    How can I solve this 500 error????

    mococa

      I´ve installed JBoss 3.2.3 but when I try to access jmx-console or an deployed aplication, this error above comes. How can solve that?!?!


      HTTP Status 500 -

      --------------------------------------------------------------------------------

      type: Exception report

      message

      description: The server encountered an internal error () that prevented it from fulfilling this request.

      exception

      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

        • 1. Re: How can I solve this 500 error????

          make sure you don't have white space in path names to JDK or JBoss if you're on Windows, that your JAVA_HOME is set correctly (to JDK, not JRE), and that you upgrade to 3.2.4RC1 if you're running on Tomcat 5

          • 2. Re: How can I solve this 500 error????

            I have the same error, and my Paths and JAVA_HOME do not have spaces in there. I downloaded JBoss 3.2.3. which comes with Tomcat.

            What else could be the problem.

            Mark

            • 3. Re: How can I solve this 500 error????
              jonlee

              Have a look at the server.log output as it generally has more stack trace information and if you can't determine the issue from that, post the stack trace here so people can look at that. Otherwise it is difficult to determine the exact issue for the JSP not compiling as there are many reasons for compilation failures. Also it would help to show the output from the JBoss boot strap:

              ================================================================================
               JBoss Bootstrap Environment
              
               JBOSS_HOME: /usr/local/JBoss
              
               JAVA: /usr/lib/java/bin/java
              
               JAVA_OPTS: -Xms64m -Xmx128m -Djava.awt.headless=true -Djava.io.tmpdir=/jetty -Dprogram.name=run.sh
              
               CLASSPATH: /usr/local/JBoss/bin/run.jar:/usr/lib/java/lib/tools.jar
              
              ================================================================================


              Something like the excerpt would help indicate your configuration.

              • 4. Re: How can I solve this 500 error????

                OK here is an excerpt from my server.log

                2004-04-17 20:19:49,844 ERROR [org.jboss.web.localhost.Engine] StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
                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
                
                
                
                 at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130)
                 at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
                 at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353)
                 at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
                 at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)
                 at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)
                 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
                 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
                 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:256)
                 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.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:220)
                 at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
                 at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
                 at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
                 at org.jboss.web.tomcat.tc4.statistics.ContainerStatsValve.invoke(ContainerStatsValve.java:76)
                 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:2417)
                 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:171)
                 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.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:65)
                 at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
                 at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:577)
                 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.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:197)
                 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781)
                 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:549)
                 at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:605)
                 at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:677)
                 at java.lang.Thread.run(Unknown Source)
                


                I hope that shows something. :) I couldn't figure it out myself. :)

                Mark

                • 5. Re: How can I solve this 500 error????
                  jonlee

                  Is there a second bunch of exceptions after that? This first set shows that the JSPServlet failed (which we know) - this servlet invokes the compiler on the target JSP and then executes the compiled code. If there is a second group, it usually tells more about the underlying problem. The first group just reports that it caught a Javac problem.

                  The problem could be that it could not locate the tools.jar which is necessary to compile code with. As you see by the classpath of my console output, the tools.jar is shown and you should be able to verify the file exists at that location. A line -1 usually indicates that the compiler couldn't be invoked at all. If you are running on Unix/Linux another issue encountered is that JBoss doesn't have permission to access the JSP file.

                  Hope that helps somewhat but you need to do a bit more digging if you can.

                  • 6. Re: How can I solve this 500 error????

                    Well, all I can say is that today. I ran the run.bat, and everything works fine now. I can go to the web-console, and I can see the Struts documentation web site from the war that comes with struts download. Who knows why it works now. I made absolutely no changes to anything.

                    Mark

                    • 7. Re: How can I solve this 500 error????
                      tiredofworkingfortheman

                      I have a simular problem with the Duke's Bank app and the http 500 response. I am using jboss 3.2.5, tomcat 5.0.26 (came with jboss dowload.) mac OS 10.3.4, jdk 1.4.x. When I startup jboss using the default server everthing comes up very well. No problems. The bank.ear file is deployed, and the "localhost/bank" is listed in the Application Status under "Tomcat Status" on the main page for http://locahost:8080.

                      When I go to the http://localhost:8080/bank/main I get back a 500 error from the server....

                      type Exception report

                      message

                      description The server encountered an internal error () that prevented it from fulfilling this request.

                      exception
                      org.apache.jasper.JasperException
                      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372)
                      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
                      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
                      javax.servlet.http.HttpServlet.service(HttpServlet.java:810)



                      root cause
                      java.lang.NullPointerException
                      org.apache.jsp.main_jsp._jspService(main_jsp.java:50)
                      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
                      javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
                      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
                      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
                      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
                      javax.servlet.http.HttpServlet.service(HttpServlet.java:810)



                      note The full stack trace of the root cause is available in the Apache Tomcat/5.0.26 logs.

                      ...After I make the http request I see this in the serve.log....


                      00:06:27,774 ERROR [Engine] StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
                      java.lang.NullPointerException
                      at org.apache.jsp.main_jsp._jspService(main_jsp.java:50)
                      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
                      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
                      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
                      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
                      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
                      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
                      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
                      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
                      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
                      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
                      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
                      at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
                      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
                      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
                      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:72)
                      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
                      at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:275)
                      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
                      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
                      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
                      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
                      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
                      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
                      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
                      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
                      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
                      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
                      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
                      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
                      at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
                      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:552)


                      I'm going to go back over the Getting Started Guide again, then start digging into Tomcat. Anyone have any wisdom crumbs to throw my way that would be smurfy.

                      Thanks.

                      • 8. Re: How can I solve this 500 error????
                        tiredofworkingfortheman

                        I found it, the answer was in the "Getting Started Guide" as a footnote. I used 127.0.0.1 instead of localhost and it the app came up. I guess Mac OS X is one of the OSs that Tomcat doesn't like to resolv localhost on.