JPPF Issue Tracker
star_faded.png
Please log in to bookmark issues
bug_report_small.png
CLOSED  Bug report JPPF-385  -  Class loader issues prevent the client from initializing
Posted Apr 19, 2015 - updated Apr 22, 2015
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
    Always
  • Severity
    Normal
  • Targetted for
    icon_milestones.png JPPF 5.0.2
Issue description
Problem initially reported in this forum thread.

When jppf-client.jar and jppf-common.jar are loaded by different classloaders, the JPPFClient fails to initialize properly, due tot he following exception raised while initializing the load balancer:
2015-04-19 09:48:15,059 [ERROR][JPPF Client-0001    ][org.jppf.client.JPPFClient.createJobManager(128)]: Can't initialize job Manager
org.jppf.JPPFException: Provider 'manual' could not be found
  at org.jppf.load.balancer.spi.JPPFBundlerFactory.createBundler(JPPFBundlerFactory.java:133)
  at org.jppf.load.balancer.spi.JPPFBundlerFactory.createBundlerFromJPPFConfiguration(JPPFBundlerFactory.java:162)
  at org.jppf.client.balancer.JobManagerClient.<init>(JobManagerClient.java:110)
  at org.jppf.client.JPPFClient.createJobManager(JPPFClient.java:126)
  at org.jppf.client.AbstractGenericClient.getJobManager(AbstractGenericClient.java:409)
  at org.jppf.client.AbstractGenericClient.statusChanged(AbstractGenericClient.java:385)
  at org.jppf.client.AbstractJPPFClientConnection.fireStatusChanged(AbstractJPPFClientConnection.java:129)
  at org.jppf.client.AbstractJPPFClientConnection.setStatus(AbstractJPPFClientConnection.java:108)
  at org.jppf.client.AbstractGenericClient.newConnection(AbstractGenericClient.java:289)
  at org.jppf.client.AbstractGenericClient.submitNewConnection(AbstractGenericClient.java:266)
  at org.jppf.client.AbstractGenericClient$3.run(AbstractGenericClient.java:251)
  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
  at java.util.concurrent.FutureTask.run(FutureTask.java:262)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  at java.lang.Thread.run(Thread.java:744)
Steps to reproduce this issue
Run the following code with jppf-common.jar but NOT jppf-client.jar in the initial classpath in the java command:
import java.io.File;
import java.net.*;
 
public class TestClientClassLoading {
  public static void main(final String[] args) {
    try {
      URL[] urls = { new File("jppf-client.jar").toURI().toURL() };
      URLClassLoader loader = new URLClassLoader(urls, TestClientClassLoading.class.getClassLoader());
      Class<?> c = Class.forName("org.jppf.client.JPPFClient", true, loader);
      c.newInstance();
      System.out.println("done");
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
}
==> this will produce the exception mentioned in this bug's description

#5
Comment posted by
 lolo4j
Apr 22, 20:16
Fixed in: