Compilation error org.eclipse.jdt.internal.compiler.classfm

created at 07-07-2021 views: 3

Preface

I found that I encountered a lot of pitfalls when configuring the maven project in the new version of the idea. I prepared it myself by watching the instructional video of station b, but in the end I found that a lot of the content in it was different from the version I was using, so I wasted a lot of time on software configuration. I'm not afraid of everyone's jokes. I learned maven for two days, one and a half days was spent on software configuration, and finally half an hour to learn.

Description

  • Idea version used: version 2019-03
  • Project type: webapp option in maven plugin

Problems encountered:

Error message

Compilation error org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException
at org.eclips

To be honest, at first I saw this log really look like mengB. I am using idea, why is the error message from eclipse? So when I search this log exactly on goolge, all the search results I got were eclipse operation steps, and my head exploded. . .

solution

Finally, I found out that I lacked the configuration information of the tomcat7 plug-in. So later I added this new configuration file, and finally succeeded. . But it was such a small problem that stuck me for two days. . It's really crushing!
Finally, paste your own code. Add this plug-in to the pom.xml file and it will be OK.

<plugin\>  
  <groupId\>org.apache.tomcat.maven</groupId\>  
  <artifactId\>tomcat7-maven-plugin</artifactId\>  
  <version\>2.2</version\>  
</plugin\>
Please log in to leave a comment.