JPPF Issue Tracker
Please log in to bookmark issues
CLOSED  Bug report JPPF-237  -  Client raises IllegalStateException when using multiple JPPFClient with the same uuid
Posted Mar 23, 2014 - updated Oct 16, 2022
icon_info.png This issue has been closed with status "Closed" and resolution "RESOLVED".
Issue details
  • Type of issue
    Bug report
  • Status
  • Assigned to
  • Progress
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
  • Posted by
  • Owned by
    Not owned by anyone
  • Category
  • Resolution
  • Priority
  • Reproducability
  • Severity
  • Targetted for
    icon_milestones.png JPPF 4.0.x
Issue description
When using 2 JPPFClient instances with the same uuid, submitting jobs concurrently, I get the following exception in the client log:
  at org.jppf.client.AbstractGenericClient.getRegisteredClassLoader(
  at org.jppf.client.AbstractClassServerDelegate.getClassLoader(
  at org.jppf.client.AbstractClassServerDelegate.processNextRequest(
What happens is that when a client submits a job, it registers the class loader used to create the tasks in this job. The problem is that the registration uses the job uuid as the key. When a class loading request (for instance executing a JPPFCallable in the client) is sent by the server to the client, the server will choose, to send the request, any client connection such that the client uuid matches the uuid found in the request's uuid path. So the following situation arises:
  • client1 and client2 initialize with the same uuid, let's call it 'clientUuid'
  • client1 submits a job with say uuid=jobUuid1
  • client1 registers the job classloader with the key 'jobUuid1'
  • the task in the job executes in the node and requests a JPPFCallable computation
  • the node sends a class loading request to the server with a requestUuid=jobUuid1 and uuidPath={'clientUuid', 'serverUuid'}
  • the server gets the request, looks up a connection such that the client uuid is 'clientUuid', and picks the connection for client2
  • the server forwards the class loading request to client2
  • client2 tries to retrieve the class loader for requestUuid='jobUuid1', but doesn't find it, since it was registered by client1
  • ==> IllegalStateException
Steps to reproduce this issue
  • start a driver and a node
  • run the attached sample code (JPPFCallable + task + runner + config files)
  • ==> check the client log, you will see the IllegalStateException

Comment posted by
Mar 23, 11:26
A file was uploaded. Reproducing sample codeicon_open_new.png
Comment posted by
Mar 24, 22:34
Fixed in branch b4.0 revision 3095