1 2 Previous Next 21 Replies Latest reply on May 13, 2009 2:28 AM by Varun Goyal

    Myfaces+ Facelets+Jboss Seam+ Richfaces (JBOSS 4.0.5)

    Varun Goyal Newbie

      Hi,

      In our application, we have Myfaces 1.1.5 + JBoss Seam 1.2.1 GA + Facelets 1.1.11 on JBOSS 4.0.5.

      Now for some reasons, i want to use Richfaces along also. I tried copying rich faces jar files of various versions, but each time getting the following error on launching the application. Please let me know how i can acheive it and wat modifictaion is required in web.xml.

      java.lang.UnsupportedOperationException
      at javax.faces.context.FacesContext.getELContext(FacesContext.java:138)
      at javax.faces.component.UIViewRoot.setLocale(UIViewRoot.java:900)
      at org.apache.myfaces.application.jsp.JspViewHandlerImpl.createView(JspViewHandlerImpl.java:121)
      at org.jboss.seam.jsf.SeamViewHandler.createView(SeamViewHandler.java:43)
      at org.jboss.seam.jsf.SeamViewHandler.createView(SeamViewHandler.java:43)
      at com.sun.facelets.FaceletViewHandler.createView(FaceletViewHandler.java:782)
      at org.ajax4jsf.application.ViewHandlerWrapper.createView(ViewHandlerWrapper.java:84)
      at org.ajax4jsf.application.AjaxViewHandler.createView(AjaxViewHandler.java:92)
      at org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:83)
      at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
      at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:177)
      at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267)
      at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:380)
      at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      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.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:53)
      at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
      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.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
      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)

        • 1. Re: Myfaces+ Facelets+Jboss Seam+ Richfaces (JBOSS 4.0.5)
          Ilya Shaikovsky Master

          Are you using 3.1.6? richfaces 3.2.0 and higher supports only JSF 1.2..

          • 2. Re: Myfaces+ Facelets+Jboss Seam+ Richfaces (JBOSS 4.0.5)
            Varun Goyal Newbie

            I tried using Richfaces 3.2.1 GA, 3.2.2.SR1 and 3.3.0 GA but with all same error is coming up.

            • 3. Re: Myfaces+ Facelets+Jboss Seam+ Richfaces (JBOSS 4.0.5)
              Ilya Shaikovsky Master

               

              In our application, we have Myfaces 1.1.5

              richfaces 3.2.0 and higher supports only JSF 1.2 implementations..


              • 4. Re: Myfaces+ Facelets+Jboss Seam+ Richfaces (JBOSS 4.0.5)
                Varun Goyal Newbie

                Which version i should be using to support MyFaces 1.1.5 + JBoss Seam 1.2.1 GA + Facelets 1.1.11 with JBoss 4.0.5

                • 5. Re: Myfaces+ Facelets+Jboss Seam+ Richfaces (JBOSS 4.0.5)
                  Ilya Shaikovsky Master

                  3.1.6 is latest version compatible with JSF 1.1

                  • 6. Re: Myfaces+ Facelets+Jboss Seam+ Richfaces (JBOSS 4.0.5)
                    Varun Goyal Newbie

                    I already tried using 3.1.5 but with it also same error is coming up.

                    • 7. Re: Myfaces+ Facelets+Jboss Seam+ Richfaces (JBOSS 4.0.5)
                      Ilya Shaikovsky Master

                      seems you not included el-* jars.

                      • 8. Re: Myfaces+ Facelets+Jboss Seam+ Richfaces (JBOSS 4.0.5)
                        Varun Goyal Newbie

                        el-api.jar and el-ri.jar are also there is lib folder

                        • 9. Re: Myfaces+ Facelets+Jboss Seam+ Richfaces (JBOSS 4.0.5)
                          Ilya Shaikovsky Master

                          sorry.. in myFaces environment you should use commons-el.

                          • 10. Re: Myfaces+ Facelets+Jboss Seam+ Richfaces (JBOSS 4.0.5)
                            Varun Goyal Newbie

                            commons-el is also there.

                            neways, the problem get resolved with 3.1.6. Thanks for ur help.

                            A small issue, at run time, java script error is coming up 'A4j is undefined' but still components are rendering.

                            • 11. Re: Myfaces+ Facelets+Jboss Seam+ Richfaces (JBOSS 4.0.5)
                              Varun Goyal Newbie

                              commons.el jar is already there.

                              Neways, error get resolved with 3.1.6. At run time, a small java script error is coming up 'A4J is undefined', although components are rendering.
                              here is the .xhtml file

                              <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                              <ui:composition 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:t="http://myfaces.apache.org/tomahawk"
                              xmlns:custom="http://java.sun.com/blueprints/ajax/radiobutton"
                              xmlns:rich="http://richfaces.org/rich"
                              xmlns:a4j="http://richfaces.org/a4j"
                              template="template.xhtml">

                              <!-- Meta Data -->
                              <!-- is used for auto refresh of the current page -->
                              <!-- <ui:define name="metadata">
                              <meta http-equiv="refresh" content="15; url=alarmMgtMain.jsf" />
                              </ui:define>
                              -->



                              <!-- Header Area -->
                              <ui:define name="header">
                              <f:loadBundle basename="com.cntdb.dbm.messages" var="dbm_messages"/>
                              <h1><h:outputText value="#{dbm_messages['header_alarmgt']}" /></h1>

                              </ui:define>

                              <!-- Message Area -->
                              <ui:define name="messages">
                              <f:loadBundle basename="com.cntdb.dbm.messages" var="dbm_messages"/>
                              </ui:define>

                              <!-- Content Area -->
                              <ui:define name="content">
                              <f:view>
                              <f:loadBundle basename="com.cntdb.dbm.messages" var="dbm_messages"/>

                              <h:panelGroup id="dbmAlarmMgtMain_panel">
                              <h:form>
                              <rich:panel header="Simple Echo">
                              <h:inputText size="50" value="#{bean.text}" >
                              <a4j:support event="onkeyup" reRender="rep"/>
                              </h:inputText>
                              <h:outputText value="#{bean.text}" id="rep"/>
                              </rich:panel>
                              </h:form>
                              </h:panelGroup>
                              </f:view>
                              </ui:define>

                              </ui:composition>

                              • 12. Re: Myfaces+ Facelets+Jboss Seam+ Richfaces (JBOSS 4.0.5)
                                Ilya Shaikovsky Master

                                seems scripts not loaded.. check this with Firebug please. seems something wrong with web.xml configuration. And please show template for this page.

                                B.t.w. please use code tags around snippets.

                                • 13. Re: Myfaces+ Facelets+Jboss Seam+ Richfaces (JBOSS 4.0.5)
                                  Varun Goyal Newbie

                                  Please find web.xml amd let me know in case there is anything wrong with it.

                                  <?xml version="1.0" encoding="UTF-8"?>
                                  <web-app version="2.4" 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"> <!-- The Sun dtd defines an explicit order for the different tags! -->
                                  <!-- The order is:
                                  ELEMENT web-app (icon?, display-name?, description?, distributable?,
                                  context-param*, filter*, filter-mapping*, listener*, servlet*,
                                  servlet-mapping*, session-config?, mime-mapping*, welcome-file-list?,
                                  error-page*, taglib*, resource-env-ref*, resource-ref*, security-constraint*,
                                  login-config?, security-role*, env-entry*, ejb-ref*, ejb-local-ref*)
                                  -->


                                  <!-- Seam context params -->

                                  <!-- lw026449, 06.06.2007, RL2122: 120 minutes conversation timeout; value in millis -->
                                  <context-param>
                                  <param-name>org.jboss.seam.core.manager.conversationTimeout</param-name>
                                  <param-value>7200000</param-value>
                                  </context-param> <!-- TODO: Not working yet unless you disable repository scoped classloading by deleting jboss-app.xml -->
                                  <!-- context-param&gt;
                                  &lt;param-name&gt;org.jboss.seam.core.init.clientSideConversations&lt;/param-name&gt;
                                  &lt;param-value&gt;true&lt;/param-value&gt;
                                  &lt;/context-param-->

                                  <!-- Facelets context params -->

                                  <context-param>
                                  <!-- false to allow seam exception handling -->
                                  <param-name>facelets.DEVELOPMENT</param-name>
                                  <param-value>false</param-value>
                                  </context-param>

                                  <context-param>
                                  <param-name>facelets.SKIP_COMMENTS</param-name>
                                  <param-value>true</param-value>
                                  </context-param>

                                  <!-- Seam context params -->

                                  <context-param>
                                  <!-- seam debug page (requires seam-debug.jar!): http://:8080/dbmcntdb/debug.jsf -->
                                  <param-name>org.jboss.seam.core.init.debug</param-name>
                                  <param-value>false</param-value>
                                  </context-param>

                                  <context-param>
                                  <param-name>org.jboss.seam.core.init.jndiPattern</param-name>
                                  <param-value>#{ejbName}/local</param-value>
                                  </context-param>

                                  <context-param> <!-- true for MyFaces 1.1.1 (part of JBoss 4.0.4.GA), false for 1.1.3 -->
                                  <param-name>org.jboss.seam.core.init.myFacesLifecycleBug</param-name>
                                  <param-value>false</param-value>
                                  </context-param>

                                  <!-- MyFaces context params -->

                                  <context-param>
                                  <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
                                  <param-value>client</param-value>
                                  </context-param>

                                  <context-param>
                                  <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
                                  <param-value>.xhtml</param-value>
                                  </context-param>

                                  <context-param>
                                  <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
                                  <param-value>true</param-value>
                                  </context-param>

                                  <context-param>
                                  <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
                                  <param-value>true</param-value>
                                  </context-param>

                                  <context-param>
                                  <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
                                  <param-value>false</param-value>
                                  </context-param>

                                  <context-param>
                                  <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
                                  <param-value>false</param-value>
                                  </context-param>

                                  <!-- MyFaces 1.1.3 context params -->

                                  <context-param>
                                  <param-name>org.apache.myfaces.ADD_RESOURCE_CLASS</param-name>
                                  <param-value>org.apache.myfaces.renderkit.html.util.DefaultAddResource</param-value>
                                  </context-param>

                                  <context-param>
                                  <param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name>
                                  <param-value>true</param-value>
                                  </context-param>

                                  <!-- MyFaces 1.1.5 context params -->
                                  <context-param>
                                  <param-name>org.apache.myfaces.redirectTracker.MAX_REDIRECTS</param-name>
                                  <param-value>20</param-value>
                                  </context-param>
                                  <context-param>
                                  <param-name>org.apache.myfaces.redirectTracker.POLICY</param-name>
                                  <param-value>org.apache.myfaces.custom.redirectTracker.policy.NoopRedirectTrackPolicy</param-value>
                                  </context-param>
                                  <context-param>
                                  <param-name>org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS</param-name>
                                  <param-value>true</param-value>
                                  </context-param>
                                  <context-param>
                                  <param-name>org.apache.myfaces.RESOURCE_VIRTUAL_PATH</param-name>
                                  <param-value>/faces/myFacesExtensionResource</param-value>
                                  </context-param>




                                  <!-- Tomahawk context params -->
                                  <context-param>
                                  <param-name>facelets.LIBRARIES</param-name>
                                  <param-value>/WEB-INF/tomahawk.taglib.xml;/WEB-INF/sandbox.taglib.xml;/WEB-INF/progressbar.taglib.xml</param-value>
                                  </context-param>

                                  <!-- richfaces -->


                                  <display-name>RichFaces Filter</display-name>
                                  <filter-name>richfaces</filter-name>
                                  <filter-class>org.ajax4jsf.Filter</filter-class>



                                  <!-- Seam master filter -->
                                  <!-- Enables seam exception filter, seam redirect and multipart filter which can be configured via components.xml -->

                                  <!-- richfaces -->
                                  <filter-mapping>
                                  <filter-name>richfaces</filter-name>
                                  <url-pattern>*.seam</url-pattern>
                                  </filter-mapping>


                                  <filter-name>SeamFilter</filter-name>
                                  <filter-class>org.jboss.seam.web.SeamFilter</filter-class>


                                  <!-- MyFaces extensions filter -->


                                  <filter-name>MyFacesExtensionsFilter</filter-name>
                                  <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
                                  <init-param>
                                  <param-name>maxFileSize</param-name>
                                  <param-value>20m</param-value>
                                  </init-param>


                                  <!-- Seam filter mapping -->

                                  <filter-mapping>
                                  <filter-name>SeamFilter</filter-name>
                                  <url-pattern>/*</url-pattern>
                                  </filter-mapping>

                                  <!-- MyFaces filter mapping -->

                                  <!-- extension mapping for adding &lt;script/&gt;, &lt;link/&gt;, and other resource tags to JSF-pages -->
                                  <filter-mapping>
                                  <filter-name>MyFacesExtensionsFilter</filter-name>
                                  <url-pattern>*.jsf</url-pattern>
                                  </filter-mapping>

                                  <!-- extension mapping for serving page-independent resources (javascript, stylesheets, images, etc.) -->
                                  <filter-mapping>
                                  <filter-name>MyFacesExtensionsFilter</filter-name>
                                  <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
                                  </filter-mapping>


                                  <!-- Seam listener -->


                                  <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>


                                  <!-- MyFaces listener -->


                                  <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>


                                  <!-- Faces servlet -->


                                  <servlet-name>Token Servlet</servlet-name>
                                  <servlet-class>com.cntdb.dbm.login.TokenServlet</servlet-class>



                                  <servlet-name>Faces Servlet</servlet-name>
                                  <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
                                  <load-on-startup>1</load-on-startup>


                                  <servlet-name>StartUp</servlet-name>
                                  <servlet-class>com.cntdb.dbm.alarmmgt.CompareXMLFiles</servlet-class>
                                  <load-on-startup>1</load-on-startup>

                                  <!-- Faces Servlet Mapping -->

                                  <servlet-mapping>
                                  <servlet-name>Token Servlet</servlet-name>
                                  <url-pattern>/token</url-pattern>
                                  </servlet-mapping>
                                  <servlet-mapping>
                                  <servlet-name>Faces Servlet</servlet-name>
                                  <url-pattern>*.jsf</url-pattern>
                                  </servlet-mapping>
                                  <servlet-mapping>
                                  <servlet-name>Faces Servlet</servlet-name>
                                  <url-pattern>*.faces</url-pattern>
                                  </servlet-mapping>
                                  <servlet-mapping>
                                  <servlet-name>Faces Servlet</servlet-name>
                                  <url-pattern>/faces/*</url-pattern>
                                  </servlet-mapping>

                                  <!-- http session timeout 2 hours (120 min) -->
                                  <session-config>
                                  <session-timeout>120</session-timeout>
                                  </session-config>
                                  <error-page>
                                  <error-code>500</error-code>
                                  /dbmError500.jsf
                                  </error-page>
                                  <error-page>
                                  <error-code>501</error-code>
                                  /dbmError501.jsf
                                  </error-page>
                                  <error-page>
                                  <error-code>502</error-code>
                                  /dbmError502.jsf
                                  </error-page>
                                  <error-page>
                                  <error-code>503</error-code>
                                  /dbmError503.jsf
                                  </error-page>
                                  <error-page>
                                  <error-code>504</error-code>
                                  /dbmError504.jsf
                                  </error-page>
                                  <error-page>
                                  <error-code>505</error-code>
                                  /dbmError505.jsf
                                  </error-page>

                                  </web-app>


                                  Also, what do you mean by code tags around snippets.

                                  Thanks for the help in advance...

                                  • 14. Re: Myfaces+ Facelets+Jboss Seam+ Richfaces (JBOSS 4.0.5)
                                    Ilya Shaikovsky Master

                                    show please template for the page above.

                                    [ code ] your code should goes here [ / code ] (without spaces)

                                    1 2 Previous Next