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 
June 03, 2023, 05:13:20 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: Errors in running Hello World  (Read 4575 times)

Abhilash K

  • JPPF Grand Master
  • ****
  • Posts: 64
Errors in running Hello World
« on: December 08, 2006, 12:30:04 PM »

Hii,

       I have created a hello world program.  I used the code given in the programming help page.  Created a HelloWorld class and HelloTask class.  The driver and nodes are started properly after that it is saying the error as follows.  i am putting my code for HelloWorld as follows

package test.hello;

import java.util.*;
import org.apache.log4j.Logger;
import org.jppf.JPPFException;
import org.jppf.client.JPPFClient;
import org.jppf.server.JPPFStats;
import org.jppf.server.protocol.JPPFTask;
import org.jppf.task.storage.*;
import org.jppf.utils.*;
public class HelloWorld
{
   static Logger log = Logger.getLogger(HelloWorld.class);
   private static JPPFClient jppfClient = null;

   public static void main(String args[])
   {
      JPPFClient client=new JPPFClient();
      List<JPPFTask> tasks = new ArrayList<JPPFTask>();
      tasks.add(new HelloTask());
      try {
         // execute tasks
         List<JPPFTask> results = client.submit(tasks, null);
         JPPFStats stats = client.requestStatistics();
         System.out.println("End statistics :\n"+stats.toString());
      } catch (Exception e) {
         e.printStackTrace();
      }
      
   }
}

HellowTask.java is as follows.

package test.hello;

import org.jppf.server.protocol.JPPFTask;

public class HelloTask extends JPPFTask {
   public void run() {
      setResult("Hello World");
   }
}
--------------------------------------------------------------
my errors are as follows.
run.hello:

run.driver:
     [echo] Starting the JPPF driver for MyApp

run.node1:
     [echo] Starting local node for MyApp

run.ui:
     [echo] Starting the server monitoring GUI for MyApp

run.helloworld:
     [echo] starting the 'Hellow World Application'
     [java] java.lang.NoClassDefFoundError: test/hello/HelloWorld
     [java] Exception in thread "main"
     [java] Java Result: 1
     [java] JPPFClassLoader.init(): attempting connection to the class server
     [java] JPPFClassLoader.init(): Reconnected to the class server
     [java] PeerNode.init(): Attempting connection to the JPPF driver
     [java] PeerNode.init(): Reconnected to the JPPF driver
     [java] Dec 8, 2006 4:45:26 PM java.util.prefs.WindowsPreferences <init>
     [java] WARNING: Could not open/create prefs root node Software\JavaSoft\Pre
fs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
     [java] ClassServerDelegate.init(): Attempting connection to the class serve
r
     [java] ClassServerDelegate.init(): Reconnected to the class server
     [java] JPPFClient.init(): Attempting connection to the JPPF driver
     [java] JPPFClient.init(): Reconnected to the JPPF driver

--------------------------------------------------------------------------
pls help me.  Its very urgent.

    regds,
           Abhilash
Logged

lolo

  • Administrator
  • JPPF Council Member
  • *****
  • Posts: 2272
    • JPPF Web site
Errors in running Hello World
« Reply #1 on: December 08, 2006, 10:35:22 PM »

Abhilash,

Can you please post the jppf-client.log file?
You are running the UI under Windows, is this correct?
Can you also check if you have the privileges to modify the registry, under the key: HKEY_CURRENT_USER\Software\JavaSoft\Prefs?

Thanks for your time,
-Laurent
Logged

Abhilash K

  • JPPF Grand Master
  • ****
  • Posts: 64
Re: Thanks
« Reply #2 on: December 09, 2006, 05:13:27 AM »

Hii,

        Thanks for your reply.  I think its my privilege problem.  How can I overcome that?  Should i need to sent anything in the policy file?  The error is corrected now.  Now the program is running, sorry that its a fault from my side.  

Thanx,
         Abhilash
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