13 Replies Latest reply on Jun 20, 2005 3:33 AM by asv

    Does JBoss Portal work with Sun JSF RI?

    asv

      I've got a ClassCastException.

      Does JBoss Portal work with Sun JSF RI?

      page:
      ====
      <f:view >
      <h:outputLabel value="test label"/>
      </f:view>

      portlet.xml
      ========

      My portlet
      <portlet-name>MyPortlet</portlet-name>
      <display-name>MyPortlet</display-name>
      <portlet-class>com.sun.faces.portlet.FacesPortlet</portlet-class>

      <init-param>
      Portlet init page
      com.sun.faces.portlet.INIT_VIEW
      /index.jsp
      </init-param>


      <mime-type>text/html</mime-type>
      <portlet-mode>VIEW</portlet-mode>


      <portlet-info>
      MyPortlet
      <short-title>MyPortlet</short-title>
      </portlet-info>


        • 1. Re: Does JBoss Portal work with Sun JSF RI?
          asv

          I'm using JBoss Portla 2.0 RC2 JBoss 4.0.2

          • 2. Re: Does JBoss Portal work with Sun JSF RI?
            asv

            Exception:
            =======
            java.lang.ClassCastException
            at com.sun.faces.application.ApplicationAssociate.getInstance(ApplicationAssociate.java:118)
            at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:104)
            at com.sun.faces.portlet.ViewHandlerImpl.renderView(ViewHandlerImpl.java:122)
            at com.sun.faces.portlet.LifecycleImpl$RenderResponsePhase.execute(LifecycleImpl.java:540)
            at com.sun.faces.portlet.LifecycleImpl.phase(LifecycleImpl.java:246)
            at com.sun.faces.portlet.LifecycleImpl.render(LifecycleImpl.java:188)
            at com.sun.faces.portlet.FacesPortlet.render(FacesPortlet.java:304)
            at org.jboss.portal.portlet.invocation.DispatcherInterceptor.invokeRequest(DispatcherInterceptor.java:163)
            at org.jboss.portal.portlet.invocation.DispatcherInterceptor.invoke(DispatcherInterceptor.java:195)
            at org.jboss.portal.server.impl.invocation.InvocationImpl.invokeNext(InvocationImpl.java:213)
            at org.jboss.portal.portlet.invocation.PreferencesInterceptor.invoke(PreferencesInterceptor.java:93)
            at org.jboss.portal.server.impl.invocation.InvocationImpl.invokeNext(InvocationImpl.java:213)
            at org.jboss.portal.server.invocation.component.ContextDispatcherInterceptor$InvokeNextCommand.execute(ContextDispatcherInterceptor.java:94)
            at sun.reflect.GeneratedMethodAccessor189.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.jboss.portal.server.servlet.CommandServlet.doGet(CommandServlet.java:49)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

            • 3. Re: Does JBoss Portal work with Sun JSF RI?
              echoi1975

              one problem i had was when i had more than one jsf portlet on one page. how many jsfs do you have on your portal page? just one? i'll look at my config and compare to yours..

              • 4. Re: Does JBoss Portal work with Sun JSF RI?
                echoi1975

                i dunno if the formatting of the msg from your orginal config post was chopped up but looks like some important tags could be missing:

                <init-param>
                Portlet init page
                com.sun.faces.portlet.INIT_VIEW
                /jsf/search.jsp
                </init-param>

                <mime-type>text/html</mime-type>
                <portlet-mode>VIEW</portlet-mode>
                <portlet-mode>EDIT</portlet-mode>
                <portlet-mode>HELP</portlet-mode>

                • 5. Re: Does JBoss Portal work with Sun JSF RI?
                  echoi1975

                  woh weird dude
                  i see the same problem the hell is that anyways..
                  i'm assuming the tags that are being left out but you have them in place..

                  • 6. Re: Does JBoss Portal work with Sun JSF RI?
                    echoi1975

                    did you check if all the necessary jsf/portlet jars are pkg'd with either your war file or included in your app server's libraries?

                    • 7. Re: Does JBoss Portal work with Sun JSF RI?
                      echoi1975

                      if you want list of all jars that i include in my war, let me know..

                      • 8. Re: Does JBoss Portal work with Sun JSF RI?
                        theute

                        when you want to enter code on this forum, put it between [ code ] your code [ / code ] (with no spaces in BB tags)

                        You can do a preview as well to see if it will be displayed correctly

                        • 9. Re: Does JBoss Portal work with Sun JSF RI?
                          asv

                          echoi1975:

                          I have only one portlet on a page.

                          Does your JSF Portlet (SUN JSF RI) work?

                          Which proxy do you have ?
                          com.sun.faces.portlet.FacesPortlet or another?

                          I have seen samples with MyFaces Portlet but not Sun JSF RI.

                          • 10. Re: Does JBoss Portal work with Sun JSF RI?
                            theute

                            I remember having someone reported that it worked with SUN JSF RI, it was a while back.

                            Why can't you use MyFaces ? It would work for sure and there is nothing to change, it can worth the try. (i think you just have to change the libraries and add the myFaces listener in web.xml)

                            • 11. Re: Does JBoss Portal work with Sun JSF RI?
                              asv

                              I have tried to move but it din't work. I hadn't enough time to migrate. But today I don't need MyFaces. If SUN RI works I will try to make it work

                              • 12. Re: Does JBoss Portal work with Sun JSF RI?
                                echoi1975

                                i've been using RI...btw

                                • 13. Re: Does JBoss Portal work with Sun JSF RI?
                                  asv

                                  I have just replaced jsf-impl.jar from portlet-guessNumber samples and my application started working.

                                  I had JSF 1.1 too but the size of jars was different.

                                  I think It will be usefull to have some FAQ or Developer guide about migration Struts/JSF application to JBoss Portal.