Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/321.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
java.util.concurrent_Java_Websphere_Executorservice_Commonj - Fatal编程技术网

java.util.concurrent

java.util.concurrent,java,websphere,executorservice,commonj,Java,Websphere,Executorservice,Commonj,我试图启动一个Runnable classes run方法,但是我一直得到一个NullPointerException,我使用WebSpheres commonj.workmanager获得executorService的实例。这是我使用的代码 executorService.execute(new Runnable() { public void run() { System.out.println("Inside run ()method.."); } });

我试图启动一个Runnable classes run方法,但是我一直得到一个NullPointerException,我使用WebSpheres commonj.workmanager获得executorService的实例。这是我使用的代码

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

ANY IDEAS?

在调用
execute()
之前,是否检查
executeService
是否为null?如果没有,听起来您需要检查WebSphere文档。

在调用
execute()
之前,是否检查
executeservice
是否为空?如果没有,听起来您需要检查WebSphere文档。

谢谢您的回复,是
executorService
表示
null
。我正在使用Spring注入属性。

感谢您的回复,这是
executorService
,即
null
。我正在使用Spring插入属性。

最好将此信息添加为问题的编辑,而不是另一个答案。最好将此信息添加为问题的编辑,而不是另一个答案。