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] springCloud Startup Error: Error creating bean with name ‘defaultValidator‘ defined in class path resource
- [Solved] eureka Startup Error: Unable to start web … nested exception is org.springframework.boot.web.server.WebS
- [Solved] eureka Startup Error: Unable to start web … nested exception is org.springframework.boot.web.server.WebS
- Springcloud builds a gateway and starts Error [Solved]
- How to Solve Error-SpringCloud-Feign and Sentinel integrate error
- [Solved] Springboot Package jar and Startup Error: It was loaded from the following location
- springcloud alibaba Integrating nacos reports errors: create config service error!properties=NacosConfigPropertie
- [Solved] debug error: cloud netflix. eureka. EurekaDiscoveryClientConfiguration (IDEA package normally)
- SpringCloud: Error creating bean with name ‘configurationPropertiesBeans‘
- SpringCloud Use openFeign Multipartfile to Upload Files Error: Current request is not a multipart request
- Eureka Error: registration status: 204 deregister status: 200
- Spring Security Upgrade to Version 5.5.7, 5.6.4 or Above to Startup Error (Version incompatibility)
- How to Solve Spring integrate Seata startup error
- kafka Environment Build and Startup Error: ERROR [KafkaServer id=1] Fatal error during KafkaServer startup. Prepare to shutdown
- Eureka Build Error: org.springframework.beans.factory.BeanCreationException: Error creating bean with name
- [Solved] Springboot uses redis to add LocaldateTime Java 8 error
- [Solved] kafka startup Error: ERROR Fatal error during KafkaServer startup. Prepare to shutdown
- [Solved] Tomcat startup error: sub-container startup failed
- [Solved] SpringCloud Compile Error: java: JPS incremental annotation processing is disabled. Compilation results on partial recompilation may be inaccurate.
- Springcloud Project Error: web.client.HttpServerErrorException$InternalServerError: 500 Internal Server Error