8 Replies Latest reply on Mar 15, 2010 5:28 AM by tomsimmons

    JBoss 5 & occasional partial render of page

    tomsimmons

      Folks,

       

      I'm hoping someone here can help me, because I'm stumped!

       

      I was previously running JBoss 4.2 and everything was fine.  I upgraded for JBoss 5.1, having completed a testing and minor changes and everything looks great.  However, a handful of users have reports a weird problem that I can reporduce without fail.

       

      99% of the time a specific JSP page is displaying perfectly, but in a handful of situations the page is only partially rendered.  if you view the source it matches what is display, ie the HTML stop.  However if you debug the app everything I can trace indicates the all of the page is being generated.

       

      The page in question is best described as a profile, lets say the profile of a person.  For 99% of the people in the system the profile displays perfectly, but for 3 people so far, the profile just stops rendering part the way through.  For person A it stops in once place, for person B a similar slightly less far through, for person B, it hardly starts rendering.

       

      There is no error message.

       

      It is very easy for me to revert back to JBoss 4.2, there are no changes on the JSPs in question, and it works perfectly.

       

      If there is anything I can provide to help let me know.

       

      Thanks

       

       

      Tom

        • 1. Re: JBoss 5 & occasional partial render of page
          peterj
          Sounds like a possible outout buffer overflow issue. Did you perhaps change any settings in server/xxx/deploy/jboss-web.deployer/server.xml or server/xxx/deploy/jboss-web.deployer/conf/web.xml? If so, you might have to apply those same changes to server/xxx/deploy/jbossweb.sar/server.xml and server/xxx/deployers/jbossweb.deployer/web.xml.
          • 2. Re: JBoss 5 & occasional partial render of page
            tomsimmons

            Thanks for your reply.

             

            Should I not be seeing some sort of error if there is a buffer issue?

             

             

            Tom

            • 3. Re: JBoss 5 & occasional partial render of page
              peterj

              Not necessarily. I've seen similar issues where the overflow is simply dropped and the truncated output sent.

               

              Of course, I am just guessing about the buffer overflow.

              • 4. Re: JBoss 5 & occasional partial render of page
                tomsimmons

                OK, I've spent I think 3 days on this now, and I'm getting more confused not less.

                 

                The page is made from a main JSP, that then has several others incuded into it.  The one that is causing the problem is built entirely using out.println, if I remove this one the rest of the page renders fine.  If I remove the rest of the page and just leave it, it still fails.  What I can't figure out is that depending on how I re-arrange the page OR which bits I take out I get more or less of this defective page shown.

                 

                It would seem like an over flow, but I have profiles of similar complexity that are loading fine, and if I run it on JBoss 4.2 they all work fine.

                 

                At the moment I'm actually thinking of re-organising the page so that it's using frames rather than being the huge messy pile of tables and multi-level JSP includes that it currently is.

                 

                 

                Tom

                • 5. Re: JBoss 5 & occasional partial render of page
                  peterj

                  When I ran into the issue it was also with regards to included pages in my JSPs. Though I ran into the issue only when running a JMeter script against the web page - browsing the page did not cause any problems. And the pages were not all that big. I switch the include statements from

                   

                  <jsp:include page="WEB-INF/jsp/footer.jsp" />


                  to

                   

                  <%@ include file="WEB-INF/jsp/footer.jsp"%>

                   

                  and that fixed the problem.

                  • 6. Re: JBoss 5 & occasional partial render of page
                    tomsimmons

                    Sadly the code is already using <%@ include version.

                     

                    I have tried cutting the page right the way down so only the jsp page the sometimes doesn't render is the only thing there, the only difference is a little more is now rendered.  That pretty much somes up this whole problem, various changes sjust result in more or less of the affected profiles from being rendered, but never an error and never a solution.

                     

                    About the only think left to do I can think of is re-write the entire thing.  It currently uses a stack of JSP functions <%! %> in the third level nested jsp page.  Well actually a stack of functions all in one set of <%! %>.

                     

                    My only worry, is that if it is an overflow issue then I might have the same problem on the new code.

                     

                     

                    Tom

                    • 7. Re: JBoss 5 & occasional partial render of page
                      jaikiran

                      While fighting with the forum search functionality, i accidentally noticed a previous thread about similar issue http://community.jboss.org/message/8483#2671

                       

                      You seem to be running into something similar. See if that thread helps. There's also a linked JIRA in that thread.

                      1 of 1 people found this helpful
                      • 8. Re: JBoss 5 & occasional partial render of page
                        tomsimmons

                        You genius!

                         

                        As soon as I changed the page encoding from windows-1521 (lord knows why they chose that anyway) to UTF-8 everything worked perfectly.

                         

                        From reading around, it seems this problem has been fixed in some sections of JBoss, just not in JBoss 5.1 AS, and no one seems when it will be.  So at the moment this is the closest thing to a solution.

                         

                        Thanks one and all for you help.

                         

                         

                        Tom