Uploaded image for project: 'Apache Lens (Retired)'
  1. Apache Lens (Retired)
  2. LENS-1250

Error while initializing saved query service on server start

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.6
    • 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

        1. LENS-1250.2016-08-02_14:55:02.patch
          0.8 kB
          Rajat Khandelwal

        Issue Links

          Activity

            People

              prongs Rajat Khandelwal
              archana.h Archana H
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: