1. reason
this error may be triggered when the project dependency is complex, there is a problem with the Java running environment, or there are different versions of the same type of jar package. In essence, the JVM cannot find a specific method of a class, that is, the JVM loads the wrong version of the class. To put it bluntly, the JVM can’t find the method it really wants to call! There are two main situations in which this error occurs:
Imported mismatched package version
the development environment is inconsistent with the running environment
2. solutions
check “external libraries” to see whether the error reporting method exists. If it does not exist, there must be a problem with the package. Just update the package; If it exists, it indicates that the package has been successfully introduced, but the integrated development environment may not be synchronized to. You can try to force the update. In addition, you can check whether the development environment is consistent with the running environment. If not, modify it.
3. special reminder
in case of Maven project, there are two main methods in the process of updating the package:
Go to the local Maven warehouse, delete the corresponding package, and then click refresh in “Maven project”
directly enter the command in the command line of “Maven project” to force the update
among them, method 1 is not reliable, and the operation may not be successful. The reason is unknown. Method 2 is strongly recommended. Nothing else, reliable!
Read More:
- [Solved] Invocation of init method failed; nested exception is java.lang.NoSuchMethodError:
- [Integrate the mobile MAS SMS service] SDK start error: NoSuchMethodError: org.springframework.core.annotation.AnnotatedElementUtil
- How to Solve Hbase JAVA import Package Error
- How to Solve Spring Boot Maven Build Error
- How to Solve JUnit Debugging initializationerror ERROR
- How to Solve Error: Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package.
- Java error: java.lang.NoSuchMethodError
- How to Solve Assert error (IDEA Package Imported)
- How to Solve Java Runtime (class file version 53.0)ERROR
- How to Solve Junit Unit Test Error: “No runnable methods“
- How to Solve Error: Maven ‘parent.relativePath‘ of POM…
- How to Solve Flynk Task Java verifyerror 209 error
- How to Solve Swagger error: IllegalStateException
- How to Solve EasyExcel3.0.5 Version Error
- How to Solve ERROR: Java 1.7 or later is required to run Apache Drill
- How to Solve shiro Set sessionIdUrlRewritingEnabled Error (jessionid Removed)
- How to Solve JAVA Error: error: A JNI error has occureed
- Mac: How to Solve ERROR launching ‘JD-GUI‘
- How to Solve idea com.baomidou Error
- How to Solve Errors encountered by maven