2008-11-18 54 views
0

即时尝试启动一个Runnable类的运行方法,但我不断得到一个NullPointerException,我使用WebSpheres commonj.workmanager来获取executorService.this的实例是我正在使用的代码。java.util.concurrent

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

任何想法?

回答

3

您是否在调用​​之前检查executorService是否为空?如果没有,这听起来像您需要检查WebSphere文档。

1

感谢您的答复,它的executorService是null。我使用Spring来注入属性

+0

此信息最好作为对问题的编辑而不是另一个答案添加。 – 2008-11-18 18:35:38