5 Replies Latest reply on May 13, 2010 10:13 AM by Ilya Shaikovsky

    Java Out of Memory Exception

    Vijay Rajan Newbie

      Hi,

       

      address.JPG

       

      We have created a page which contains address fields where the zip/city/county are populated using rich:suggestion box.  We have 5 address tabs, which are rendered true or false base on an option the user selects.  We have around 5 X 3 (5 tabs and 3 controls on each tab) that use rich suggestion box.  Intermittently we are getting the following error when we proceed from this page.

       

      java.lang.OutOfMemoryError: Java heap space
          at org.ajax4jsf.io.CharBuffer.<init>(CharBuffer.java:59)
          at org.ajax4jsf.io.CharBuffer.append(CharBuffer.java:120)
          at org.ajax4jsf.io.FastBufferWriter.write(FastBufferWriter.java:110)
          at org.ajax4jsf.webapp.FilterServletResponseWrapper$ServletStringWriter.write(FilterServletResponseWrapper.java:317)
          at java.io.Writer.write(Writer.java:150)
          at java.io.PrintWriter.write(PrintWriter.java:384)
          at java.io.PrintWriter.write(PrintWriter.java:401)
          at org.apache.myfaces.shared_impl.renderkit.html.HtmlResponseWriterImpl.write(HtmlResponseWriterImpl.java:578)
          at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:632)
          at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
          at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
          at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
          at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:155)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
          at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
          at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
          at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
          at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
          at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
          at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
          at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
          at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
          at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
          at org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:278)
          at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
          at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)

       

       

      Sample of rich suggestion box

       

      <rich:suggestionbox suggestionAction="#{addrBean.suggestForZip}" var="addr" eventsQueue="testQueue" for="form:Physical_zip" width="200"  height="100" fetchValue="#{addr.postalCode}" minChars="0" requestDelay="1000" nothingLabel="Invalid Zipcode"  onobjectchange="processForZip(suggestion,'form:Physical_city','form:Physical_cntyNm','form:Physical_cnty','form:Physical_jur')"   usingSuggestObjects="true" status="FunctionNameProcessing" >

                      <h:column>#{addr.postalCode}-#{addr.city}-#{addr.county}</h:column>

      </rich:suggestionbox> 

       

       

      Getting this error on tomcat 6 as well as websphere 7.0

       

       

      Can somebody help