The targeted runtime version must be updated. Suppose you are using Tomcat Version 8.0 but in the targeted runtime it shows 7.0 selected.
You need to right click on your project > Properties > Targeted Runtime > Click the version required 8.0 I guess. Hope it helps.
参考 :