An attempt was made to call the method com.google.gson.GsonBuilder.setLenient()Lcom/google/gson/GsonBuilder; but it does not exist. Its class, com.goo
阿新 • • 發佈:2019-01-10
1 SLF4J: Class path contains multiple SLF4J bindings. 2 SLF4J: Found binding in [jar:file:/G:/sharp/repo/ch/qos/logback/logback-classic/1.2.3/logback-classic- 3 4 1.2.3.jar!/org/slf4j/impl/StaticLoggerBinder.class] 5 SLF4J: Found binding in [jar:file:/G:/sharp/repo/org/slf4j/slf4j-log4j12/1.7.25/slf4j-log4j12-6 7 1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class] 8 SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. 9 SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder] 10 11 . ____ _ __ _ _ 12 /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \13 ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ 14 \\/ ___)| |_)| | | | | || (_| | ) ) ) ) 15 ' |____| .__|_| |_|_| |_\__, | / / / / 16 =========|_|==============|___/=/_/_/_/ 17 :: Spring Boot :: (v2.1.0.RELEASE) 18 19 2019-01-10 09:20:41.911 [main] INFO com.sharp.forward.SharpServiceApplication - Starting SharpServiceApplication on20 21 hh-PC with PID 7440 (G:\worksheet\sharp-service\target\classes started by Administrator in G:\worksheet\sharp-service) 22 2019-01-10 09:20:41.913 [main] INFO com.sharp.forward.SharpServiceApplication - The following profiles are active: 23 24 local 25 log4j:WARN No appenders could be found for logger (com.alibaba.dubbo.common.logger.LoggerFactory). 26 log4j:WARN Please initialize the log4j system properly. 27 log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. 28 2019-01-10 09:20:43.101 [main] INFO org.springframework.data.repository.config.RepositoryConfigurationDelegate - 29 30 Bootstrapping Spring Data repositories in DEFAULT mode. 31 2019-01-10 09:20:43.126 [main] INFO org.springframework.data.repository.config.RepositoryConfigurationDelegate - 32 33 Finished Spring Data repository scanning in 15ms. Found 0 repository interfaces. 34 2019-01-10 09:20:43.506 [main] INFO org.springframework.context.support.PostProcessorRegistrationDelegate 35 36 $BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of 37 38 type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$ 39 40 $d77381ec] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 41 2019-01-10 09:20:43.915 [main] INFO org.springframework.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized 42 43 with port(s): 8080 (http) 44 2019-01-10 09:20:43.929 [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http- 45 46 nio-8080"] 47 2019-01-10 09:20:43.935 [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] 48 2019-01-10 09:20:43.936 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet Engine: Apache 49 50 Tomcat/9.0.12 51 2019-01-10 09:20:43.944 [main] INFO org.apache.catalina.core.AprLifecycleListener - The APR based Apache Tomcat Native 52 53 library which allows optimal performance in production environments was not found on the java.library.path: [D: 54 55 \topbandSoft\java\jre1.8\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C: 56 57 \Windows;D:/topbandSoft/java/jre1.8/bin/server;D:/topbandSoft/java/jre1.8/bin;D:/topbandSoft/java/jre1.8/lib/amd64;C: 58 59 \Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C: 60 61 \Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Java\jre7;D:\topbandSoft\java\jdk1.8\bin;D: 62 63 \topbandSoft\java\jdk1.8\jre\bin;D:\topbandSoft\git\Git\cmd;D:\topbandSoft\svn\bin;D:\topbandSoft\maven\apache-maven- 64 65 3.3.9-bin\apache-maven-3.3.9\bin;C:\Program Files\bin;D:\topbandSoft\zookeeper/bin;D:\topbandSoft\zookeeper/conf;D: 66 67 \putty\;D:\topbandSoft\eclipse4.8\eclipse;;.] 68 2019-01-10 09:20:44.063 [main] INFO org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing 69 70 Spring embedded WebApplicationContext 71 2019-01-10 09:20:44.063 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: 72 73 initialization completed in 2102 ms 74 2019-01-10 09:20:44.091 [main] INFO org.springframework.boot.web.servlet.ServletRegistrationBean - Servlet 75 76 dispatcherServlet mapped to [/] 77 2019-01-10 09:20:44.095 [main] INFO org.springframework.boot.web.servlet.FilterRegistrationBean - Mapping filter: 78 79 'characterEncodingFilter' to: [/*] 80 2019-01-10 09:20:44.095 [main] INFO org.springframework.boot.web.servlet.FilterRegistrationBean - Mapping filter: 81 82 'hiddenHttpMethodFilter' to: [/*] 83 2019-01-10 09:20:44.095 [main] INFO org.springframework.boot.web.servlet.FilterRegistrationBean - Mapping filter: 84 85 'formContentFilter' to: [/*] 86 2019-01-10 09:20:44.095 [main] INFO org.springframework.boot.web.servlet.FilterRegistrationBean - Mapping filter: 87 88 'requestContextFilter' to: [/*] 89 2019-01-10 09:20:44.222 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... 90 Thu Jan 10 09:20:44 CST 2019 WARN: Establishing SSL connection without server's identity verification is not 91 92 recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default 93 94 if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate 95 96 property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and 97 98 provide truststore for server certificate verification. 99 2019-01-10 09:20:44.653 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed. 100 2019-01-10 09:20:44.708 [main] INFO org.hibernate.jpa.internal.util.LogHelper - HHH000204: Processing 101 102 PersistenceUnitInfo [ 103 name: default 104 ...] 105 Thu Jan 10 09:20:44 CST 2019 WARN: Establishing SSL connection without server's identity verification is not 106 107 recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default 108 109 if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate 110 111 property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and 112 113 provide truststore for server certificate verification. 114 Thu Jan 10 09:20:44 CST 2019 WARN: Establishing SSL connection without server's identity verification is not 115 116 recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default 117 118 if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate 119 120 property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and 121 122 provide truststore for server certificate verification. 123 2019-01-10 09:20:44.805 [main] INFO org.hibernate.Version - HHH000412: Hibernate Core {5.3.7.Final} 124 2019-01-10 09:20:44.806 [main] INFO org.hibernate.cfg.Environment - HHH000206: hibernate.properties not found 125 Thu Jan 10 09:20:44 CST 2019 WARN: Establishing SSL connection without server's identity verification is not 126 127 recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default 128 129 if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate 130 131 property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and 132 133 provide truststore for server certificate verification. 134 Thu Jan 10 09:20:44 CST 2019 WARN: Establishing SSL connection without server's identity verification is not 135 136 recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default 137 138 if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate 139 140 property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and 141 142 provide truststore for server certificate verification. 143 Thu Jan 10 09:20:44 CST 2019 WARN: Establishing SSL connection without server's identity verification is not 144 145 recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default 146 147 if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate 148 149 property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and 150 151 provide truststore for server certificate verification. 152 Thu Jan 10 09:20:44 CST 2019 WARN: Establishing SSL connection without server's identity verification is not 153 154 recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default 155 156 if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate 157 158 property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and 159 160 provide truststore for server certificate verification. 161 Thu Jan 10 09:20:44 CST 2019 WARN: Establishing SSL connection without server's identity verification is not 162 163 recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default 164 165 if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate 166 167 property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and 168 169 provide truststore for server certificate verification. 170 Thu Jan 10 09:20:44 CST 2019 WARN: Establishing SSL connection without server's identity verification is not 171 172 recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default 173 174 if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate 175 176 property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and 177 178 provide truststore for server certificate verification. 179 Thu Jan 10 09:20:44 CST 2019 WARN: Establishing SSL connection without server's identity verification is not 180 181 recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default 182 183 if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate 184 185 property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and 186 187 provide truststore for server certificate verification. 188 2019-01-10 09:20:44.986 [main] INFO org.hibernate.annotations.common.Version - HCANN000001: Hibernate Commons 189 190 Annotations {5.0.4.Final} 191 2019-01-10 09:20:45.140 [main] INFO org.hibernate.dialect.Dialect - HHH000400: Using dialect: 192 193 org.hibernate.dialect.MySQL5Dialect 194 2019-01-10 09:20:45.365 [main] INFO org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean - Initialized 195 196 JPA EntityManagerFactory for persistence unit 'default' 197 2019-01-10 09:20:45.888 [main] INFO org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing 198 199 ExecutorService 'applicationTaskExecutor' 200 2019-01-10 09:20:45.929 [main] WARN org.springframework.boot.autoconfigure.orm.jpa.JpaBaseConfiguration 201 202 $JpaWebConfiguration$JpaWebMvcConfiguration - spring.jpa.open-in-view is enabled by default. Therefore, database queries 203 204 may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning 205 2019-01-10 09:20:46.057 [main] WARN 206 207 org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext - Exception encountered 208 209 during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: 210 211 Error creating bean with name 'gsonBuilder' defined in class path resource 212 213 [org/springframework/boot/autoconfigure/gson/GsonAutoConfiguration.class]: Bean instantiation via factory method failed; 214 215 nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate 216 217 [com.google.gson.GsonBuilder]: Factory method 'gsonBuilder' threw exception; nested exception is 218 219 java.lang.BootstrapMethodError: java.lang.NoSuchMethodError: com.google.gson.GsonBuilder.setLenient() 220 221 Lcom/google/gson/GsonBuilder; 222 2019-01-10 09:20:46.057 [main] INFO org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor - Shutting down 223 224 ExecutorService 'applicationTaskExecutor' 225 2019-01-10 09:20:46.058 [main] INFO org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean - Closing JPA 226 227 EntityManagerFactory for persistence unit 'default' 228 2019-01-10 09:20:46.061 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Shutdown initiated... 229 2019-01-10 09:20:46.068 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Shutdown completed. 230 2019-01-10 09:20:46.070 [main] INFO org.apache.catalina.core.StandardService - Stopping service [Tomcat] 231 2019-01-10 09:20:46.083 [main] INFO 232 233 org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener - 234 235 Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 236 2019-01-10 09:20:46.085 [main] ERROR org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter - 237 238 *************************** 239 APPLICATION FAILED TO START 240 *************************** 241 242 Description: 243 244 An attempt was made to call the method com.google.gson.GsonBuilder.setLenient()Lcom/google/gson/GsonBuilder; but it does 245 246 not exist. Its class, com.google.gson.GsonBuilder, is available from the following locations: 247 248 jar:file:/G:/lib/gson-2.3.1.jar!/com/google/gson/GsonBuilder.class 249 250 It was loaded from the following location: 251 252 file:/G:/lib/gson-2.3.1.jar 253 254 255 Action: 256 257 Correct the classpath of your application so that it contains a single, compatible version of 258 259 com.google.gson.GsonBuilder
提升了版本2.7,2.8.2,但是均沒有解決版本衝突的問題,最後發現,是我之前手動新增過gson.jar。刪除即可。比較常規,但是由於用maven管理jar包,在pom.xml中找不到衝突的jar所以在這裡記錄一下,提個醒。下面是先刪除本地jar之後的現象,再刪除這些就可以了