Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Error:
java.lang.RuntimeException: Cannot initialize saved query service
at org.apache.lens.server.query.save.SavedQueryServiceImpl.init(SavedQueryServiceImpl.java:75) ~[classes/:na]
at org.apache.hive.service.CompositeService.init(CompositeService.java:59) ~[hive-service-2.1.3-inm-SNAPSHOT.jar:2.1.3-inm-SNAPSHOT]
at org.apache.lens.server.LensServices.init(LensServices.java:252) ~[classes/:na]
at org.apache.lens.server.LensServer.startServices(LensServer.java:117) ~[classes/:na]
at org.apache.lens.server.LensServer.<init>(LensServer.java:84) ~[classes/:na]
at org.apache.lens.server.LensServer.createLensServer(LensServer.java:73) ~[classes/:na]
at org.apache.lens.server.LensServer.main(LensServer.java:173) ~[classes/:na]
Caused by: org.apache.lens.server.api.error.LensException: Error initializing saved query dao
at org.apache.lens.server.query.save.SavedQueryDao.<init>(SavedQueryDao.java:72) ~[classes/:na]
at org.apache.lens.server.query.save.SavedQueryServiceImpl.init(SavedQueryServiceImpl.java:72) ~[classes/:na]
... 6 common frames omitted
Caused by: org.apache.lens.server.api.error.LensException: Cannot create saved query table!
at org.apache.lens.server.query.save.SavedQueryDao.createSavedQueryTableIfNotExists(SavedQueryDao.java:85) ~[classes/:na]
at org.apache.lens.server.query.save.SavedQueryDao.<init>(SavedQueryDao.java:70) ~[classes/:na]
... 7 common frames omitted
Caused by: java.sql.SQLException: Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause Query: CREATE TABLE IF NOT EXISTS saved_query (id int(11) NOT NULL AUTO_INCREMENT,name varchar(255) NOT NULL,description varchar(255) DEFAULT NULL,query longtext,params_json longtext,created_at timestamp DEFAULT CURRENT_TIMESTAMP,updated_at timestamp DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id)) Parameters: []
at org.apache.commons.dbutils.AbstractQueryRunner.rethrow(AbstractQueryRunner.java:363) ~[commons-dbutils-1.5.jar:1.5]
at org.apache.commons.dbutils.QueryRunner.update(QueryRunner.java:490) ~[commons-dbutils-1.5.jar:1.5]
at org.apache.commons.dbutils.QueryRunner.update(QueryRunner.java:420) ~[commons-dbutils-1.5.jar:1.5]
at org.apache.lens.server.query.save.SavedQueryDao.createSavedQueryTableIfNotExists(SavedQueryDao.java:83) ~[classes/:na]
Attachments
Attachments
Issue Links
- is related to
-
LENS-1260 Saved query table not created with mysql 5.7+
- Open