JPPF, java, parallel computing, distributed computing, grid computing, parallel, distributed, cluster, grid, cloud, open source, android, .net
JPPF

The open source
grid computing
solution

 Home   About   Features   Download   Documentation   On Github   Forums 
January 19, 2021, 10:51:27 PM *
Welcome,
Please login or register.

Login with username, password and session length
Advanced search  
News: New users, please read this message. Thank you!
  Home Help Search Login Register  
Pages: [1]   Go Down

Author Topic: Getting Error: "Provider 'manual' could not be found"  (Read 1694 times)

mmingfeilam

  • Guest
Getting Error: "Provider 'manual' could not be found"
« on: April 16, 2015, 06:12:00 AM »

hi, i am running JPPF sample app as a stand alone with the server being hosted remotely, everything works.  but if i run the code as part of my project that's run in OSGI framework, i new get this error:

2015-04-15 20:52:48,216[Thread-141]|ERROR|org.jppf.client.JPPFClient|375-wrap_mvn_org.jppf_jppf-client_5.0.1-0.0.0|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)[374:wrap_mvn_org.jppf_jppf-common_5.0.1:0]
   at org.jppf.load.balancer.spi.JPPFBundlerFactory.createBundlerFromJPPFConfiguration(JPPFBundlerFactory.java:162)[374:wrap_mvn_org.jppf_jppf-common_5.0.1:0]
   at org.jppf.client.balancer.JobManagerClient.<init>(JobManagerClient.java:110)[375:wrap_mvn_org.jppf_jppf-client_5.0.1:0]
   at org.jppf.client.JPPFClient.createJobManager(JPPFClient.java:126)[375:wrap_mvn_org.jppf_jppf-client_5.0.1:0]
   at org.jppf.client.AbstractGenericClient.getJobManager(AbstractGenericClient.java:409)[375:wrap_mvn_org.jppf_jppf-client_5.0.1:0]
   at org.jppf.client.JPPFClient.submitJob(JPPFClient.java:113)[375:wrap_mvn_org.jppf_jppf-client_5.0.1:0]
   at com.ge.pw.betz.engine.TemplateApplicationRunner.executeBlockingJob(TemplateApplicationRunner.java:110)[379:betz-engine:1.0.0]
   at com.ge.pw.betz.mla.runtime.MLARunner.runSlamNew(MLARunner.java:103)[386:com.ge.pw.betz.mla-service:1.0.0]
   at com.ge.pw.betz.mla.farm.impl.FarmAnalyzer.runFarm(FarmAnalyzer.java:116)[386:com.ge.pw.betz.mla-service:1.0.0]
   at com.ge.pw.betz.mla.farm.impl.FarmAnalyzer.run(FarmAnalyzer.java:316)[386:com.ge.pw.betz.mla-service:1.0.0]
   at java.lang.Thread.run(Thread.java:722)[:1.7.0_17]

i set the properties like this:


      TypedProperties props = JPPFConfiguration.getProperties();

      // set the connection properties programatically
      props.setProperty("jppf.discovery.enabled", "false");
      props.setProperty("jppf.drivers", "driver1");
      props.setProperty("driver1.jppf.server.host", "3.39.64.100");
      props.setProperty("driver1.jppf.server.port", "11111");
      
      try (JPPFClient jppfClient = new JPPFClient()) {
...
}

can someone tell me why it works as a stand-alone app but not within osgi?  thanks.
Logged

lolo

  • Administrator
  • JPPF Council Member
  • *****
  • Posts: 2262
    • JPPF Web site
Re: Getting Error: "Provider 'manual' could not be found"
« Reply #1 on: April 16, 2015, 09:03:42 AM »

Hello,

It seems that the load balancers are not properly initialized  by the JPPF client. I'm suspecting a class loader issue is causing this, but it's difficult to tell what is happening without more information.
Would it be possible for you to set the logging level to DEBUG for the class "org.jppf.load.balancer.spi.JPPFBundlerFactory", so that we can have traces in the log for the load-balancer initialization?
This should print messages likes this in the log:
- 1 instance of "oldCL=<some_classloader>, currentCL=<other_classloader>"
- several instances of "registering new load-balancing algorithm provider '<algorithm_name>'
- 1 instance of "found <number> load-balancing algorithms in the classpath"

Could you please do this and post the resulting log?

Thanks for your time,
-Laurent
Logged

mmingfeilam

  • Guest
Re: Getting Error: "Provider 'manual' could not be found"
« Reply #2 on: April 16, 2015, 04:52:31 PM »

where do you set this log level?  thanks.
Logged

lolo

  • Administrator
  • JPPF Council Member
  • *****
  • Posts: 2262
    • JPPF Web site
