9 Replies Latest reply on Jun 2, 2008 1:56 PM by Nick Belaevski

    Problem Migrationg to 3.2.1 GA

    Mo Pour Newbie

      Hi

      After Migration to version 3.2.1 GA, we have noticed that most of our screens are not working. Here is the problem we are facing, below is part of the code from within a datatable

       <rich:column id="fileName" headerClass="headerText" style="width:250px;padding:0px;">
       <f:facet name="header">
       <h:panelGroup columns="2">
       <a:commandLink value="Filename" action="#{documentAction.sort('name')}" reRender="searchDocuments"/>
       <h:graphicImage value="#{documentUIBean.documentGridViewNavigator.sortIcon}"
       rendered="#{documentUIBean.documentGridViewNavigator.sortedColumn=='name'}"
       style="border:0px;padding:0px;margin-left:5px;"/>
       </h:panelGroup>
       </f:facet>
       <a:commandLink value="#{d.name}" style="margin-left:2px;vertical-align: middle;"
       action="#{documentAction.select(d)}"
       reRender="previewForm_document" />
       </rich:column>
      


      before the 3.2.1 , this code use to call the server side method and then reRender a form , while this was happening the ajax status (which is placed in a toolbar) started and stoped , but now the status keeps on going and the screen is not rendered, it looks like the code gets stuck in a loop, because after a while JBoss reports PermGen OutOfmemory.


      We are using JBoss 4.2.1.GA , seam 2.0.2.GA

      regards
      Mo


        • 1. Re: Problem Migrationg to 3.2.1 GA
          Ilya Shaikovsky Master

          could you please simplify the sample and share with us? It's difficult to start works basing on this description.

          Or at least could you show us error report?

          • 2. Re: Problem Migrationg to 3.2.1 GA
            Mo Pour Newbie

            Hi

            I have stripped my page to bare bone with just a toolbar calling a back end session method
            here is the backend bean.

            @Local
            public interface CampaignActions {
            
             public void newCampaign();
            
            }
            
            @Stateful
            @Name("campaignAction")
            @Scope(ScopeType.SESSION)
            @Restrict("#{identity.loggedIn}")
            @SerializedConcurrentAccess
            @Synchronized
            public class CampaignActionsBean implements CampaignActions {
            
             public void newCampaign(){
             clear();
             ...
             ...
            
             }
            
            }
            


            and here is the xhtmls first is the main page and the 2nd is the toolbar.xhtml

            
            <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
            "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
            <html xmlns="http://www.w3.org/1999/xhtml"
             xmlns:ui="http://java.sun.com/jsf/facelets"
             xmlns:h="http://java.sun.com/jsf/html"
             xmlns:f="http://java.sun.com/jsf/core"
             xmlns:s="http://jboss.com/products/seam/taglib"
             xmlns:a="http://richfaces.org/a4j"
             xmlns:rich="http://richfaces.org/rich">
            
            
            
            <body class="applicationBody" height="100%">
             <h:form id="main_toolbar_campaignForm" style="padding: 0px; margin: 0px;" >
             <ui:include src="/modules/toolbar.xhtml"/>
             </h:form>
             </body>
            </html>
            


            
            <ui:composition xmlns="http://www.w3.org/1999/xhtml"
             xmlns:s="http://jboss.com/products/seam/taglib"
             xmlns:ui="http://java.sun.com/jsf/facelets"
             xmlns:f="http://java.sun.com/jsf/core"
             xmlns:h="http://java.sun.com/jsf/html"
             xmlns:a="http://richfaces.org/a4j"
             xmlns:rich="http://richfaces.org/rich" >
            
            
             <rich:toolBar id="toolbar_campaign" height="26" itemSeparator="line" >
             <rich:toolBarGroup styleClass="toolbarButton">
             <h:graphicImage id="addcampaign" value="/resources/images/twentyfour/campaign_add.png" style="margin-right:1px;cursor: pointer;" />
             <h:outputLabel value="New Campaign" for ="addcampaign" style="cursor:pointer"/>
             <a:support event="onclick" action="#{campaignAction.newCampaign}" oncomplete ="alert('done') reRender="main_toolbar_campaignForm,toolbar_campaignForm,#{campaignUIBean.selectedTab}" />
             </rich:toolBarGroup>
             <rich:toolBarGroup location="right">
             <a:status id="status" >
             <f:facet name="start">
             <h:graphicImage value="/resources/images/misc/spinner.gif"/>
             </f:facet>
             </a:status>
            
             <h:graphicImage value="/resources/images/twentyfour/campaign.png" style="margin:2px;"/>
             </rich:toolBarGroup>
            
             </rich:toolBar>
            
            
            </ui:composition>
            


            the <a:status just keeps on spining and it looks like the ajax request does not come back, for a test I added a oncomplete to show an alert and this does not happen.

            and finally web.xml
            <?xml version="1.0" ?>
            <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
             version="2.4">
            
             <!-- Ajax4jsf -->
            
             <context-param>
             <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
             <param-value>com.sun.facelets.FaceletViewHandler</param-value>
             </context-param>
            
             <context-param>
             <param-name>org.ajax4jsf.SKIN</param-name>
             <param-value>blueSky</param-value>
             </context-param>
            
            
             <!-- only for RichFaces-3.1.3+
             <context-param>
             <param-name>org.richfaces.LoadScriptStrategy</param-name>
             <param-value>ALL</param-value>
             </context-param>
            
             <context-param>
             <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
             <param-value>false</param-value>
             </context-param>
             -->
            
            
            
            
             <filter>
             <display-name>Ajax4jsf Filter</display-name>
             <filter-name>ajax4jsf</filter-name>
             <filter-class>org.ajax4jsf.FastFilter</filter-class>
             <init-param>
             <param-name>forceparser</param-name>
             <param-value>false</param-value>
             </init-param>
             </filter>
            
             <filter-mapping>
             <filter-name>ajax4jsf</filter-name>
             <url-pattern>*.simple</url-pattern>
             <dispatcher>REQUEST</dispatcher>
             <dispatcher>FORWARD</dispatcher>
             <dispatcher>INCLUDE</dispatcher>
             </filter-mapping>
            
            
            
            
            
             <!-- Seam -->
            
             <listener>
             <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
             </listener>
            
             <filter>
             <filter-name>Seam Filter</filter-name>
             <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
             </filter>
            
             <filter-mapping>
             <filter-name>Seam Filter</filter-name>
             <url-pattern>/*</url-pattern>
             </filter-mapping>
            
             <servlet>
             <servlet-name>Seam Resource Servlet</servlet-name>
             <servlet-class>org.jboss.seam.servlet.ResourceServlet</servlet-class>
             </servlet>
            
             <servlet-mapping>
             <servlet-name>Seam Resource Servlet</servlet-name>
             <url-pattern>/seam/resource/*</url-pattern>
             </servlet-mapping>
            
            
            
            
            
             <!-- ========================= facelets ================================= -->
             <!-- Facelets development mode (disable in production) -->
             <context-param>
             <param-name>facelets.DEVELOPMENT</param-name>
             <param-value>true</param-value>
             </context-param>
            
            
             <context-param>
             <param-name>facelets.SKIP_COMMENTS</param-name>
             <param-value>true</param-value>
             </context-param>
            
            
            
             <!-- ==================== JSF =========================================== -->
             <context-param>
             <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
             <param-value>server</param-value>
             </context-param>
            
            
             <context-param>
             <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
             <param-value>.xhtml</param-value>
             </context-param>
            
             <servlet>
             <servlet-name>Faces Servlet</servlet-name>
             <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
             <load-on-startup>1</load-on-startup>
             </servlet>
            
             <servlet-mapping>
             <servlet-name>Faces Servlet</servlet-name>
             <url-pattern>*.simple</url-pattern>
             </servlet-mapping>
            
             <security-constraint>
             <display-name>Restrict raw XHTML Documents</display-name>
             <web-resource-collection>
             <web-resource-name>XHTML</web-resource-name>
             <url-pattern>*.xhtml</url-pattern>
             </web-resource-collection>
             <auth-constraint>
             <role-name>NONE</role-name>
             </auth-constraint>
             </security-constraint>
            
            
            <context-param>
             <param-name>com.sun.faces.disableVersionTracking</param-name>
             <param-value>true</param-value>
            </context-param>
            
             <!-- ==================== Default Session Configuration ================= -->
             <!-- You can set the default session timeout (in minutes) -->
             <session-config>
             <session-timeout>10</session-timeout>
             </session-config>
            
            
            </web-app>
            
            


            regards
            Mo

            • 3. Re: Problem Migrationg to 3.2.1 GA
              Ilya Shaikovsky Master

              and what about error log?

              • 4. Re: Problem Migrationg to 3.2.1 GA
                Mo Pour Newbie

                There are no errors! Is there any particular error log you are looking for, do you want me to set something up?

                • 5. Re: Problem Migrationg to 3.2.1 GA
                  Ilya Shaikovsky Master

                  you talking about outofmemory in your post.

                  • 6. Re: Problem Migrationg to 3.2.1 GA
                    Mo Pour Newbie

                    Hi
                    I can not regenerate that, my problem is currently with Ajax getting stuck in the request. I will forward you any errors that I may get in due course.
                    but for now I need to know why my ajax is getting stuck.

                    regards
                    Mo

                    • 7. Re: Problem Migrationg to 3.2.1 GA
                      Nick Belaevski Master

                      Hello,

                      Ilya was talking about a4j:log component. I've tried the page and got XML formatting errors there; that is a bug: http://jira.jboss.com/jira/browse/RF-3605

                      • 8. Re: Problem Migrationg to 3.2.1 GA
                        Mo Pour Newbie

                        Hi
                        Thank you for your response, Is there a workaround to this problem, or do we need to wait for this bug fix?


                        • 9. Re: Problem Migrationg to 3.2.1 GA
                          Nick Belaevski Master

                          Hello,

                          Try to use Filter instead of FastFilter.