JPPF Issue Tracker
star_faded.png
Please log in to bookmark issues
bug_report_small.png
CLOSED  Bug report JPPF-409  -  IllegalStateException in the client when submitting a broadcast job
Posted Sep 02, 2015 - updated Aug 15, 2018
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
    Client
  • Resolution
    RESOLVED
  • Priority
    Normal
  • Reproducability
    Rarely
  • Severity
    Normal
  • Targetted for
    icon_milestones.png JPPF 5.0.x
Issue description
From this forum thread, the following exception was reported, occurring when submitting a broadcast job over multiple channels:
11:15:05.334 [TaskQueueChecker] ERROR o.j.c.b.queue.TaskQueueChecker - An error occurred while preparing for bundle creation and dispatching.
java.lang.IllegalStateException: Job 8E152120-66AB-D3B8-883A-516407450D26 already enqueued
  at org.jppf.client.balancer.queue.JPPFPriorityQueue.processBroadcastJob(JPPFPriorityQueue.java:247) ~[jppf-client.jar:na]
  at org.jppf.client.balancer.queue.JPPFPriorityQueue.processPendingBroadcasts(JPPFPriorityQueue.java:356) ~[jppf-client.jar:na]
  at org.jppf.client.balancer.queue.TaskQueueChecker.dispatch(TaskQueueChecker.java:211) [jppf-client.jar:na]
  at org.jppf.client.balancer.queue.TaskQueueChecker.run(TaskQueueChecker.java:199) [jppf-client.jar:na]
  at java.lang.Thread.run(Thread.java:745) [na:1.8.0_51]
Steps to reproduce this issue
submit a broadcast job using the following code:
public class JPPFBroadcastTest {
  public static void main(String[] args) {
    try {
      TypedProperties props = JPPFConfiguration.getProperties();
      props.setBoolean("jppf.discovery.enabled", false);
      props.setString("jppf.drivers", "driver1");
      props.setString("driver1.jppf.server.host", "localhost");
      props.setBoolean("jppf.local.execution.enabled", true);
      props.setBoolean("jppf.remote.execution.enabled", true);
      props.setString("jppf.load.balancing.algorithm", "manual");
      props.setString("jppf.load.balancing.profile", "manual");
      props.setInt("jppf.load.balancing.profile.manual.size", 10);
      JPPFClient jppfClient = new JPPFClient();
      JPPFExecutorService  executor = new JPPFExecutorService(jppfClient);
      ExecutorServiceConfiguration config = executor.getConfiguration();
      JobConfiguration jobConfig = config.getJobConfiguration();
      jobConfig.getClientSLA().setMaxChannels(2);
      jobConfig.getSLA().setBroadcastJob(true);
      Future<?> future = executor.submit(new JPPFTestTask(1));
      future.get();
      executor.shutdownNow();
    } catch(Exception e) {
      e.printStackTrace();
    }
  }
}

#4
Comment posted by
 lolo4j
Sep 05, 12:35
Fixed in: