13 Replies Latest reply on Sep 23, 2009 10:47 AM by Peter Johnson

    Facing Generated servlet error: exceeding the 65535 bytes li

    Darshan Parekh Newbie

      Hi,

      I am facing an issue as follows in jboss 4.0.5.GA version. As the following error says of exceeding the limit, yes my jsp page is huge as such, but it works fine in Weblogic.

      Can you please send me a solution on how to resolve this issue ASAP. I am stuck up on this for past 3 days. Waiting for your responses

      Error:

      16:59:33,381 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
      org.apache.jasper.JasperException: Unable to compile class for JSP

      Generated servlet error:
      The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit


      at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
      at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
      at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:414)
      at org.apache.jasper.compiler.Compiler.compile(Compiler.java:297)
      at org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
      at org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
      at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:305)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      at java.lang.Thread.run(Thread.java:595)
      16:59:33,396 ERROR [STDERR] Dec 19, 2008 4:59:33 PM org.apache.jsp._500error_jsp _jspService
      FATAL: LOG_ID_7134 from org.apache.jsp._500error_jsp._jspService(_500error_jsp.java:332)
      java.lang.Throwable
      at com.unisys.trans.shared.util.logging.SharedLogger.getLogRecord(SharedLogger.java:400)
      at com.unisys.trans.shared.util.logging.SharedLogger.processEvent(SharedLogger.java:340)
      at com.unisys.trans.shared.util.logging.SharedLogger.log(SharedLogger.java:233)
      at org.apache.jsp._500error_jsp._jspService(_500error_jsp.java:332)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:465)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
      at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:363)
      at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:284)
      at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:228)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:134)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      at java.lang.Thread.run(Thread.java:595)

        • 1. Re: Facing Expecting
          Darshan Parekh Newbie

          Hi,

          I am facing a issue of Expecting "jsp:param" standard action with "name" and "value" attributes.

          This issue is resolved only when i close the <jsp:forward> tag with "/" by removing the </jsp:forward> tag. Also i remove the comment tags given between the start <jsp:forward> tags and end <jsp:forward> tags.

          But this works fine in weblogic.
          Changing the normal standard jsp code according to JBoss servers should not be the ideal solution to this.
          Is there any other configuration setup to be done to resolve the following error ?
          Please send me the responses on this ASAP.
          Thanks in advance.

          10:23:21,143 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
          org.apache.jasper.JasperException: /tkt/searchandretrieve/findticketingdocuments.jsp(14,8) /tkt/searchandretrieve/inc_processfindticketingdocuments.jspf(963,12) Expecting "jsp:param" standard action with "name" and "value" attributes
          at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
          at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
          at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:86)
          at org.apache.jasper.compiler.Parser.processIncludeDirective(Parser.java:339)
          at org.apache.jasper.compiler.Parser.parseIncludeDirective(Parser.java:372)
          at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:484)
          at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1556)
          at org.apache.jasper.compiler.Parser.parse(Parser.java:126)
          at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:211)
          at org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
          at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:155)
          at org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
          at org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
          at org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
          at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
          at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:305)
          at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
          at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
          at com.unisys.trans.shared.security.container.service.ServletSentinel.doFilter(ServletSentinel.java:79)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
          at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
          at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
          at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
          at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
          at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
          at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
          at java.lang.Thread.run(Thread.java:595)
          10:23:21,143 ERROR [STDERR] Dec 22, 2008 10:23:21 AM org.apache.jsp._500error_jsp _jspService
          FATAL: LOG_ID_7134 from org.apache.jsp._500error_jsp._jspService(_500error_jsp.java:332)
          java.lang.Throwable
          at com.unisys.trans.shared.util.logging.SharedLogger.getLogRecord(SharedLogger.java:400)
          at com.unisys.trans.shared.util.logging.SharedLogger.processEvent(SharedLogger.java:340)
          at com.unisys.trans.shared.util.logging.SharedLogger.log(SharedLogger.java:233)
          at org.apache.jsp._500error_jsp._jspService(_500error_jsp.java:332)
          at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
          at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
          at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
          at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
          at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
          at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:465)
          at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
          at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
          at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:363)
          at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:284)
          at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:228)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:134)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
          at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
          at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
          at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
          at java.lang.Thread.run(Thread.java:595)

          • 2. Re: Facing Generated servlet error: exceeding the 65535 byte
            Peter Johnson Master

             

            The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit


            A JSP is converted into a servlet, and then compiled into a class file. The buffer used for the servlet is 64K long. You JSP overflowed this buffer during the conversion process. You need to shorten your JSP.

            This issue is resolved only when i close the <jsp:forward> tag with "/" by removing the </jsp:forward> tag. Also i remove the comment tags given between the start <jsp:forward> tags and end <jsp:forward> tags.


            Sorry, but you lost me there. Please post the code that works and the code that does not work. Also, post the web-app version number in your web.xml file.


            • 3. Re: Facing Generated servlet error: exceeding the 65535 byte
              Darshan Parekh Newbie

              Thanks Peter for your immediate response.

              Issue 1:
              exceeding the 65535 byte : I agree that my jsp is huge and it might be crossing the limits, but the same jsp works fine when deployed in weblogic server. So is there any other way i can resolve this, bcos reducing the size of the jsp doesn't seem to be the ideal solution when the same is working in weblogic server.

              issue 2 :
              My web.xml version is as follows
              <!DOCTYPE web-app PUBLIC
              "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
              "http://java.sun.com/dtd/web-app_2_3.dtd">

              code that works
              <jsp:forward page="../resagentmode/findbooking.jsp"/>

              code that does not work
              <jsp:forward page="../resagentmode/findbooking.jsp"></jsp:forward>

              regards,
              Darshan

              • 4. Re: Facing Generated servlet error: exceeding the 65535 byte
                Peter Johnson Master

                1) It would appear that WLS is using a different mechanism to convert JSPs to servlets than what JBoss AS is using. Perhaps by playing around with some of the settings for the "jsp" servlet in server/xxx/deploy/jbossweb-tomcat55.sar/conf/web.xml - things like "trimspaces" and "javaencoding" - you might be able to get a smaller servlet.

                2) Hmm, those should be interpreted the same. Looks like a bug to me.

                • 5. Re: Facing Generated servlet error: exceeding the 65535 byte
                  Darshan Parekh Newbie


                  As you suggested I will try with "trimspaces" and "javaencoding" options.

                  Thanks a lot peter for your responses.

                  PeterJ,

                  I have yet another common issue as follows on PermGen space. I start my server and after a minute or two i get the following PermGen space issue. My application is very huge as such, I am struggling to resolve this issue. Is there any settings in JBOSS which will resolve this issue? Pls let me know on this if possible.

                  12:21:09,950 ERROR [LogInterceptor] Unexpected Error in method: public abstract com.unisys.trans.aircore.bkg.param.TicketingResponse com.unisys.trans.aircore.bkg.booketingejb.Booketing.retrieveOfficeProfileParameters(com.unisys.trans.aircore.utils.client.SecurityParam) throws com.unisys.trans.shared.util.response.SharedException,java.rmi.RemoteException
                  java.lang.OutOfMemoryError: PermGen space
                  12:21:11,291 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
                  java.lang.OutOfMemoryError: PermGen space
                  12:21:12,633 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
                  java.lang.OutOfMemoryError: PermGen space
                  12:21:12,633 ERROR [[localhost]] Exception Processing ErrorPage[errorCode=500, location=/500error.jsp]
                  12:21:17,967 ERROR [Http11Processor] Error processing request
                  java.lang.OutOfMemoryError: PermGen space

                  Thanks and Regards,
                  Darshan Parekh

                  • 6. Re: Facing Generated servlet error: exceeding the 65535 byte
                    Peter Johnson Master

                    What do you have the PermGen size set to? You should increase it, possibly by 50%.

                    • 7. Re: Facing Generated servlet error: exceeding the 65535 byte
                      Peter Johnson Master

                      I noticed that you are running AirCorp. You do know that you should be able to get support from Unisys for that, don't you?

                      • 8. Re: Facing Generated servlet error: exceeding the 65535 byte
                        Darshan Parekh Newbie

                        Hi Peter,

                        Is there any options that i can use to avoid changing all the
                        <jsp:forward page=""></jsp:forward>
                        to
                        <jsp:forward page="" />

                        Thanks and regards
                        Darshan

                        • 9. Re: Facing Generated servlet error: exceeding the 65535 byte
                          Peter Johnson Master

                          Not that I know of. It would probably involve fixing the JSP parser.

                          • 10. Re: Facing Generated servlet error: exceeding the 65535 byte
                            Darshan Parekh Newbie

                            Peter,

                            if i change to Jikes to compile JSP pages in web.xml, will that resolve the problem.

                            regards,
                            Darshan Parekh

                            • 12. Re: Facing Generated servlet error: exceeding the 65535 byte
                              Sathish Kumar Newbie

                              Hi,
                              My name is sathish i also have same problem (64kb exceeding limit) in jboss. kindly convey me any solution for this issue.....

                              • 13. Re: Facing Generated servlet error: exceeding the 65535 byte
                                Peter Johnson Master

                                I already mentioned the solution for this: Make the offending JSP smaller. Or better yet, remove all server-side script from the JSP and place it in a servlet.