spring-projects / spring-data-commons

Spring Data Commons. Interfaces and code shared between the various datastore specific implementations.
https://spring.io/projects/spring-data
Apache License 2.0
778 stars 675 forks source link

我遇到了一个bug实在查不到原因 #2741

Closed Liang-Dongxing closed 1 year ago

Liang-Dongxing commented 1 year ago

我单独建了一个springboot的项目,他有web能力,如下图 image 这个时候springmvc的controller请求都是没问题的,如下图 image 在我加入了spring-boot-starter-data-redis的时候,请求出现了问题 image image 第一个请求出现了500的报错。报错信息如下 `2022-12-03 12:41:40 JRebel: Starting logging to file: C:\Users\Liang.jrebel\jrebel.log 2022-12-03 12:41:40 JRebel:
2022-12-03 12:41:40 JRebel: ############################################################# 2022-12-03 12:41:40 JRebel:
2022-12-03 12:41:40 JRebel: JRebel Agent 2022.4.1 (202210311152) 2022-12-03 12:41:40 JRebel: (c) Copyright 2007-2022 Perforce Software, Inc. 2022-12-03 12:41:40 JRebel:
2022-12-03 12:41:40 JRebel: Over the last 30 days JRebel prevented 2022-12-03 12:41:40 JRebel: at least 15 redeploys/restarts saving you about 0.6 hours. 2022-12-03 12:41:40 JRebel:
2022-12-03 12:41:40 JRebel: Over the last 105 days JRebel prevented 2022-12-03 12:41:40 JRebel: at least 154 redeploys/restarts saving you about 6.2 hours. 2022-12-03 12:41:40 JRebel:
2022-12-03 12:41:40 JRebel: License acquired from License Server: http://127.0.0.1 2022-12-03 12:41:40 JRebel:
2022-12-03 12:41:40 JRebel: Licensed to Liang. 2022-12-03 12:41:40 JRebel:
2022-12-03 12:41:40 JRebel: You are using an offline license. 2022-12-03 12:41:40 JRebel:
2022-12-03 12:41:40 JRebel:
2022-12-03 12:41:40 JRebel: ############################################################# 2022-12-03 12:41:40 JRebel:

. _ _ /\ / '_ () \ \ \ \ ( ( )\ | ' | '| | ' \/ ` | \ \ \ \ \/ _)| |)| | | | | || (| | ) ) ) ) ' |__| .|| ||| |\, | / / / / =========|_|==============|__/=//// :: Spring Boot :: (v3.0.0)

2022-12-03T12:41:41.623+08:00 INFO 19188 --- [ main] com.example.demo.DemoApplication : Starting DemoApplication using Java 17.0.5 with PID 19188 (D:\GitWorkspace\demo\target\classes started by Liang in D:\GitWorkspace\demo) 2022-12-03T12:41:41.628+08:00 INFO 19188 --- [ main] com.example.demo.DemoApplication : No active profile set, falling back to 1 default profile: "default" 2022-12-03T12:41:42.268+08:00 INFO 19188 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode 2022-12-03T12:41:42.272+08:00 INFO 19188 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Redis repositories in DEFAULT mode. 2022-12-03T12:41:42.307+08:00 INFO 19188 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 13 ms. Found 0 Redis repository interfaces. 2022-12-03T12:41:42.871+08:00 INFO 19188 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http) 2022-12-03T12:41:42.884+08:00 INFO 19188 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat] 2022-12-03T12:41:42.884+08:00 INFO 19188 --- [ main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.1] 2022-12-03T12:41:42.975+08:00 INFO 19188 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext 2022-12-03T12:41:42.977+08:00 INFO 19188 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1270 ms 2022-12-03T12:41:48.106+08:00 INFO 19188 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path '' 2022-12-03T12:41:48.115+08:00 INFO 19188 --- [ main] com.example.demo.DemoApplication : Started DemoApplication in 6.955 seconds (process running for 15.1) 2022-12-03T12:41:57.807+08:00 INFO 19188 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet' 2022-12-03T12:41:57.807+08:00 INFO 19188 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet' 2022-12-03T12:41:57.809+08:00 INFO 19188 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 2 ms 2022-12-03T12:42:02.184+08:00 ERROR 19188 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed: java.lang.NoSuchMethodError: 'void org.springframework.data.repository.support.Repositories._jr$ip$domainTypeMapping(java.lang.Object, org.springframework.util.ConcurrentLruCache)'] with root cause

