0 Replies Latest reply on Jul 28, 2008 6:04 PM by coolex

    Problem to call an annotated method from another component


      Hallo all!

      I have a class that manages my running processes

      public class ProcessManagerBean implements ProcessManager{
          public String endTask(){
           return "taskEnded";

      And I have another class (TestClass) that wants to use this processManager.endTask() method
      public class TestClass {
           ProcessManager processManager;
           public void endCurrentTask(){

      First problem is that without

      my TestClass is not injected with the processManager even it is used before. I get NullPointerException.

      The main problem is that I cannot call the method processManager.endTask() in my TestClass like you can see here

      public void endCurrentTask(){

      Then I get this error:
      task/process id may not be null"

      I thought I need the processId and the taskID to solve the problem, so I added this variables to my processManager:
          private String processId;
          private String taskId;

      Hope you can help me!
      Thanks in advance.