views:

282

answers:

2

im trying to kick off a Runnable classes run method however i keep getting a NullPointerException, Im using WebSpheres commonj.workmanager to get an instance of executorService.this is the code im using.

executorService.execute(new Runnable()
     {
      public void run()
      {
       System.out.println("Inside run ()method..");
      }
     });

ANY IDEAS?

+3  A: 

Are you checking whether executorService is null before calling execute()? If not, it sounds like you need to check the WebSphere docs.

Jon Skeet
+1  A: 

thanks for the reply, its the executorService that is null. Im using Spring to inject the property

combi001
This information is better added as an edit to the question instead of an another answer.
Alex B