JPPF Issue Tracker
star_faded.png
Please log in to bookmark issues
bug_report_small.png
CLOSED  Bug report JPPF-513  -  Using @JPPFRunnable annotation leads to ClassNotFoundException
Posted Aug 09, 2017 - updated Aug 09, 2017
icon_info.png This issue has been closed with status "Closed" and resolution "RESOLVED".
Issue details
  • Type of issue
    Bug report
  • Status
     
    Closed
  • Assigned to
     lolo4j
  • Progress
       
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
  • Posted by
     lolo4j
  • Owned by
    Not owned by anyone
  • Category
    Core
  • Resolution
    RESOLVED
  • Priority
    Normal
  • Reproducability
    Not determined
  • Severity
    Normal
  • Targetted for
    icon_milestones.png JPPF 5.2.8
Issue description
When using a POJO task where one of the methods or constructor is annotated with @JPPFRunnable, the node executing the task throws a ClassNotFoundException saying it can't find the class of the POJO task
Steps to reproduce this issue
Define an annotated task like this:
public class MyAnnotatedTask {
  @JPPFRunnable
  public static String mySatticMethod(String param) {
    return "task ended";
  }
}
Add it to a job, then submit the job, like this:
try (JPPFCLient client = new JPPFClient()) {
  JPPFJob job = new JPPFJob();
  job.add(MyAnnotatedTask.class, "myStaticMethod");
  List<Task<?>> results = client.submitJob(job);
  Task<?> task = results.get(0);
  if (task.getThrowable() != null) throw task.getThrowable();
  else System.out.println("result: " + task.getResult());
}
==> a "ClassNotFoundException: MyAnnotatedTask" is raised

#3
Comment posted by
 lolo4j
Aug 09, 07:56
Fixed in: