• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Spring webflow exception: No bean named 'flowExecutor' is defined

 
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'm new to Spring webflow and currently using webflow 1.05 production release version. I want to integrate spring servlet environment config to webflow.

For that I made the follwoing url mapping in myproject-servlet.xml

myproject-servlet.xml

Added the url mapping
<bean id="simpleUrlMapping">
<prop key="/welcome.htm">welcomeController</prop>
<prop key="/purchase/*">webFlowController</prop>
</props>

Mapped the url to the bean
<bean id = "webFlowController" class = "org.springframework.webflow.executor.mvc.FlowController">
<property name="flowExecutor" ref="flowExecutor" />
</bean>

In the myproject-webflow-config.xml

<flow:executor id="flowExecutor" registry-ref="flowRegistery"/>
<flow:registry id="flowRegistery">
<flow:location path="/WEB-INF/flows/**/*-flow.xml"/>
</flow:registry>

Inside the WEB-INF/flows folder I created the flows I just created an xml file name myproject-beans.xml with no bean mapping.

When I run the application I'm getting the following error message:

EVERE: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'simpleUrlMapping' defined in ServletContext resource [/WEB-INF/thelancet-servlet.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'webFlowController' defined in ServletContext resource [/WEB-INF/thelancet-servlet.xml]: Cannot resolve reference to bean 'flowExecutor' while setting bean property 'flowExecutor'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'flowExecutor' is defined.

Can anyone please help???
Thanks in advance.
 
Ranch Hand
Posts: 265
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Shyam,

The exception is saying it cannot find the definition for flowExecutor.

You probably need to add your webflow-config.xml to the param-values your contextConfigLocation in web.xml, or import it into your servlet.xml like so:



That way the servlet.xml can find the bean definition in webflow-config.xml and finish creating the beans.
 
Shyam kumar
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot Stevi, I'm now able to Run the application now...
Cheers
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic