1 2 Previous Next 26 Replies Latest reply on Aug 8, 2007 8:31 AM by viggo.navarsete Go to original post
      • 15. Re: JSF 1.2 + Woodstock
        viggo.navarsete

        Do you know which components Shohil successfully tried using 2.6?

        • 16. Re: JSF 1.2 + Woodstock
          theute

          I think he just used the drag and drop.
          See:
          http://anonsvn.jboss.org/repos/portal/branches/2_6_RichFaces_POC

          To see it in action

          • 17. Re: JSF 1.2 + Woodstock
            theute

            Actually, there are other comments saying that it should work, so i'm puzzled like you, till i try by myself (But don't have the time right now).

            Sorry for the confusion.

            • 18. Re: JSF 1.2 + Woodstock
              viggo.navarsete

              Thomas, thanks for all support you give, and short response time!! I will try putting up a prototype with this combination today to see if it works:
              JSF RI 1.2
              JBoss AS 4.2.0.GA
              JBoss Portal 2.6
              RichFaces
              (perhaps also Tomahawk, as I need a tree component with checkboxes next to each node in the tree. I've got an example in another thread how to accomplish that).

              I will of course give feedback in various thread where these topics are covered as soon as I get the results:)

              • 19. Re: JSF 1.2 + Woodstock
                theute

                Thanks !

                • 20. Re: JSF 1.2 + Woodstock
                  viggo.navarsete

                  I've done some research:
                  1. Downloaded source for ajax4jsf and richfaces and built it according to http://labs.jboss.com/wiki/HowToBuildRichFacesSnapshotManually
                  2. Created a JSF portlet where I
                  - bundled with the JSF Portletbridge from Sun, the richfaces-ui, richfaces-impl, richfaces-api. Also had to bundle the commons-digester and commons-beanutils for some reason.
                  - My web.xml look like this:

                  <?xml version="1.0" encoding="UTF-8"?>
                  <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
                   <context-param>
                   <param-name>com.sun.faces.verifyObjects</param-name>
                   <param-value>false</param-value>
                   </context-param>
                   <context-param>
                   <param-name>com.sun.faces.validateXml</param-name>
                   <param-value>true</param-value>
                   </context-param>
                   <context-param>
                   <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
                   <param-value>client</param-value>
                   </context-param>
                  
                   <!-- RichFaces and ajax4jsf settings -->
                   <context-param>
                   <param-name>org.ajax4jsf.SKIN</param-name>
                   <param-value>blueSky</param-value>
                   </context-param>
                   <filter>
                   <display-name>Ajax4jsf Filter</display-name>
                   <filter-name>ajax4jsf</filter-name>
                   <filter-class>org.ajax4jsf.Filter</filter-class>
                   </filter>
                   <filter-mapping>
                   <filter-name>ajax4jsf</filter-name>
                   <servlet-name>Faces Servlet</servlet-name>
                   <dispatcher>REQUEST</dispatcher>
                   <dispatcher>FORWARD</dispatcher>
                   <dispatcher>INCLUDE</dispatcher>
                   </filter-mapping>
                  
                   <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>/faces/*</url-pattern>
                   </servlet-mapping>
                   <session-config>
                   <session-timeout>
                   30
                   </session-timeout>
                   </session-config>
                   <welcome-file-list>
                   <welcome-file>faces/welcomeJSF.jsp</welcome-file>
                   </welcome-file-list>
                   </web-app>


                  -my portlet.xml looks like this:
                  <?xml version="1.0" encoding="UTF-8"?>
                  <portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
                   version="1.0">
                  
                   <portlet>
                   <description>Search</description>
                   <portlet-name>Search</portlet-name>
                   <display-name>Search</display-name>
                   <portlet-class>com.sun.faces.portlet.FacesPortlet</portlet-class>
                   <!-- This is a required parameter and must point to the first page of the JSF Application -->
                   <init-param>
                   <description>Portlet init view page</description>
                   <name>com.sun.faces.portlet.INIT_VIEW</name>
                   <value>/WEB-INF/jsp/Search.jsp</value>
                   </init-param>
                   <expiration-cache>0</expiration-cache>
                   <supports>
                   <mime-type>text/html</mime-type>
                   <portlet-mode>VIEW</portlet-mode>
                   </supports>
                   <portlet-info>
                   <title>Search</title>
                   <short-title>Search</short-title>
                   </portlet-info>
                   </portlet>
                  </portlet-app>


                  - my jsp looks like this:
                  <%@page contentType="text/html"%>
                  <%@page pageEncoding="UTF-8"%>
                  
                  <%-- RichFaces taglibs --%>
                  <%@ taglib uri="http://richfaces.ajax4jsf.org/rich" prefix="rich"%>
                  
                  <%-- JSF taglibs --%>
                  <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
                  <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
                  
                  <%-- portlet taglibs --%>
                  <%@ page import="javax.portlet.*"%>
                  <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
                  
                  
                  <portlet:defineObjects />
                  <%PortletPreferences prefs = renderRequest.getPreferences();%>
                  
                  <f:view>
                   <rich:panel>
                   <f:facet name="header">
                   <h:outputText value="Olympus EVOLT E-500"/>
                   </f:facet>
                   </rich:panel>
                  </f:view>
                  

                  When I create a portlet instance in JBoss Portal 2.6.0.GA (running on JBoss AS 4.2.0GA) and try to access the portlet I get this stacktrace:
                  13:06:48,011 WARN [SkinFactoryImpl] Init parameter for a skin name changed to org.richfaces.SKIN
                  13:06:54,827 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
                  java.lang.ClassCastException: org.apache.catalina.core.ApplicationContextFacade
                   at com.sun.faces.portlet.FacesContextFactoryImpl.getFacesContext(FacesContextFactoryImpl.java:64)
                   at org.jboss.portal.faces.portlet.JSFMetaBridgeFacesContextFactoryImpl.getFacesContext(JSFMetaBridgeFacesContextFactoryImpl.java:47)
                   at org.ajax4jsf.resource.InternetResourceService.getFacesContext(InternetResourceService.java:317)
                   at org.ajax4jsf.resource.InternetResourceService.getResourceContext(InternetResourceService.java:251)
                   at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:162)
                   at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:144)
                   at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:259)
                   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                   at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                   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:230)
                   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                   at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
                   at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
                   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
                   at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
                   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
                   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
                   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
                   at java.lang.Thread.run(Thread.java:595)
                  



                  Anyone knows what is wrong?

                  • 21. Re: JSF 1.2 + Woodstock
                    viggo.navarsete

                    I have moved my last comment into a new thread, as this thread really was about JSF 1.2 + woodstock.

                    New thread:
                    http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4071957#4071957

                    • 22. Re: JSF 1.2 + Woodstock
                      theute

                      You forgot to add the Sun RI portlet bridge:
                      https://jsfportletbridge.dev.java.net/

                      • 23. Re: JSF 1.2 + Woodstock
                        viggo.navarsete

                        Thomas, I added the SunRI portlet bridge to the WEB-INF/lib folder. Are there other places I need to add/refer to it?

                        • 24. Re: JSF 1.2 + Woodstock
                          theute

                          Oups sorry i misread your stacktrace (answering too fast based on common mistakes ;) )

                          Please use 2.6.1.GA it will help to get this solved. The meta-bridge is not used anymore.

                          • 25. Re: JSF 1.2 + Woodstock
                            viggo.navarsete

                            Please see my follow-up on this topic:
                            http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4071984#4071984

                            (short version: Have tried to upgrade to 2.6.1.GA but still get the stacktrace.)

                            • 26. Re: JSF 1.2 + Woodstock
                              viggo.navarsete

                              Well, the stacktrace is actually not the same... Here's the new one:

                              14:20:37,446 WARN [SkinFactoryImpl] Init parameter for a skin name changed to org.richfaces.SKIN
                              14:20:40,342 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
                              java.lang.ClassCastException: org.apache.catalina.core.ApplicationContextFacade
                               at com.sun.faces.portlet.FacesContextFactoryImpl.getFacesContext(FacesContextFactoryImpl.java:64)
                               at org.ajax4jsf.resource.InternetResourceService.getFacesContext(InternetResourceService.java:317)
                               at org.ajax4jsf.resource.InternetResourceService.getResourceContext(InternetResourceService.java:251)
                               at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:162)
                               at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:144)
                               at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:259)
                               at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                               at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                               at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                               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:230)
                               at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                               at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
                               at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                               at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
                               at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
                               at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
                               at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                               at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
                               at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                               at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
                               at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
                               at java.lang.Thread.run(Thread.java:595)
                              


                              1 2 Previous Next