@wendal 按上面的说法加上之后,我在测试后,还是会出现错误
错误如下
请问,如果在不升级nutz包的情况下,还有什么其他办法修复这个BUG吗?
或者是我count的方式不对?
Listening for transport dt_socket at address: 5005
11:04:04.456 [main] DEBUG org.springframework.core.env.StandardEnvironment - Adding [systemProperties] PropertySource with lowest search precedence
11:04:04.465 [main] DEBUG org.springframework.core.env.StandardEnvironment - Adding [systemEnvironment] PropertySource with lowest search precedence
11:04:04.467 [main] DEBUG org.springframework.core.env.StandardEnvironment - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.5.6.RELEASE)
2019-05-06 11:04:05.259 INFO 2380 --- [ main] cn.guanfu.GuanfuAppServer : Starting GuanfuAppServer v1.0 on bogon with PID 2380 (/home/jarDir/GuanfuAppServer-1.0.jar started by root in /home/jarDir)
2019-05-06 11:04:05.260 INFO 2380 --- [ main] cn.guanfu.GuanfuAppServer : The following profiles are active: pkgen,dev
2019-05-06 11:04:05.304 INFO 2380 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@742ff096: startup date [Mon May 06 11:04:05 CST 2019]; root of context hierarchy
2019-05-06 11:04:07.381 INFO 2380 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean definition for bean 'managementServletContext' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.actuate.autoconfigure.EndpointWebMvcHypermediaManagementContextConfiguration; factoryMethodName=managementServletContext; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/actuate/autoconfigure/EndpointWebMvcHypermediaManagementContextConfiguration.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.actuate.autoconfigure.EndpointWebMvcAutoConfiguration; factoryMethodName=managementServletContext; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/actuate/autoconfigure/EndpointWebMvcAutoConfiguration.class]]
2019-05-06 11:04:07.414 INFO 2380 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!
2019-05-06 11:04:08.312 INFO 2380 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'redisCacheConfig' of type [cn.guanfu.config.RedisCacheConfig$$EnhancerBySpringCGLIB$$87f5fc8f] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-05-06 11:04:08.421 INFO 2380 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cache.annotation.ProxyCachingConfiguration' of type [org.springframework.cache.annotation.ProxyCachingConfiguration$$EnhancerBySpringCGLIB$$bdf676f4] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-05-06 11:04:08.708 INFO 2380 --- [ main] org.xnio : XNIO version 3.3.8.Final
2019-05-06 11:04:08.728 INFO 2380 --- [ main] org.xnio.nio : XNIO NIO Implementation Version 3.3.8.Final
2019-05-06 11:04:08.806 WARN 2380 --- [ main] io.undertow.websockets.jsr : UT026009: XNIO worker was not set on WebSocketDeploymentInfo, the default worker will be used
2019-05-06 11:04:08.807 WARN 2380 --- [ main] io.undertow.websockets.jsr : UT026010: Buffer pool was not set on WebSocketDeploymentInfo, the default pool will be used
2019-05-06 11:04:08.833 INFO 2380 --- [ main] io.undertow.servlet : Initializing Spring embedded WebApplicationContext
2019-05-06 11:04:08.833 INFO 2380 --- [ main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 3532 ms
2019-05-06 11:04:09.096 INFO 2380 --- [ main] o.s.b.w.servlet.ServletRegistrationBean : Mapping servlet: 'dispatcherServlet' to [/]
2019-05-06 11:04:09.100 INFO 2380 --- [ main] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'metricsFilter' to: [/*]
2019-05-06 11:04:09.101 INFO 2380 --- [ main] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2019-05-06 11:04:09.101 INFO 2380 --- [ main] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2019-05-06 11:04:09.102 INFO 2380 --- [ main] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2019-05-06 11:04:09.102 INFO 2380 --- [ main] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2019-05-06 11:04:09.102 INFO 2380 --- [ main] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'webRequestLoggingFilter' to: [/*]
2019-05-06 11:04:09.102 INFO 2380 --- [ main] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'applicationContextIdFilter' to: [/*]
2019-05-06 11:04:09.295 WARN 2380 --- [ main] f.a.AutowiredAnnotationBeanPostProcessor : Autowired annotation should only be used on methods with parameters: public void cn.guanfu.common.db.GFDao.setFileSqlManager()
2019-05-06 11:04:09.424 DEBUG 2380 --- [ main] org.nutz.dao.impl.FileSqlManager : load >> /sqls/ from root=/sqls/
2019-05-06 11:04:09.429 DEBUG 2380 --- [ main] org.nutz.dao.impl.FileSqlManager : load 0 sql >> /sqls/ from root=/sqls/
2019-05-06 11:04:09.429 DEBUG 2380 --- [ main] org.nutz.dao.impl.DaoSupport : SqlManager Sql count=0
[SqlManager Sql count : 0 ]
2019-05-06 11:04:09.622 INFO 2380 --- [ main] org.nutz.filepool.NutFilePool : Init file-pool by: /root/.nutz/tmp/dao/ [200000]
2019-05-06 11:04:09.623 INFO 2380 --- [ main] org.nutz.filepool.NutFilePool : file-pool.cursor: 0
2019-05-06 11:04:09.699 DEBUG 2380 --- [ main] org.nutz.dao.jdbc.Jdbcs : Jdbcs init complete
2019-05-06 11:04:09.700 INFO 2380 --- [ main] org.nutz.dao.jdbc.Jdbcs : Get Connection from DataSource for JdbcExpert, if you lock at here, check your database server and configure
2019-05-06 11:04:09.702 INFO 2380 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2019-05-06 11:04:09.941 INFO 2380 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2019-05-06 11:04:09.949 DEBUG 2380 --- [ main] org.nutz.dao.impl.DaoSupport : select expert : org.nutz.dao.impl.jdbc.mysql.MysqlJdbcExpert
2019-05-06 11:04:09.955 DEBUG 2380 --- [ main] org.nutz.dao.impl.DaoSupport : JDBC Driver --> mysql-connector-java-5.1.43 ( Revision: 1d14b699eff3e6112aaedb1cbe5a151ab81f98f1 )
2019-05-06 11:04:09.955 DEBUG 2380 --- [ main] org.nutz.dao.impl.DaoSupport : JDBC Name --> MySQL Connector Java
2019-05-06 11:04:09.955 DEBUG 2380 --- [ main] org.nutz.dao.impl.DaoSupport : JDBC URL --> jdbc:mysql://10.0.0.254/gf-010060-3?useSSL=false
2019-05-06 11:04:09.963 DEBUG 2380 --- [ main] o.n.dao.impl.jdbc.mysql.MysqlJdbcExpert : Mysql : character_set_client=utf8mb4
2019-05-06 11:04:09.963 DEBUG 2380 --- [ main] o.n.dao.impl.jdbc.mysql.MysqlJdbcExpert : Mysql : character_set_connection=utf8mb4
2019-05-06 11:04:09.963 DEBUG 2380 --- [ main] o.n.dao.impl.jdbc.mysql.MysqlJdbcExpert : Mysql : character_set_database=utf8mb4
2019-05-06 11:04:09.964 DEBUG 2380 --- [ main] o.n.dao.impl.jdbc.mysql.MysqlJdbcExpert : Mysql : character_set_filesystem=binary
2019-05-06 11:04:09.964 DEBUG 2380 --- [ main] o.n.dao.impl.jdbc.mysql.MysqlJdbcExpert : Mysql : character_set_results=
2019-05-06 11:04:09.964 DEBUG 2380 --- [ main] o.n.dao.impl.jdbc.mysql.MysqlJdbcExpert : Mysql : character_set_server=utf8mb4
2019-05-06 11:04:09.964 DEBUG 2380 --- [ main] o.n.dao.impl.jdbc.mysql.MysqlJdbcExpert : Mysql : character_set_system=utf8
2019-05-06 11:04:09.964 DEBUG 2380 --- [ main] o.n.dao.impl.jdbc.mysql.MysqlJdbcExpert : Mysql : character_sets_dir=/usr/local/mysql/share/charsets/
2019-05-06 11:04:09.965 DEBUG 2380 --- [ main] o.n.dao.impl.jdbc.mysql.MysqlJdbcExpert : Mysql : binlog_format=MIXED
2019-05-06 11:04:09.966 DEBUG 2380 --- [ main] o.n.dao.impl.jdbc.mysql.MysqlJdbcExpert : Mysql : database=gf-010060-3
2019-05-06 11:04:09.966 DEBUG 2380 --- [ main] o.n.dao.impl.jdbc.mysql.MysqlJdbcExpert : Mysql : user=root@bogon
2019-05-06 11:04:09.979 DEBUG 2380 --- [ main] org.nutz.dao.impl.DaoSupport : Database info --> MYSQL:[MySQL - 5.7.22-log]
2019-05-06 11:04:11.351 INFO 2380 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'taskExecutor'
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.nutz.dao.SqlNotFoundException: fail to find SQL 'ad.selectAds'!
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:982)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
at org.springframework.boot.web.filter.ApplicationContextHeaderFilter.doFilterInternal(ApplicationContextHeaderFilter.java:55)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:110)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:105)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:106)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:326)
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:812)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.nutz.dao.SqlNotFoundException: fail to find SQL 'ad.selectAds'!
at org.nutz.dao.impl.FileSqlManager.get(FileSqlManager.java:130)
at org.nutz.dao.impl.FileSqlManager.create(FileSqlManager.java:135)
at cn.guanfu.common.db.GFDao.getPageList(GFDao.java:148)
at cn.guanfu.common.db.GFDao.getList(GFDao.java:134)
at cn.guanfu.common.db.GFDao$$FastClassBySpringCGLIB$$4e8fec05.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:738)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:136)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:673)
at cn.guanfu.common.db.GFDao$$EnhancerBySpringCGLIB$$de286127.getList(<generated>)
at cn.guanfu.controller.AdController.random(AdController.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
... 61 common frames omitted