Uploaded image for project: 'RichFaces'
  1. RichFaces
  2. RF-572

ClassCastException when trying to access a JSF Portlet using RichFaces

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 3.1.0
    • Fix Version/s: 3.1.5, 3.2.0
    • Component/s: None
    • Labels:
      None
    • Environment:

      RealFaces 3.1.0.SNAPSHOT (sourcecode retrieved and built manually from svn 08.08.2007 )
      JSF Portlet Bridge 1.2.1 from Sun
      JBoss Portal 2.6.1.GA
      JBoss AS 4.2.1.GA
      JDK 1.5.0_08
      Postgresql 8.x database
      Linux Kubuntu 6.10

      Description

      I have created a JSF portlet using the latest RichFaces source code from svn. I have added a <rich:panel> to my jsp page, deployed it to my jboss portal, created a portlet instance and added it to a page. When trying to access the page I get the following stacktrace:
      08:37:37,523 WARN [SkinFactoryImpl] Init parameter for a skin name changed to org.richfaces.SKIN
      08:37:39,853 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:157)
      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)

      Please read the JBoss Forum reference for more information about configuration of my web.xml, portlet.xml and other "war-file-specific-things".

        Gliffy Diagrams

        1. AbstractExternalContext.java
          11 kB
          Stephen Gregg
        2. ContextAttributesMap.java
          1 kB
          Stephen Gregg
        3. ContextMap.java
          4 kB
          Stephen Gregg
        4. EnumerationIterator.java
          0.5 kB
          Stephen Gregg
        5. FacesContextImpl.java
          9 kB
          Stephen Gregg
        6. PortletContextImpl.java
          8 kB
          Stephen Gregg
        7. ServletContextImpl.java
          9 kB
          Stephen Gregg
        8. SessionAttributesNames.java
          1 kB
          Stephen Gregg

          Activity

          Hide
          viggo.navarsete Viggo Navarsete added a comment -

          Alexander: I'm a bit confused when looking at the maven repository. What exactly should I use as version in my pom.xml to get the version you refer to? In the repository I can only find 3.1.3-SNAPSHOT, 3.1.4-SNAPSHOT and 3.2.0-SNAPSHOT (and some older). I'm looking here: http://snapshots.jboss.org/maven2/org/richfaces/framework/richfaces-api/
          (The same question goes for the other richfaces jar's as well, but as soon as I get one right, I would certainly get the other right as well..)

          Show
          viggo.navarsete Viggo Navarsete added a comment - Alexander: I'm a bit confused when looking at the maven repository. What exactly should I use as version in my pom.xml to get the version you refer to? In the repository I can only find 3.1.3-SNAPSHOT, 3.1.4-SNAPSHOT and 3.2.0-SNAPSHOT (and some older). I'm looking here: http://snapshots.jboss.org/maven2/org/richfaces/framework/richfaces-api/ (The same question goes for the other richfaces jar's as well, but as soon as I get one right, I would certainly get the other right as well..)
          Hide
          viggo.navarsete Viggo Navarsete added a comment -

          Alexander: And another more high level question: You refer to a JSR-301 portlet bridge implementation. Is this something that the Richfaces project provides as part of the Richfaces API? What about the JBoss Portal project, do they as well create a JSR-301 portlet bridge? Look at this post to get understand why I'm confused: http://jboss.com/index.html?module=bb&op=viewtopic&t=125942
          Are the people at the portal project talking to/working together with the Richfaces team on this?

          Show
          viggo.navarsete Viggo Navarsete added a comment - Alexander: And another more high level question: You refer to a JSR-301 portlet bridge implementation. Is this something that the Richfaces project provides as part of the Richfaces API? What about the JBoss Portal project, do they as well create a JSR-301 portlet bridge? Look at this post to get understand why I'm confused: http://jboss.com/index.html?module=bb&op=viewtopic&t=125942 Are the people at the portal project talking to/working together with the Richfaces team on this?
          Hide
          viggo.navarsete Viggo Navarsete added a comment -
          Show
          viggo.navarsete Viggo Navarsete added a comment - I guess Wesley at the JBoss Portal team answered my question about the number of JSR-301 portlet bridge implementations, and the answer is ONE. http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4114444#4114444 I found the repository to the Richfaces versions I was looking for...I was looking into the wrong repo...I'm too tired at the moment, better get some sleep now And the repo is here: http://repository.jboss.org/maven2/org/richfaces/
          Hide
          alexsmirnov Alexander Smirnov added a comment -

          Portlet integration is separate project now. see http://labs.jboss.com/portletbridge/

          Show
          alexsmirnov Alexander Smirnov added a comment - Portlet integration is separate project now. see http://labs.jboss.com/portletbridge/
          Hide
          jbalunas Jay Balunas added a comment -

          Part of a bulk update, all resolutions changed to done, please review history to original resolution type

          Show
          jbalunas Jay Balunas added a comment - Part of a bulk update, all resolutions changed to done, please review history to original resolution type

            People

            • Assignee:
              nbelaevski Nick Belaevski
              Reporter:
              viggo.navarsete Viggo Navarsete
            • Votes:
              4 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development