The Timeline tab in TAC does not display the execution history

Problem Description

The TAC Timeline tab does not display the execution history, and the following error is noticed:

org.talend.administrator.common.exception.DBException could not execute query

 

Below is the stack trace captured in TAC technical log:

2017-11-22 13:23:58 ERROR TalendRemoteServiceServlet - org.talend.administrator.common.exception.DBException: could not execute query 
java.util.concurrent.ExecutionException: org.talend.administrator.common.exception.DBException: could not execute query 
at java.util.concurrent.FutureTask.report(Unknown Source) 
at java.util.concurrent.FutureTask.get(Unknown Source) 
at org.talend.gwtadministrator.server.dashboard.view.TaskExecutionHistoryViewAdapter.getTimelineEvents(TaskExecutionHistoryViewAdapter.java:418) 
at org.talend.gwtadministrator.server.dashboard.services.TaskExecutionHistoryServiceImpl.getTimelineEvents(TaskExecutionHistoryServiceImpl.java:148) 
at sun.reflect.GeneratedMethodAccessor526.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:561)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
at org.talend.gwttoolkit.server.TalendRemoteServiceServlet.processCall(TalendRemoteServiceServlet.java:104)
at org.talend.gwtadministrator.server.LoggedAndLicenseCheckRemoteServiceServlet.processCall(LoggedAndLicenseCheckRemoteServiceServlet.java:36)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:644)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.talend.gwttoolkit.server.common.http.HeadersFilter.doFilter(HeadersFilter.java:55)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:516)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1086)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:659)
at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1558)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1515)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)
Caused by: org.talend.administrator.common.exception.DBException: could not execute query
at org.talend.administrator.scheduler.persistence.helper.TaskExecutionHistoryHelper.getAggregatedExecutions(TaskExecutionHistoryHelper.java:1464)
at org.talend.gwtadministrator.server.dashboard.view.TaskExecutionHistoryViewAdapter.getPastExecutionsForTimeline(TaskExecutionHistoryViewAdapter.java:618)
at org.talend.gwtadministrator.server.dashboard.view.TaskExecutionHistoryViewAdapter.access$000(TaskExecutionHistoryViewAdapter.java:82)
at org.talend.gwtadministrator.server.dashboard.view.TaskExecutionHistoryViewAdapter$1.call(TaskExecutionHistoryViewAdapter.java:402)
at org.talend.gwtadministrator.server.dashboard.view.TaskExecutionHistoryViewAdapter$1.call(TaskExecutionHistoryViewAdapter.java:398)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
... 1 more
Caused by: org.hibernate.exception.SQLGrammarException: could not execute query
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.loader.Loader.doList(Loader.java:2147)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2028)
at org.hibernate.loader.Loader.list(Loader.java:2023)
at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:289)
at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1695)
at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:142)
at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:150)
at org.talend.administrator.scheduler.persistence.helper.TaskExecutionHistoryHelper.getAggregatedExecutions(TaskExecutionHistoryHelper.java:1453)
... 8 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expression #4 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'TAC.taskexecutionhistory.idquartzjob' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
at sun.reflect.GeneratedConstructorAccessor409.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
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:3970)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3906)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2524)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2677)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2549)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1861)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1962)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1668)
at org.hibernate.loader.Loader.doQuery(Loader.java:662)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
at org.hibernate.loader.Loader.doList(Loader.java:2144)
... 15 more

Root Cause

 

As of MySQL 5.7.5, the default SQL mode includes ONLY_FULL_GROUP_BY. For more information, see the MySQL documentation, 5.1.10 Server SQL Modes page.

 

Perform the following steps to reproduce the issue:

  1. In Windows: Update the C:\ProgramData\MySQL\MySQL Server 5.7\my.ini file by adding:

     ONLY_FULL_GROUP_BY : # Set the SQL mode to strict sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION,ONLY_FULL_GROUP_BY"
  2. Restart mysqld.

  3. Start TAC.

  4. Log in to TAC and click Menu > Monitoring > Timeline the stack trace is captured in TAC technical log.

 

Solution

This is a known bug. This issue is fixed in Talend 6.3.2 and 6.4.1.

 

Workaround:

Edit the mysql configuration file and remove ONLY_FULL_GROUP_BY.

 

Note: This option is enabled by default from MYSQL5.7.5.

Version history
Revision #:
10 of 10
Last update:
‎04-13-2019 12:48 PM
Updated by: