JPPF Issue Tracker
star_faded.png
Please log in to bookmark issues
bug_report_small.png
CLOSED  Bug report JPPF-237  -  Client raises IllegalStateException when using multiple JPPFClient with the same uuid
Posted Mar 23, 2014 - updated Mar 24, 2014
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
  • Estimated time
    Not estimated
  • Category
    Core
  • Resolution
    RESOLVED
  • Priority
    Normal
  • Reproducability
    Always
  • Severity
    Normal
  • Targetted for
    icon_milestones.png JPPF 4.0.2
Issue description
When using 2 JPPFClient instances with the same uuid, submitting jobs concurrently, I get the following exception in the client log:
java.lang.IllegalStateException:
  at org.jppf.client.AbstractGenericClient.getRegisteredClassLoader(AbstractGenericClient.java:422)
  at org.jppf.client.AbstractClassServerDelegate.getClassLoader(AbstractClassServerDelegate.java:207)
  at org.jppf.client.AbstractClassServerDelegate.processNextRequest(AbstractClassServerDelegate.java:165)
  at org.jppf.client.ClassServerDelegateImpl.run(ClassServerDelegateImpl.java:118)
  at java.lang.Thread.run(Thread.java:744)
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

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