Re: Getting Error: "Provider 'manual' could not be found"
« Reply #3 on: April 17, 2015, 07:53:24 AM »

Hi,

You should have a "config/log4.properties" or just "log4.properties" somewhere in your appliation. In this file simply add the following line:
Code: [Select]
log4j.logger.org.jppf.load.balancer.spi.JPPFBundlerFactory=DEBUGThis will set the debug looging level for the class.

Sincerely,
-Laurent
Logged

mmingfeilam

  • Guest
Re: Getting Error: "Provider 'manual' could not be found"
« Reply #4 on: April 17, 2015, 09:20:42 PM »

2015-04-17 12:18:11,404[Thread-131]|DEBUG|org.jppf.load.balancer.spi.JPPFBundlerFactory|using default properties: CLIENT{jppf.load.balancing.profile.jppf.size=1000000, jppf.load.balancing.algorithm=manual, jppf.script.default.language=javascript, jppf.load.balancing.profile=jppf}
2015-04-17 12:18:11,411[Thread-131]|DEBUG|org.jppf.load.balancer.spi.JPPFBundlerFactory|load balancing configuration using algorithm 'manual' with parameters: {size=1000000}
2015-04-17 12:18:11,420[Thread-131]|DEBUG|org.jppf.load.balancer.spi.JPPFBundlerFactory|oldCL=BundleDelegatingClassLoader for [DSP-K Security Token Service (dsp.sts)], currentCL=org.apache.felix.framework.BundleWiringImpl@6428d435
2015-04-17 12:18:11,432[Thread-131]|DEBUG|org.jppf.load.balancer.spi.JPPFBundlerFactory|found 0 load-balancing algorithms in the classpath
2015-04-17 12:18:11,437[JPPF Client-0001]|DEBUG|org.jppf.load.balancer.spi.JPPFBundlerFactory|using default properties: CLIENT{jppf.load.balancing.profile.jppf.size=1000000, jppf.load.balancing.algorithm=manual, jppf.script.default.language=javascript, jppf.load.balancing.profile=jppf}
2015-04-17 12:18:11,445[JPPF Client-0001]|DEBUG|org.jppf.load.balancer.spi.JPPFBundlerFactory|load balancing configuration using algorithm 'manual' with parameters: {size=1000000}
2015-04-17 12:18:11,445[JPPF Client-0001]|DEBUG|org.jppf.load.balancer.spi.JPPFBundlerFactory|oldCL=BundleDelegatingClassLoader for [DSP-K Security Token Service (dsp.sts)], currentCL=org.apache.felix.framework.BundleWiringImpl@6428d435
2015-04-17 12:18:11,446[JPPF Client-0001]|DEBUG|org.jppf.load.balancer.spi.JPPFBundlerFactory|found 0 load-balancing algorithms in the classpath
Logged

lolo

  • Administrator
  • JPPF Council Member
  • *****
  • Posts: 2262
    • JPPF Web site
Re: Getting Error: "Provider 'manual' could not be found"
« Reply #5 on: April 19, 2015, 10:55:56 AM »

Hello,

Thanks for the log information. My analysis of the problem is that it seems that "jppf-client.jar" and "jppf-common.jar" are loaded by different class loaders, and that is causing the load-balancer factory to raise the exception you are facing. In effect, the load-balancer definitions are discovered via SPI in the file "META-INF/services/org.jppf.load.balancer.spi.JPPFBundlerProvider", which is in "jppf-client.jar", whereas the class JPPFBundlerFactory which raises the exception is in "jppf-common.jar".

I managed to reproduce the exception in a lightweight setup and registered a bug report: JPPF-385 Class loader issues prevent the client from initializing.

I implemented a tentative fix, which can be downloaded from here: http://www.jppf.org/private/5.0.2/JPPF-385-fix.zip
For this fix to work, two steps are needed:
1) install the new "jppf-common.jar" from the zip file (I also included the source jar in case you need it for debugging)
2) since the jppf-client.jar classloader cannot be guessed, you will need to specify it in your code, just before creating the JPPFClient, for instance:
Code: [Select]
ClassLoader loader = JPPFClient.class.getClassLoader();
Thread.currentThread().setContextClassLoader(loader);
JPPFClient jppfClient = new JPPFClient();

Would you mind giving this a try and letting us know if this resolves the problem?
I will then provide an official fix, either as a patch or as part of the next maintennce release v5.0.2

Thanks,
-Laurent
Logged

mmingfeilam

  • Guest
Re: Getting Error: "Provider 'manual' could not be found"
« Reply #6 on: April 20, 2015, 08:18:36 PM »

thanks, it works.  please include it in the next release.
Logged

