JPressProjects / jpress

JPress,一个使用 Java 开发的建站神器,目前已经有 10w+ 网站使用 JPress 进行驱动,其中包括多个政府机构,200+上市公司,中科院、红+字会等。
http://www.jpress.cn
GNU Lesser General Public License v3.0
2.68k stars 1.18k forks source link

在一个文章有2个或以上标签的时候回出现这个报错 #116

Closed hawaker closed 5 years ago

hawaker commented 5 years ago

500 Internal Server Error com.jfinal.plugin.activerecord.ActiveRecordException : com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expression #25 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'blog.xiaoyuhao.org.m.category_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:662) at io.jboot.db.model.JbootModel.find(JbootModel.java:515) at io.jpress.module.article.service.provider.ArticleServiceProvider.findRelevantListByArticleId(ArticleServiceProvider.java:383) at io.jboot.aop.interceptor.JFinalBeforeInvocation.invoke(JFinalBeforeInvocation.java:49) at io.jboot.aop.interceptor.cache.JbootCacheInterceptor.intercept(JbootCacheInterceptor.java:43) at io.jboot.aop.interceptor.JFinalBeforeInvocation.invoke(JFinalBeforeInvocation.java:46) at io.jboot.aop.interceptor.cache.JbootCachePutInterceptor.intercept(JbootCachePutInterceptor.java:39) at io.jboot.aop.interceptor.JFinalBeforeInvocation.invoke(JFinalBeforeInvocation.java:46) at io.jboot.aop.interceptor.cache.JbootCachesEvictInterceptor.intercept(JbootCachesEvictInterceptor.java:43) at io.jboot.aop.interceptor.JFinalBeforeInvocation.invoke(JFinalBeforeInvocation.java:46) at io.jboot.aop.interceptor.cache.JbootCacheEvictInterceptor.intercept(JbootCacheEvictInterceptor.java:37) at io.jboot.aop.interceptor.JFinalBeforeInvocation.invoke(JFinalBeforeInvocation.java:46) at io.jboot.aop.interceptor.AopInterceptor.doJFinalAOPInvoke(AopInterceptor.java:136) at io.jboot.aop.interceptor.AopInterceptor.invoke(AopInterceptor.java:60) at io.jpress.module.article.directive.RelevantArticlesDirective.onRender(RelevantArticlesDirective.java:55) at io.jboot.web.directive.base.JbootDirectiveBase.exec(JbootDirectiveBase.java:49) at com.jfinal.template.stat.ast.StatList.exec(StatList.java:68) at com.jfinal.template.stat.ast.Define.call(Define.java:105) at com.jfinal.template.stat.ast.Call.exec(Call.java:49) at com.jfinal.template.stat.ast.StatList.exec(StatList.java:68) at com.jfinal.template.stat.ast.Define.call(Define.java:105) at com.jfinal.template.stat.ast.Call.exec(Call.java:49) at com.jfinal.template.stat.ast.StatList.exec(StatList.java:68) at com.jfinal.template.Template.render(Template.java:79) at com.jfinal.template.Template.renderToString(Template.java:99) at io.jpress.web.render.TemplateRender.render(TemplateRender.java:75) at io.jboot.web.handler.JbootActionHandler.handle(JbootActionHandler.java:128) at io.jboot.web.handler.JbootHandler.doHandle(JbootHandler.java:73) at io.jboot.web.handler.JbootHandler.handle(JbootHandler.java:58) at io.jboot.web.cache.ActionCacheHandler.handle(ActionCacheHandler.java:64) at io.jboot.web.handler.JbootFilterHandler.handle(JbootFilterHandler.java:46) at io.jpress.web.handler.JPressHandler.handle(JPressHandler.java:62) at io.jpress.core.install.InstallHandler.handle(InstallHandler.java:30) at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:86) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) Powered by Jboot

JPressProjects commented 5 years ago

这个是数据库的配置问题,而不是jpress的问题。