zhoufengjob / ddcms

一个后端基于jboot,前端使用layui实现的权限管理系统,集成Shiro管理权限.
Apache License 2.0
45 stars 15 forks source link

Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'dms.dms_article.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:422) #2

Open cjaack2 opened 5 years ago

cjaack2 commented 5 years ago

启动之后输入http://127.0.0.1:8080/出现以下错误

---------------Paras: []---------------- Sql: SELECT * FROM dms_article WHERE dms_article.is_top = 'on' GROUP BY dms_article.create_time

2019-05-24 00:22:30.166 [ERROR] io.jboot.web.handler.JbootActionHandler - / com.jfinal.plugin.activerecord.ActiveRecordException: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'dms.dms_article.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by at com.jfinal.plugin.activerecord.Model.find(Model.java:586) at io.jboot.db.model.JbootModel.find(JbootModel.java:686) at com.jfinal.plugin.activerecord.Model.find(Model.java:596) at com.daimengshi.ddcms.service.provider.DmsArticleServiceImpl.getTopArticleList(DmsArticleServiceImpl.java:52) at com.daimengshi.ddcms.home.controller.HomeIndexController.index(HomeIndexController.java:32) 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:497) at com.jfinal.aop.Invocation.invoke(Invocation.java:73) at com.daimengshi.ddcms.interceptor.BusinessExceptionInterceptor.intercept(BusinessExceptionInterceptor.java:29) at com.jfinal.aop.Invocation.invoke(Invocation.java:67) at com.daimengshi.ddcms.interceptor.NotNullParaInterceptor.intercept(NotNullParaInterceptor.java:33) at com.jfinal.aop.Invocation.invoke(Invocation.java:67) at com.daimengshi.ddcms.admin.support.log.LogInterceptor.intercept(LogInterceptor.java:51) at com.jfinal.aop.Invocation.invoke(Invocation.java:67) at com.daimengshi.ddcms.admin.interceptor.AdminInterceptor.intercept(AdminInterceptor.java:59) at com.jfinal.aop.Invocation.invoke(Invocation.java:67) at io.jboot.web.fixedinterceptor.FixedInvocation.invoke(FixedInvocation.java:46) at io.jboot.component.metric.JbootMetricInterceptor.intercept(JbootMetricInterceptor.java:95) at io.jboot.web.fixedinterceptor.FixedInvocation.invoke(FixedInvocation.java:44) at io.jboot.component.opentracing.OpentracingInterceptor.intercept(OpentracingInterceptor.java:49) at io.jboot.web.fixedinterceptor.FixedInvocation.invoke(FixedInvocation.java:44) at io.jboot.component.shiro.JbootShiroInterceptor.intercept(JbootShiroInterceptor.java:44) at io.jboot.web.fixedinterceptor.FixedInvocation.invoke(FixedInvocation.java:44) at io.jboot.web.controller.validate.ParaValidateInterceptor.intercept(ParaValidateInterceptor.java:47) at io.jboot.web.fixedinterceptor.FixedInvocation.invoke(FixedInvocation.java:44) at io.jboot.web.cors.CORSInterceptor.intercept(CORSInterceptor.java:46) at io.jboot.web.fixedinterceptor.FixedInvocation.invoke(FixedInvocation.java:44) at io.jboot.web.limitation.LimitationInterceptor.intercept(LimitationInterceptor.java:53) at io.jboot.web.fixedinterceptor.FixedInvocation.invoke(FixedInvocation.java:44) at io.jboot.web.handler.JbootActionHandler.invokeInvocation(JbootActionHandler.java:185) at io.jboot.web.handler.JbootActionHandler.handle(JbootActionHandler.java:88) at com.jfinal.ext.handler.ContextPathHandler.handle(ContextPathHandler.java:48) at io.jboot.web.handler.JbootHandler.doHandle(JbootHandler.java:75) at io.jboot.web.handler.JbootHandler.handle(JbootHandler.java:62) at io.jboot.web.cache.ActionCacheHandler.handle(ActionCacheHandler.java:64) at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:73) at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61) at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108) at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137) at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66) at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449) at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365) at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383) at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362) at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) 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.ServletChain$1.handleRequest(ServletChain.java:64) 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:332) at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'dms.dms_article.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:422) at com.mysql.jdbc.Util.handleNewInstance(Util.java:425) at com.mysql.jdbc.Util.getInstance(Util.java:408) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:943) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2527) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2680) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2490) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1858) at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1966) at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52) at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java) at com.jfinal.plugin.activerecord.Model.find(Model.java:567) at com.jfinal.plugin.activerecord.Model.find(Model.java:584) ... 81 common frames omitted

cjaack2 commented 5 years ago

小菜鸟求指导,课程已经买了