in Eclipse select your project →
click on project menu bar on top →
goto to properties →
click on Targeted Runtimes →
now you must select a check box next to the server you are using to run current project →
click Apply →
then click OK button.
参照