The Issue
I am unable to compile Java code for an imported Eclipse project on IntelliJ build 182.4505.22 on Java 9 and 10. The following error is displa
In my case, it was: /.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/9.0.41/tomcat-embed-core-9.0.41.jar I just removed it and I was able to compile my code. Just pay attention to the .jar file in your case it's giving an error. Just remove it and you are good to go.
I had a similar issue when I used the dependency thymeleaf-extras-springsecurity4
from org.thymeleaf.extras
in a spring boot application.
Updating the dependency to the latest version helped.