Results 1 to 8 of 8

Thread: Problem with booking-portlet-faces sample (from SWF 2.0.3 Released)

  1. #1

    Question Problem with booking-portlet-faces sample (from SWF 2.0.3 Released)

    Hi !

    I try to run the booking-portlet-faces sample from SWF 2.0.3 Released.

    I use Tomcat 6.18 and Apache Pluto Portal 1.1.15.

    I generate a war with Maven and deploy it into Tomcat without errors !

    With Pluto Admin, I add the portlet to the main page.
    When the portlet is rendered , I have this error :

    Code:
    javax.portlet.PortletException: Request processing failed
    	at org.springframework.web.portlet.FrameworkPortlet.processRequest(FrameworkPortlet.java:496)
    	at org.springframework.web.portlet.FrameworkPortlet.doDispatch(FrameworkPortlet.java:453)
    	at javax.portlet.GenericPortlet.render(GenericPortlet.java:175)
    	at org.apache.pluto.core.PortletServlet.dispatch(PortletServlet.java:208)
    
    ...
    
    Caused by: org.springframework.webflow.execution.FlowExecutionException: Exception thrown in state 'intro' of flow 'view'
    	at org.springframework.webflow.engine.impl.FlowExecutionImpl.wrap(FlowExecutionImpl.java:568)
    
    ...
    
    Caused by: java.lang.ClassCastException: org.apache.pluto.internal.impl.PortletContextImpl
    	at com.sun.faces.context.FacesContextFactoryImpl.getFacesContext(FacesContextFactoryImpl.java:98)
    	at org.springframework.faces.webflow.FlowFacesContext.newInstance(FlowFacesContext.java:89)
    	at org.springframework.faces.webflow.JsfViewFactory.getView(JsfViewFactory.java:73)
    	at org.springframework.webflow.engine.ViewState.doEnter(ViewState.java:189)
    ...
    Any idea on the ClassCastException: org.apache.pluto.internal.impl.PortletContextImpl ?

    Thanks !!

  2. #2

    Default

    And I have the same problem with Liferay 5.1.0 Bundled with Tomcat 6.0 :

    Code:
    Caused by: java.lang.ClassCastException: com.liferay.portlet.PortletContextImpl 
    at com.sun.faces.context.FacesContextFactoryImpl.getFacesContext(FacesContextFactoryImpl.java:98) 
    at org.springframework.faces.webflow.FlowFacesContext.newInstance(FlowFacesContext.java:89)
    at org.springframework.faces.webflow.JsfViewFactory.getView(JsfViewFactory.java:73)
    at org.springframework.webflow.engine.ViewState.doEnter(ViewState.java:189)
    at org.springframework.webflow.engine.State.enter(State.java:194)

  3. #3
    Join Date
    Feb 2008
    Location
    Nashua, NH
    Posts
    78

    Default

    I have run into the same issue with the Apache MyFace JSR-301 Portlet Bridge. It is still very much in the alpha stages.

    The sample apps work with the JSR-301 implementation from https://jsfportletbridge.dev.java.net/.

    Please let me know if you continue to have issues.

    -Scott
    Scott Andrews

    Software Engineer, Web Products Team
    SpringSource

  4. #4

    Default

    Thanks for your help !

    I took a look at JSF Portlet Bridge, but I don't understand how to apply it, sorry

    First, I add th librairy jsf-portlet :
    Code:
    <dependency>
      <groupId>com.sun.faces.portlet</groupId>
      <artifactId>jsf-portlet</artifactId>
      <version>1.2.3</version>
      <scope>compile</scope>
    </dependency>
    Then I guess I have to modify portlet.xml ?
    I change
    Code:
    <portlet-class>
      org.springframework.web.portlet.DispatcherPortlet
    </portlet-class>
    to

    Code:
    <portlet-class>com.sun.faces.portlet.FacesPortlet</portlet-class>
    And normally I have to add :
    Code:
    <init-param>
      <description>Portlet init view page</description>
      <name>com.sun.faces.portlet.INIT_VIEW</name>
      <value>?</value>
    </init-param>
    But I don't know what value I have to use

    Maybe I'm complety wrong ?
    Last edited by minimarmotte; Aug 8th, 2008 at 06:36 PM.

  5. #5
    Join Date
    Feb 2008
    Location
    Nashua, NH
    Posts
    78

    Default

    All you need to do is drop the jar onto your classpath. The config should be automatic.
    Scott Andrews

    Software Engineer, Web Products Team
    SpringSource

  6. #6

    Default

    I did what you told me : just add the jar !
    And it works very well !!!

    Thanks a lot Scott

  7. #7
    Join Date
    Nov 2008
    Posts
    1

    Default Another Classcast Exception

    Hi!

    I had exactly the same problem as described above. After adding the dependency to jsf-portlet-1.2.3.jar however, I get a different ClassCastException:

    Code:
    ...
    Caused by: org.springframework.webflow.execution.FlowExecutionException: Exception thrown in state 'intro' of flow 'view'
    	at org.springframework.webflow.engine.impl.FlowExecutionImpl.wrap(FlowExecutionImpl.java:567)
    	at org.springframework.webflow.engine.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:225)
    	at org.springframework.webflow.executor.FlowExecutorImpl.launchExecution(FlowExecutorImpl.java:140)
    	at org.springframework.webflow.mvc.portlet.FlowHandlerAdapter.startFlow(FlowHandlerAdapter.java:235)
    	at org.springframework.webflow.mvc.portlet.FlowHandlerAdapter.startFlow(FlowHandlerAdapter.java:228)
    	at org.springframework.webflow.mvc.portlet.FlowHandlerAdapter.handleRender(FlowHandlerAdapter.java:131)
    	at org.springframework.web.portlet.DispatcherPortlet.doRenderService(DispatcherPortlet.java:811)
    	at org.springframework.web.portlet.FrameworkPortlet.processRequest(FrameworkPortlet.java:483)
    	... 135 more
    Caused by: java.lang.ClassCastException: com.liferay.portlet.RenderResponseImpl
    	at com.sun.facelets.FaceletViewHandler.createResponseWriter(FaceletViewHandler.java:370)
    	at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:571)
    	at org.springframework.faces.webflow.JsfView.render(JsfView.java:92)
    	at org.springframework.webflow.engine.ViewState.render(ViewState.java:257)
    	at org.springframework.webflow.engine.ViewState.doEnter(ViewState.java:190)
    	at org.springframework.webflow.engine.State.enter(State.java:194)
    	at org.springframework.webflow.engine.Flow.start(Flow.java:535)
    	at org.springframework.webflow.engine.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:350)
    	at org.springframework.webflow.engine.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:221)
    	... 141 more
    19:51:27,212 ERROR [jsp:52] java.lang.ClassCastException: com.liferay.portlet.RenderResponseImpl
    	at com.sun.facelets.FaceletViewHandler.createResponseWriter(FaceletViewHandler.java:370)
    	at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:571)
    	at javax.portlet.GenericPortlet.render(GenericPortlet.java:233)
    	at com.sun.portal.portletcontainer.appengine.filter.FilterChainImpl.doFilter(FilterChainImpl.java:121)
    	at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:69)
    	at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:96)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
    	at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:535)
    	at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:472)
    	at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:575)
    	at com.liferay.portlet.InvokerPortletImpl.invokeRender(InvokerPortletImpl.java:646)
    	at com.liferay.portlet.InvokerPortletImpl.render(InvokerPortletImpl.java:414)
    	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
    	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
    	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
    I'm using spring-web-flow 2.0.4.RELEASE, Liferay 5.1.2, Maven2, OSX 10.5.
    I have left the portlet.xml and web.xml unchanged.
    Any ideas what might cause this error?

  8. #8
    Join Date
    Sep 2008
    Posts
    5

    Default

    I got the same ClassCastException with Liferay Portal. Does anybody have a solution for this problem?



    Quote Originally Posted by psalhofer View Post
    Hi!

    I had exactly the same problem as described above. After adding the dependency to jsf-portlet-1.2.3.jar however, I get a different ClassCastException:

    Code:
    ...
    Caused by: org.springframework.webflow.execution.FlowExecutionException: Exception thrown in state 'intro' of flow 'view'
    	at org.springframework.webflow.engine.impl.FlowExecutionImpl.wrap(FlowExecutionImpl.java:567)
    	at org.springframework.webflow.engine.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:225)
    	at org.springframework.webflow.executor.FlowExecutorImpl.launchExecution(FlowExecutorImpl.java:140)
    	at org.springframework.webflow.mvc.portlet.FlowHandlerAdapter.startFlow(FlowHandlerAdapter.java:235)
    	at org.springframework.webflow.mvc.portlet.FlowHandlerAdapter.startFlow(FlowHandlerAdapter.java:228)
    	at org.springframework.webflow.mvc.portlet.FlowHandlerAdapter.handleRender(FlowHandlerAdapter.java:131)
    	at org.springframework.web.portlet.DispatcherPortlet.doRenderService(DispatcherPortlet.java:811)
    	at org.springframework.web.portlet.FrameworkPortlet.processRequest(FrameworkPortlet.java:483)
    	... 135 more
    Caused by: java.lang.ClassCastException: com.liferay.portlet.RenderResponseImpl
    	at com.sun.facelets.FaceletViewHandler.createResponseWriter(FaceletViewHandler.java:370)
    	at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:571)
    	at org.springframework.faces.webflow.JsfView.render(JsfView.java:92)
    	at org.springframework.webflow.engine.ViewState.render(ViewState.java:257)
    	at org.springframework.webflow.engine.ViewState.doEnter(ViewState.java:190)
    	at org.springframework.webflow.engine.State.enter(State.java:194)
    	at org.springframework.webflow.engine.Flow.start(Flow.java:535)
    	at org.springframework.webflow.engine.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:350)
    	at org.springframework.webflow.engine.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:221)
    	... 141 more
    19:51:27,212 ERROR [jsp:52] java.lang.ClassCastException: com.liferay.portlet.RenderResponseImpl
    	at com.sun.facelets.FaceletViewHandler.createResponseWriter(FaceletViewHandler.java:370)
    	at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:571)
    	at javax.portlet.GenericPortlet.render(GenericPortlet.java:233)
    	at com.sun.portal.portletcontainer.appengine.filter.FilterChainImpl.doFilter(FilterChainImpl.java:121)
    	at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:69)
    	at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:96)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
    	at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:535)
    	at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:472)
    	at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:575)
    	at com.liferay.portlet.InvokerPortletImpl.invokeRender(InvokerPortletImpl.java:646)
    	at com.liferay.portlet.InvokerPortletImpl.render(InvokerPortletImpl.java:414)
    	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
    	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
    	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
    I'm using spring-web-flow 2.0.4.RELEASE, Liferay 5.1.2, Maven2, OSX 10.5.
    I have left the portlet.xml and web.xml unchanged.
    Any ideas what might cause this error?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •