7 Replies Latest reply on Oct 25, 2007 5:30 PM by pmuir

    Seam built-in components not working with Woodstock !!!

    b.reeve

      I found that Seam built-in components wont work if you have Woodstock libraries in your classpath.
      I tried removing the Woodstock libraries and everything works fine.

      These are the jar files that i have

      1. dataprovider.jar
      2. dojo-0.4.3-ajax.jar
      3. json.jar
      4. prototype-1.5.0.jar
      5. webui-jsf.jar
      6. webui-jsf-suntheme.jar


      Below is the stacktrace

      java.lang.UnsupportedOperationException
       at org.jboss.seam.Namespace.entrySet(Namespace.java:23)
       at java.util.AbstractMap.toString(Unknown Source)
       at java.lang.String.valueOf(Unknown Source)
       at java.lang.StringBuilder.append(Unknown Source)
       at com.sun.webui.jsf.faces.UIComponentELResolver.getValue(UIComponentELResolver.java:72)
       at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
       at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
       at org.apache.el.parser.AstValue.getValue(AstValue.java:97)
       at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
       at com.sun.faces.application.ValueBindingValueExpressionAdapter.getValue(ValueBindingValueExpressionAdapter.java:102)
       at org.jboss.seam.core.Expressions$1.getValue(Expressions.java:69)
       at org.jboss.seam.Component.getInstanceFromFactory(Component.java:1684)
       at org.jboss.seam.Component.getInstance(Component.java:1633)
       at org.jboss.seam.Component.getInstance(Component.java:1610)
       at org.jboss.seam.Component.getInstance(Component.java:1604)
       at org.jboss.seam.jsf.SeamELResolver.getValue(SeamELResolver.java:49)
       at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
       at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
       at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:45)
       at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
       at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
       at javax.faces.component.UIOutput.getValue(UIOutput.java:173)
       at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:189)
       at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:320)
       at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:200)
       at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:836)
       at javax.faces.component.UIComponent.encodeAll(UIComponent.java:896)
       at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
       at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:577)
       at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
       at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:256)
       at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
       at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
       at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
       at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
       at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
       at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
       at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
       at java.lang.Thread.run(Unknown Source)
      


      I have no other configurations for Woodstock in my workspace.

      Does this mean that Seam cannot be used in combination with Woodstock.

      Thanks !

        • 1. Re: Seam built-in components not working with Woodstock !!!
          b.reeve

          Could anyone please reply to this thread. Seam-Woodstock stack issue!

          • 2. Re: Seam built-in components not working with Woodstock !!!
            kukeltje

            ok, a reply

            - what version of seam
            - what jdk?
            - what version of woodstock
            - what are you trying to do
            - do you have a unit test demonstrating this problem?
            - what appserver
            - ...

            This does not mean that if you post this info, *I* am able to help, but it is probably easier for others

            • 3. Re: Seam built-in components not working with Woodstock !!!
              b.reeve

              Seam : 1.2.1
              JDK : 5
              Woodstock : 4.1
              Server : Tomcat 6.0.10

              I just had the seam built-in component "conversationList" in one of my pages and accessing the page throws UnsupportedOperationException. When i remove the Woodstock jar files from the classpath, it works fine.
              Thanks!

              • 4. Re: Seam built-in components not working with Woodstock !!!
                pmuir

                http://jira.jboss.com/jira/browse/JBSEAM-1473

                It's not high up the agenda though but if we get patches we can get it in sooner :)

                • 5. Re: Seam built-in components not working with Woodstock !!!
                  b.reeve

                  Seems like this should be of high priority. I have an application with Woodstock + Seam +Spring in the stack. I get any 2 of these working together but not the 3.
                  For example: I have a seam bean having Spring bean injected into it. When i try to set any input field into this Seam bean, it is not working with Woodstock. But the spring bean is getting injected.
                  1. If i remove Woodstock from the classpath, everything is working fine. (Seam + Spring = works fine)
                  2. If I remove Spring injection, field setters are getting called. (Woodstock +Seam (without seam -spring integration) = works fine)
                  3. If I remove Seam from the stack, everything works fine. (Woodstock + Spring = works fine)
                  I am not able to figure out any work around for this situation. I really need help. Because, seems like I have to choose among Woodstock and Seam, but I really wish i could use the combination.
                  Thanks in advance.

                  • 6. Re: Seam built-in components not working with Woodstock !!!
                    b.reeve

                    My Environment now is

                    Seam : 2.0.0.CR2
                    Woodstock : 4.1
                    JSF : 1.2
                    Java : 5.0
                    Tomcat : 6.0.10

                    These are the files that I have

                    Employee.java

                    package test.injection;
                    
                    import java.io.Serializable;
                    
                    import org.jboss.seam.ScopeType;
                    import org.jboss.seam.annotations.In;
                    import org.jboss.seam.annotations.Name;
                    import org.jboss.seam.annotations.Scope;
                    
                    @Name("employeeBean")
                    @Scope(ScopeType.SESSION)
                    public class Employee implements Serializable{
                    
                     private String name;
                    
                     @In(value="#{departmentSpring}")
                     private DepartmentSpringBean departmentSpring;
                    
                     public String getName() {
                     return name;
                     }
                    
                     public void setName(String name) {
                     this.name = name;
                     }
                    
                     public String addEmployee(){
                     System.out.println("Name = " + getName());
                     return "/success.xhtml";
                     }
                    }
                    


                    DepartmentSpringBean.java
                    
                    package test.injection;
                    
                    
                    public class DepartmentSpringBean {
                    
                     private String departmentName;
                    
                     public DepartmentSpringBean(){
                     }
                    
                     public String getDepartmentName() {
                     return departmentName;
                     }
                    
                     public void setDepartmentName(String departmentName) {
                     this.departmentName = departmentName;
                     }
                    
                    }
                    


                    spring.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">
                     <head></head>
                     <body>
                     <h:form id="testInjectionForm">
                     <h:inputText value="#{departmentSpring.departmentName}" />
                     <h:inputText value="#{employeeBean.name}" />
                     <h:commandLink action="#{employeeBean.addEmployee}" value="Add Employee" />
                     </h:form>
                    
                     </body>
                    </html>
                    


                    applicationContext.xml
                    <?xml version="1.0" encoding="UTF-8"?>
                    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
                    <beans>
                     <bean id="departmentSpring" class="test.injection.DepartmentSpringBean" />
                    </beans>
                    


                    On running the app, we can see that the seam bean setter (setName) is never called but Spring bean setter is called and also Spring bean is injected into the Seam component. Any ideas, suggestions would be helpful.

                    Thanks!


                    • 7. Re: Seam built-in components not working with Woodstock !!!
                      pmuir

                      We have exactly zero votes in JIRA for the only woodstock issue. Therefore it is a low priority - if we start to see votes for it, it will get bumped up the priority list.

                      This would be a great community contribution!