mmingfeilam

  • Guest
Re: Getting Error: "Provider 'manual' could not be found"
« Reply #7 on: April 21, 2015, 03:58:48 AM »

actually now i am getting this type of error:

[client: driver1-1 - ClassServer] Attempting connection to the class server at sfo1xx440bxx01.grmsamer.grms.ge.com:11111
[client: driver1-1 - ClassServer] Reconnected to the class server
[client: driver1-1 - TasksServer] Attempting connection to the task server at sfo1xx440bxx01.grmsamer.grms.ge.com:11111
[client: driver1-1 - TasksServer] Reconnected to the JPPF task server
Doing something while the jobs are executing ...
java.lang.OutOfMemoryError: PermGen space
Dumping heap to java_pid18256.hprof ...
Heap dump file created [214554211 bytes in 1.688 secs]
Exception in thread "jmx@3.39.64.100:11198" java.lang.OutOfMemoryError: PermGen space
        at java.lang.ClassLoader.findBootstrapClass(Native Method)
        at java.lang.ClassLoader.findBootstrapClassOrNull(ClassLoader.java:1061)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:412)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:410)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:410)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
        at org.apache.felix.framework.BundleWiringImpl.doImplicitBootDelegation(BundleWiringImpl.java:1666)
        at org.apache.felix.framework.BundleWiringImpl.access$000(BundleWiringImpl.java:72)
        at org.apache.felix.framework.BundleWiringImpl$1.run(BundleWiringImpl.java:1596)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.apache.felix.framework.BundleWiringImpl.searchDynamicImports(BundleWiringImpl.java:1591)
        at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1439)
        at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:72)
        at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1843)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:266)
        at com.sun.jmx.remote.socket.SocketConnection$ObjectInputStreamWithLoader.resolveClass(SocketConnection.java:421)
        at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1593)
        at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1514)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1750)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369)
        at com.sun.jmx.remote.socket.SocketConnection.readMessage(SocketConnection.java:296)
        at com.sun.jmx.remote.opt.security.AdminClient.connectionOpen(AdminClient.java:114)
        at com.sun.jmx.remote.generic.ClientSynchroMessageConnectionImpl.connect(ClientSynchroMessageConnectionImpl.java:198)
        at javax.management.remote.generic.GenericConnector.connect(GenericConnector.java:241)
        at javax.management.remote.jmxmp.JMXMPConnector.connect(JMXMPConnector.java:156)
        at javax.management.remote.generic.GenericConnector.connect(GenericConnector.java:198)
        at org.jppf.management.JMXConnectionWrapper.performConnection(JMXConnectionWrapper.java:215)
        at org.jppf.management.JMXConnectionThread.run(JMXConnectionThread.java:56)
Exception in thread "TaskQueueChecker" java.lang.OutOfMemoryError: PermGen space
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
        at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2128)
        at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1432)
        at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:72)
        at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1843)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
        at org.jppf.client.balancer.AbstractClientJob.updateStatus(AbstractClientJob.java:253)
        at org.jppf.client.balancer.ClientJob.jobDispatched(ClientJob.java:231)
        at org.jppf.client.balancer.ClientTaskBundle.jobDispatched(ClientTaskBundle.java:162)
        at org.jppf.client.balancer.ChannelWrapperRemote.submit(ChannelWrapperRemote.java:125)
        at org.jppf.client.balancer.ChannelWrapperRemote.submit(ChannelWrapperRemote.java:38)
        at org.jppf.client.balancer.queue.TaskQueueChecker.dispatchJobToChannel(TaskQueueChecker.java:297)
        at org.jppf.client.balancer.queue.TaskQueueChecker.dispatch(TaskQueueChecker.java:217)
        at org.jppf.client.balancer.queue.TaskQueueChecker.run(TaskQueueChecker.java:189)
        at java.lang.Thread.run(Thread.java:722)
Logged

lolo

  • Administrator
  • JPPF Council Member
  • *****
  • Posts: 2262
    • JPPF Web site
Re: Getting Error: "Provider 'manual' could not be found"
« Reply #8 on: April 21, 2015, 08:05:41 AM »

It seems your permanent generation space is sized too small. Could you try to make it larger using the -XX:MaxPermSize JVM option, for example -XX:MaxPermSize=256m ?
My understanding is that the default value is 64 MB for 32 bits JVMs and 82 MB for 64 bits JVMs, so you'll need a value larger than that in any case.

-Laurent
Logged
Pages: [1]   Go Up
 
JPPF Powered by SMF 2.0 RC5 | SMF © 2006–2011, Simple Machines LLC Get JPPF at SourceForge.net. Fast, secure and Free Open Source software downloads