1.Error Messages:
Correct the classpath of your application so that it contains a single, compatible version of com.google.gson.GsonBuilder
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
java.lang.invoke.MethodHandleNatives.resolve(Native Method)
The following method did not exist:
com.google.gson.GsonBuilder.setLenient()Lcom/google/gson/GsonBuilder;
The method's class, com.google.gson.GsonBuilder, is available from the following locations:
jar:file:/E:/smallTools/maven/rep/com/google/code/gson/gson/2.1/gson-2.1.jar!/com/google/gson/GsonBuilder.class
The class hierarchy was loaded from the following locations:
com.google.gson.GsonBuilder: file:/E:/smallTools/maven/rep/com/google/code/gson/gson/2.1/gson-2.1.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of com.google.gson.GsonBuilder
Process finished with exit code 1
2. Solution
Add gson dependency
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.6</version>
</dependency>
Read More:
- [Solved] Invocation of init method failed; nested exception is java.lang.NoSuchMethodError:
- [Solved] Springboot Project Start Error: An attempt was made to call the method com.google.common.collect.Multimaps.asMap
- [Siolved] org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘webMvcObject
- Spring Cloud Hoxton.SR9 gateway and reactor-netty 0.9.0.RELEASE is Incompatible [How to Solve]
- Caused by: java.lang.IllegalStateException (How to Fix)
- spring cloud 2020 gateway Error 503 [How to Solve]
- [Solved] Mybatis.generator error: Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2
- [Solved] Jxls error: Cannot load XLS transformer. Please make sure a Transformer implementation is in classpath
- How to Solve Spring integrate Seata startup error
- Error resolving template [index], template might not exist
- How to Solve idea com.baomidou Error
- [Solved] Spring Cloud Use Ribbon Error: No instances available for XXX
- [Solved] SpringBoot Pack Project: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources
- [ERROR] Failed to execute goal on project simple-project: Could not resolve dependencies for project
- Ali easyexcel error: org.apache.poi.ss.usermodel.font.setbold (z) V
- [Solved] ApplicationContextException: Failed to start bean ‘documentationPluginsBootstrapper‘;
- [Solved] The Bean Validation API is on the classpath but no implementation could be found
- Springboot Project: How to Introduces Local Jar Package
- Error querying database.Cause: java.sql.SQLException: Error setting driver on UnpooledDataSource.
- Jjwt error: ERROR 9856 — [nio-8083-exec-2] o.a.c.c. [. [. [. [/]. [dispatch server]