8 Replies Latest reply on Apr 24, 2007 1:15 PM by tedgoddard

    Seam/ICEFaces Integration

    djeverson

      I am in the process of converting an application from Tomahawk componets to ICEFaces components. I am running into some issues that I can't not find any resolution to after doing extensive research.

      My environment is: Seam 1.1.0 GA, ICEFaces 1.5.1, JBoss 4.0.5 GA, MyFaces 1.1.4.

      I have configured the web.xml and faces-config.xml files to use ICEFaces.

      The page that I am having the most difficulty with contains a <ice:panelTabSet> Tab Set with five tabs. This page is backed by a stateless session bean. The issues that I am seeing include:

      1) When I click on the second tab, after filling in the first tab, I recieve the following stack trace:

      ERROR [org.apache.myfaces.lifecycle.PhaseListenerManager] Exception in PhaseListener RENDER_RESPONSE(6) afterPhase
      java.lang.NullPointerException
       at org.jboss.seam.contexts.ServerConversationContext.flush(ServerConversationContext.java:181)
       at org.jboss.seam.contexts.Lifecycle.flushAndDestroyContexts(Lifecycle.java:339)
       at org.jboss.seam.contexts.Lifecycle.endRequest(Lifecycle.java:242)
       at org.jboss.seam.jsf.AbstractSeamPhaseListener.afterRender(AbstractSeamPhaseListener.java:232)
       at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:89)
       at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAfter(PhaseListenerManager.java:89)
       at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:391)
       at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.renderCyclePartial(BlockingServlet.java:453)
       at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.receiveUpdates(BlockingServlet.java:421)
       at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:277)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       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)
      --snipped--
      

      I see that there are several similar posts in the forum. Some of these posts refer to the issue as a ICEFaces issue. When I search the ICEFaces forum, I see postings indicating that this is a SEAM issue. Is it possible to get anything more definitive on this issue?

      2) The second major issue that I am having is that on the third tab, I have a <ice:dataTable> Data Table component. Initially the data table is empty. The user has fields where they key the values for a new row. A <ice:commandLink> is used to add the data entered by the user to the data table. The first row appears to add correctly and displayed correctly in the web application. However, as the user starts to key the data for the second row and tab among the fields, the row that was previously added disappers and reappears. Something is getting lost. I don't know if this issue is related to the first.

      3) Can pageflows be used with ICEFaces?

      I tried changing the Stateless session bean to a Stateful Session Bean, but this did not have a positive effect.

      Any assistance in helping debug and resolve these issues would be greatly appreciated.

      Thanks!

        • 1. Re: Seam/ICEFaces Integration
          gavin.king

          This is a known intermittent bug in Seam/ICEFaces ... please ask the ICEFaces guys if there is a fix yet.

          • 2. Re: Seam/ICEFaces Integration
            djeverson

            I have posed the same message over at ICEFaces.
            They have not responded to my posting, but other similar postings have the response that it is Seam related. Very frustrating.
            As for being intermittent - we can reproduce almost 100% of the time.

            • 3. Re: Seam/ICEFaces Integration
              tedgoddard

              Could you provide additional details on when you observe and do not observe the bug? (To fix the bug we will need to reproduce it.)

              • 4. Re: Seam/ICEFaces Integration
                tedgoddard

                I have reproduced the PhaseListener NullPointerException in the seam-icefaces booking application by changing synchronousUpdate to false (thereby enabling asynchronous update capability) in web.xml. Asynchronous updates are only needed for application-initiated page updates. If your application is driven by user events (as is the case with most web applications) please set synchronousUpdate to "true".


                 <context-param>
                 <param-name>com.icesoft.faces.synchronousUpdate</param-name>
                 <param-value>true</param-value>
                 </context-param>
                

                We have not extensively tested Seam with application-initiated update (since the sample applications do not require this capability), but are looking into this now.

                • 5. Re: Seam/ICEFaces Integration
                  djeverson

                  This parameter is already set to true.

                  We are working on producing a "public" copy of our EJB class to provide to reproduce.

                  We are also waiting to see if the v1.5.2 release of ICEFaces next week addresses these issues. I have asked which SEAM issues they plan on address, but don't have a response.

                  • 6. Re: Seam/ICEFaces Integration
                    tedgoddard

                    I've reproduced this as well with synchronousUpdate "true" (it just reduces the occurrence). I can assure you that it's not yet fixed in ICEfaces 1.5.2 as I'm working on the bug at this very moment ... (Note that ICEfaces 1.5.2 will ship once the outstanding bugs of current support customers are resolved, so a fix for this bug may or may not make the cut depending on timing.)

                    The bug appears to be due to a race condition involving org.jboss.seam.core.Manager caused by potential concurrent handling of ICEfaces partialSubmit requests (ordering is not guaranteed, but concurrent handling would be unintended) . I am investigating this in detail now.

                    • 7. Re: Seam/ICEFaces Integration
                      tedgoddard

                      The NullPointerException is due to concurrency in the ICEfaces BlockingServlet. Unfortunately it appears that the fix will not be complete in time for ICEfaces 1.5.2.

                      • 8. Re: Seam/ICEFaces Integration
                        tedgoddard

                        As of ICEfaces 1.6.0 DR#3, substantial progress has been made with Seam/ICEfaces integration. In general, it is enough to simply add the ICEfaces .jar files to turn your Seam application into an Ajax application. Please download the latest ICEfaces release here:

                        http://icefaces.org/main/downloads/os-downloads.iface

                        Of particular interest are Ajax Push and seam-gen. ICEfaces Ajax Push is now working with Seam applications (this allows you to update the browser page under application control; no interaction from the user is required). To generate an ICEfaces application with seam-gen, please download the recently added ICEfaces seam-gen bundle

                        http://icefaces.org/main/downloads/project-downloads.iface

                        and unzip it at the root of your Seam 1.2.1 installation. You will then be able to generate ICEfaces Seam applications from within the icefaces-seam-gen directory. Over time we will be enhancing these templates to take full advantage of ICEfaces, allowing you to automatically generate a full CRUD application with a single-page Ajax user interface.