Announcement Announcement Module
No announcement yet.
Why is that WebFlow doesn't recognise annotated beans on server? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Why is that WebFlow doesn't recognise annotated beans on server?

    I am experiencing a weird issue. I have a couple of util classes that are annotated as @Component and I am calling its methods ni evaulate element like..

    <evaluate expression="myUtil.utilMethod(flowRequestContext)" result="flowScope.myParam"/> 
    This code works as expected on my local IDE server. But as soon as I upload the app to the server, webflow fails saying that it can't find field or proprety myUtil.
    HTML Code:
    Error 500: org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.webflow.execution.ActionExecutionException: Exception thrown executing [[email protected] targetAction = [[email protected] expression = myUtil.utilMethod(flowRequestContext), resultExpression = flowScope.myParam], attributes = map[[empty]]] in state 'null' of flow 'my-flow' -- action execution attributes were 'map[[empty]]'
    Once I explicitly declared the bean in webflow-config.xml file and removed @Component annotation, the bean was found on the server side and is working as expected.

    I did a bit of search and looks like some other users have already experienced this issue. - read last comment.

    Is there any explanation for why the annotations are working in local but not on the server? If I want to continue using annotations, what configuration changes I should make? Thanks in Advance!

  • #2
    So this was the issue .. jars not being copied.. My app is working now.