Announcement Announcement Module
Collapse
No announcement yet.
Why is that WebFlow doesn't recognise annotated beans on server? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • 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..

    Code:
    <on-start>
    <evaluate expression="myUtil.utilMethod(flowRequestContext)" result="flowScope.myParam"/> 
    </on-start>
    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 [AnnotatedAction@32773277 targetAction = [EvaluateAction@51675167 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.

    http://forum.springsource.org/showth...not-on-servers

    http://second-kind-demon.blogspot.co...eployment.html - 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 https://jira.springsource.org/browse/spr-3815 .. jars not being copied.. My app is working now.

    Comment

    Working...
    X