0

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?
deHaar
  • 17,687
  • 10
  • 38
  • 51
cdugga
  • 3,849
  • 17
  • 81
  • 127

2 Answers2

3

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,421,763
  • 867
  • 9,128
  • 9,194
1

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

deHaar
  • 17,687
  • 10
  • 38
  • 51
cdugga
  • 3,849
  • 17
  • 81
  • 127