Java 8 & Jasper Validation in Intellij IDEA 14
Answered
I am moving to JDK 8 with Tomcat 8. When I try & validate a jsp file I get errors such as:
- Error:(37, 0) The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files
- Error:The type java.util.regex.Pattern cannot be resolved. It is indirectly referenced from required .class files
But when run my webapp everything works, so I know that tomcat is able to compile and run my JSPs fine.
Has anyone run into this issue? I've spent hours researching this and am stumped. It seems to me as if the Jasper validation is stuck in JDK 7 while what I've actually compiled is targeting 8. I tried upgrading to IntelliJ 2016, but it has a bug and Jasper validation won't run.
Please sign in to leave a comment.
I should note, that if I change my SDK to 1.7 the validator doesn't give me any errors.
Java 8 validation support was added in IDEA 15: https://youtrack.jetbrains.com/issue/IDEA-139744. However, there is another issue in the latest version: https://youtrack.jetbrains.com/issue/IDEA-153869.