Announcement Announcement Module
Collapse
No announcement yet.
Method not Found (EL) Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Method not Found (EL)

    Hi!

    I don't know exactly where my problem is, but I hope, somebody will get my problem.
    I have a flow with an expression:
    Code:
    <persistence-context />
    <var name="task" class="fhkoeln.edb.nftool.model.Task" />
    <on-start>
    	<evaluate expression="taskService.getTask()" result="task" />
    </on-start>
    And I have a Service:

    Code:
    package fhkoeln.edb.nftool.services;
    @Service
    public class TaskService {
    
    	Task getTask() {
    		return Task.findTask(1L);
    	}
    
    }
    I created the project with roo 1.0.2, so the findTask()-Method is a finder. But thats not the point.
    When I browser to the Flow, I get the following:
    Code:
    org.springframework.webflow.execution.ActionExecutionException: Exception thrown executing [AnnotatedAction@4daaa02a targetAction = [EvaluateAction@7cf94d3b expression = taskService.getTask(), resultExposer = [ActionResultExposer@533d9c96 result = task, resultType = [null]]], attributes = map[[empty]]] in state 'null' of flow 'doexercise' -- action execution attributes were 'map[[empty]]'
       at ...
    Caused by: org.springframework.binding.expression.EvaluationException: An ELException occurred getting the value for expression 'taskService.getTask()' on context [class org.springframework.webflow.engine.impl.RequestControlContextImpl]
       at ...
    Caused by: javax.el.MethodNotFoundException: Method not found: [email protected]()
    Why can't the method be found? The class seems to be instancieted, but it can't find the Method?!

    In my webmvc-config.xml are the following entries:
    Code:
    <context:component-scan base-package="fhkoeln.edb.nftool"/>
    <mvc:annotation-driven/>
Working...
X