Announcement Announcement Module
Collapse
No announcement yet.
Spring WebFlow with Facelets on Google App Engine Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring WebFlow with Facelets on Google App Engine

    Hello,

    I've started an attempt to deploy a web application based upon Spring WebFlow with Facelets on the Google App Engine.
    After I upload my webapp and try to access it I get a Error 500.
    The log in my adminconsole shows this follow stacktrace:

    Failed startup of context com.google.apphosting.utils.jetty.RuntimeAppEngine WebAppContext@95f290
    org.springframework.beans.factory.BeanCreationExce ption:
    Error creating bean with name
    'org.springframework.web.servlet.handler.SimpleUrl HandlerMapping#0'
    defined in ServletContext resource [/WEB-INF/config/webmvc-config.xml]: Initialization of bean failed; nested exception is
    org.springframework.beans.factory.BeanCreationExce ption:
    Error creating bean with name 'flowController'
    defined in ServletContext resource [/WEB-INF/config/webmvc-config.xml]:
    Cannot resolve reference to bean 'flowExecutor'
    while setting bean property 'flowExecutor';
    nested exception is org.springframework.beans.factory.BeanCreationExce ption:
    Error creating bean with name 'flowExecutor':
    Cannot resolve reference to bean 'flowRegistry'
    while setting bean property 'flowDefinitionLocator';
    nested exception is org.springframework.beans.factory.BeanCreationExce ption:
    Error creating bean with name 'flowRegistry':
    Cannot resolve reference to bean 'facesFlowBuilderServices'
    while setting bean property 'flowBuilderServices';
    nested exception is org.springframework.beans.factory.BeanCreationExce ption
    Error creating bean with name 'facesFlowBuilderServices':
    Initialization of bean failed; nested exception is java.lang.SecurityException:
    Unable to get members for class org.springframework.webflow.expression.el.WebFlowE LExpressionParser

    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean()
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory$1.run()
    at java.security.AccessController.doPrivileged(Native Method)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean()


    Nested exception is java.lang.SecurityException:
    Unable to get members for class org.springframework.webflow.expression.el.WebFlowE LExpressionParser:
    java.lang.SecurityException: Unable to get members for class
    org.springframework.webflow.expression.el.WebFlowE LExpressionParser
    at com.google.appengine.runtime.Request.process-334e24aaa8bb68a6(Request.java)
    at java.lang.Class.getDeclaredConstructors(Class.java :202)
    at o.s.b.factory.annotation.AutowiredAnnotationBeanPo stProcessor.determineCandidateConstructors(191)
    at o.s.b.factory.support.AbstractAutowireCapableBeanF actory.determineConstructorsFromBeanPostProcessors (859)
    at o.s.b.factory.support.AbstractAutowireCapableBeanF actory.createBeanInstance(831)



    I found references to similar problem in other frameworks :
    This makes me assume the problem isn't in Spring Faces, but in the sandbox of the Google App Engine.
    Since I'm trying get to a solution, I'll try to work on both sides: The GAE and Spring WebFlow.


    Of course I'm using the conveniant faces:facesFlowBuilderServices-tag in the webflow-config.xml for configuration, since the problem seems to be in the creation of the facesFlowBuilderServices (or rather the required WebFlowELExpressionParser), I would like to work around that by making the configuration more explicit.

    Does anybody have any suggestion how to write the configuration for the flowExecutor, without relying on the conveniant faces:facesFlowBuilderServices-tag?

    (Other solutions or suggestions are welcome as well of course ;-))

    With kind regards,
    Marco Beelen
    Senior Software Engineer @ IPROFS.

  • #2
    Found a solution for running Spring Webflow with Facelets on GAE

    In order to get webflow with facelets running on the Google App Engine, there are some additional configuration steps.

    Check Configuring JSF 1.2 to run on the Google App Engine for the configuration of JSF and JBoss Seam on Google App Engine - First Steps for the section on JBoss EL, which needs a patch to work.

    My webflow-config.xml contains the following snippet:


    <!-- Configures the Spring Web Flow JSF integration -->
    <faces:flow-builder-services
    id="facesFlowBuilderServices"
    expression-parser="expressionParser"/>

    <bean
    id="expressionParser"
    class="org.springframework.webflow.expression.el.W ebFlowELExpressionParser">

    <constructor-arg>
    <ref bean="expressionFactory" />
    </constructor-arg>
    </bean>

    <bean id="expressionFactory" class="org.jboss.el.ExpressionFactoryImpl" />


    Not all my problems are solved yet, see thread: Accessing a flow for a second time

    Cheers,
    Marco Beelen

    Comment

    Working...
    X