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?

2 Answers 2

3

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

Sign up to request clarification or add additional context in comments.

Comments

1

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

1 Comment

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.