java.lang.NoSuchMethodError: 'void org.springframework.data.repository.support.Repositories._jr$ip$domainTypeMapping(java.lang.Object, org.springframework.util.ConcurrentLruCache)' at org.springframework.data.repository.support.Repositories.loadRepositories(Repositories.java:64) ~[spring-data-commons-3.0.0.jar:3.0.0] at org.springframework.data.repository.support.Repositories.(Repositories.java:45001) ~[spring-data-commons-3.0.0.jar:3.0.0] at org.springframework.data.repository.support.DomainClassConverter.lambda$setApplicationContext$2(DomainClassConverter.java:98) ~[spring-data-commons-3.0.0.jar:3.0.0] at org.springframework.data.util.Lazy.getNullable(Lazy.java:229) ~[spring-data-commons-3.0.0.jar:3.0.0] at org.springframework.data.util.Lazy.get(Lazy.java:113) ~[spring-data-commons-3.0.0.jar:3.0.0] at org.springframework.data.repository.support.DomainClassConverter.getConverter(DomainClassConverter.java:91) ~[spring-data-commons-3.0.0.jar:3.0.0] at org.springframework.data.repository.support.DomainClassConverter.matches(DomainClassConverter.java:83) ~[spring-data-commons-3.0.0.jar:3.0.0] at org.springframework.core.convert.support.GenericConversionService$ConvertersForPair.getConverter(GenericConversionService.java:663) ~[spring-core-6.0.2.jar:6.0.2] at org.springframework.core.convert.support.GenericConversionService$Converters.getRegisteredConverter(GenericConversionService.java:560) ~[spring-core-6.0.2.jar:6.0.2] at org.springframework.core.convert.support.GenericConversionService$Converters.find(GenericConversionService.java:544) ~[spring-core-6.0.2.jar:6.0.2] at org.springframework.core.convert.support.GenericConversionService.getConverter(GenericConversionService.java:261) ~[spring-core-6.0.2.jar:6.0.2] at org.springframework.core.convert.support.GenericConversionService.canConvert(GenericConversionService.java:146) ~[spring-core-6.0.2.jar:6.0.2] at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:127) ~[spring-beans-6.0.2.jar:na] at org.springframework.beans.TypeConverterSupport.convertIfNecessary(TypeConverterSupport.java:73) ~[spring-beans-6.0.2.jar:na] at org.springframework.beans.TypeConverterSupport.convertIfNecessary(TypeConverterSupport.java:53) ~[spring-beans-6.0.2.jar:na] at org.springframework.validation.DataBinder.convertIfNecessary(DataBinder.java:729) ~[spring-context-6.0.2.jar:6.0.2] at org.springframework.web.method.annotation.AbstractNamedValueMethodArgumentResolver.resolveArgument(AbstractNamedValueMethodArgumentResolver.java:125) ~[spring-web-6.0.2.jar:6.0.2] at org.springframework.web.method.support.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:122) ~[spring-web-6.0.2.jar:6.0.2] at org.springframework.web.method.support.InvocableHandlerMethod.getMethodArgumentValues(InvocableHandlerMethod.java:181) ~[spring-web-6.0.2.jar:6.0.2] at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:148) ~[spring-web-6.0.2.jar:6.0.2] at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117) ~[spring-webmvc-6.0.2.jar:6.0.2] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:884) ~[spring-webmvc-6.0.2.jar:6.0.2] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797) ~[spring-webmvc-6.0.2.jar:6.0.2] at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-6.0.2.jar:6.0.2] at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1080) ~[spring-webmvc-6.0.2.jar:6.0.2] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:973) ~[spring-webmvc-6.0.2.jar:6.0.2] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1003) ~[spring-webmvc-6.0.2.jar:6.0.2] at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:895) ~[spring-webmvc-6.0.2.jar:6.0.2] at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:705) ~[tomcat-embed-core-10.1.1.jar:6.0] at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:880) ~[spring-webmvc-6.0.2.jar:6.0.2] at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:814) ~[tomcat-embed-core-10.1.1.jar:6.0] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:223) ~[tomcat-embed-core-10.1.1.jar:10.1.1] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:158) ~[tomcat-embed-core-10.1.1.jar:10.1.1] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-embed-websocket-10.1.1.jar:10.1.1] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:185) ~[tomcat-embed-core-10.1.1.jar:10.1.1] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:158) ~[tomcat-embed-core-10.1.1.jar:10.1.1] at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-6.0.2.jar:6.0.2] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.2.jar:6.0.2] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:185) ~[tomcat-embed-core-10.1.1.jar:10.1.1] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:158) ~[tomcat-embed-core-10.1.1.jar:10.1.1] at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-6.0.2.jar:6.0.2] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.2.jar:6.0.2] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:185) ~[tomcat-embed-core-10.1.1.jar:10.1.1] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:158) ~[tomcat-embed-core-10.1.1.jar:10.1.1] at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-6.0.2.jar:6.0.2] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.2.jar:6.0.2] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:185) ~[tomcat-embed-core-10.1.1.jar:10.1.1] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:158) ~[tomcat-embed-core-10.1.1.jar:10.1.1] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197) ~[tomcat-embed-core-10.1.1.jar:10.1.1] at org.apache.catalina.core.StandardContextValve.__invoke(StandardContextValve.java:97) ~[tomcat-embed-core-10.1.1.jar:10.1.1] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:41002) ~[tomcat-embed-core-10.1.1.jar:10.1.1] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542) ~[tomcat-embed-core-10.1.1.jar:10.1.1] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:119) ~[tomcat-embed-core-10.1.1.jar:10.1.1] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) ~[tomcat-embed-core-10.1.1.jar:10.1.1] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) ~[tomcat-embed-core-10.1.1.jar:10.1.1] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357) ~[tomcat-embed-core-10.1.1.jar:10.1.1] at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:400) ~[tomcat-embed-core-10.1.1.jar:10.1.1] at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) ~[tomcat-embed-core-10.1.1.jar:10.1.1] at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861) ~[tomcat-embed-core-10.1.1.jar:10.1.1] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1739) ~[tomcat-embed-core-10.1.1.jar:10.1.1] at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) ~[tomcat-embed-core-10.1.1.jar:10.1.1] at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) ~[tomcat-embed-core-10.1.1.jar:10.1.1] at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) ~[tomcat-embed-core-10.1.1.jar:10.1.1] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-10.1.1.jar:10.1.1] at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]

`

Liang-Dongxing commented 1 year ago

这个是我的样例 demo.zip

Liang-Dongxing commented 1 year ago

这个问题没有人遇到过吗

mp911de commented 1 year ago
ava.lang.NoSuchMethodError: 'void org.springframework.data.repository.support.Repositories._jr$ip$domainTypeMapping(java.lang.Object, org.springframework.util.ConcurrentLruCache)'

Seems to originate from your Jrebel setup.