10 Replies Latest reply on Sep 20, 2006 2:49 AM by jerome_082006

    Integrating Seam and Icefaces

    jerome_082006

      Hello,

      I am currently prototyping a new application using Seam and Icefaces (AJAX framework on top of JSF).

      My EJB3 Seam beans are deployed, the Icefaces components are rendered as they should be but they cannot "communicate" with the Seam framework (I got all sorts of exceptions).

      I understand this has to do with my web.xml file (most probably).

      What should I do ? Has anyone managed to get Seam and Icefaces work together ?

      Regards,
      Jerome.

        • 1. Re: Integrating Seam and Icefaces
          gavin.king

          Well, for a start you need to add the Seam variable resolver to faces-config.xml.

          • 2. Re: Integrating Seam and Icefaces

            Hello,
            I'm managed (a couple of months ago) to integrate Backbase Java Server Edition with Seam. BJS is also a AJAX JSF taglibrary. What i did was just "merged" the configurations (web.xml etc) of BJS and Seam.... Also some JAR repositoning was required. Like re/moving commons-*.jars from BB.war and moving other Jars around ( jsf-libs ). It's quite annoying to get a WAR application with it's WEB-INF/lib full of opensource libraries to integrate with other applications (WAR's and EAR's alike) nicely.

            Currently i'm waiting for the JBoss Portal to grow up and i'm trying to integrate Liferay and Seam.

            • 3. Re: Integrating Seam and Icefaces
              jerome_082006

              Hello,

              Thank you very much.

              I tried to add this:

              <application>
               <variable-resolver>
               org.jboss.seam.jsf.SeamVariableResolver
               </variable-resolver>
               <locale-config />
              </application>


              to my faces-config.xml and this is what I get:
              14:38:21,015 ERROR [D2DFaceletViewHandler] Error renderResponse. Could not instantiate Seam component: user
              org.jboss.seam.InstantiationException: Could not instantiate Seam component: user
               at org.jboss.seam.Component.newInstance(Component.java:735)
               at org.jboss.seam.Component.newInstance(Component.java:1308)
               at org.jboss.seam.Component.getInstance(Component.java:1263)
               at org.jboss.seam.Component.getInstance(Component.java:1246)
               at org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:44)
               at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:134)
               at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:65)
               at com.sun.el.parser.AstValue.getValue(AstValue.java:106)
               at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:192)
               at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
               at com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:56)
               at javax.faces.component.UIOutput.getValue(UIOutput.java:75)
               at com.icesoft.faces.renderkit.dom_html_basic.DomBasicInputRenderer.getValue(DomBasicInputRenderer.java:26)
               at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.getValue(DomBasicRenderer.java:127)
               at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeEnd(DomBasicRenderer.java:97)
               at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:331)
               at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:569)
               at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:558)
               at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:558)
               at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:558)
               at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:558)
               at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:558)
               at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:558)
               at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:558)
               at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:221)
               at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:125)
               at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
               at com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet.service(PersistentFacesServlet.java:273)
               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.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:30)
               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.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)
              Caused by: java.lang.InstantiationException: eu.mpulse.contacts.user.User
               at java.lang.Class.newInstance0(Class.java:335)
               at java.lang.Class.newInstance(Class.java:303)
               at org.jboss.seam.Component.instantiate(Component.java:771)
               at org.jboss.seam.Component.newInstance(Component.java:731)
               ... 49 more


              I am probably missing something in my configuration files or using inappropriate jar files.

              I also tried to add a Seam servlet filter (org.jboss.seam.servlet.SeamServletFilter) around the Persistent Faces Servlet.

              I would like to understand how these two frameworks are supposed to interact with one another. Could you please explain me (basically) how it should work ? which servlet is to be called first ?

              Regards,
              Jerome.


              • 4. Re: Integrating Seam and Icefaces
                bfo81

                Look at the bottom lines. A simple Java Exception is the root cause for the error. Have a look at your eu.mpulse.contactes.user.User class and check if there's something wrong with the public non-argument constructor.

                • 5. Re: Integrating Seam and Icefaces
                  jerome_082006

                  Thank you bfo81, that was indeed part of the problem. My apologies.

                  Now this exception is gone but I am facing another error (javascript error):

                  Error: Wp8Z.BRMU is not a function
                  Source File: http://127.0.0.1:8080/contacts/xmlhttp/icefaces-d2d.js
                  Line: 1


                  I think this one is related to Icefaces so I should post in their forum, but if anyone has already faced this problem and know how to solve it...

                  Regards,
                  Jerome.

                  • 6. Re: Integrating Seam and Icefaces
                    jerome_082006

                    Problem solved, thank you.

                    Regards,
                    Jerome.

                    • 7. Re: Integrating Seam and Icefaces
                      nhpvti

                       

                      "jerome_082006" wrote:
                      Problem solved, thank you.

                      Regards,
                      Jerome.


                      Would you be so kind to share step-by-step set up instructions for using IceFaces with Seam?

                      If they really can work together nothing can stop triumphal procession of the Seam !!!
                      :-)

                      • 8. Re: Integrating Seam and Icefaces
                        jerome_082006

                        Hello,

                        Sorry for the delay, I am still testing.

                        I shall post a step-by-step howto as soon as I am sure it really works as it should.

                        Regards,
                        Jerome.

                        • 9. Re: Integrating Seam and Icefaces
                          nhpvti

                           

                          "jerome_082006" wrote:
                          Hello,
                          I shall post a step-by-step howto as soon as I am sure it really works as it should.


                          Thank you in advance. Tried yesterday and today myself, still without success, and distraught posted my question in a new topic where I described all accomplished steps
                          http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3969787#3969787



                          • 10. Re: Integrating Seam and Icefaces
                            jerome_082006

                            Hello,

                            It seems that Seam and Icefaces are not ready for integration yet.
                            See this post:
                            http://www.jboss.com/index.html?module=bb&op=viewtopic&t=90059

                            Regards,
                            Jerome.