[ https://issues.apache.org/jira/browse/LENS-776?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Amruth S updated LENS-776: -------------------------- Attachment: LENS-776.patch Patch file. mvn clean install : [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] Lens Checkstyle Rules .............................. SUCCESS [ 2.750 s] [INFO] Lens ............................................... SUCCESS [ 3.725 s] [INFO] Lens API ........................................... SUCCESS [ 31.822 s] [INFO] Lens API for server and extensions ................. SUCCESS [ 33.170 s] [INFO] Lens Cube .......................................... SUCCESS [06:20 min] [INFO] Lens DB storage .................................... SUCCESS [ 22.835 s] [INFO] Lens Query Library ................................. SUCCESS [ 23.094 s] [INFO] Lens Hive Driver ................................... SUCCESS [03:22 min] [INFO] Lens Driver for JDBC ............................... SUCCESS [ 48.352 s] [INFO] Lens Elastic Search Driver ......................... SUCCESS [ 24.133 s] [INFO] Lens Server ........................................ SUCCESS [08:58 min] [INFO] Lens client ........................................ SUCCESS [ 45.832 s] [INFO] Lens CLI ........................................... SUCCESS [03:56 min] [INFO] Lens Examples ...................................... SUCCESS [ 13.695 s] [INFO] Lens Distribution .................................. SUCCESS [ 14.773 s] [INFO] Lens ML Lib ........................................ SUCCESS [02:01 min] [INFO] Lens ML Ext Distribution ........................... SUCCESS [ 5.419 s] [INFO] Lens Regression .................................... SUCCESS [ 18.560 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 29:28 min [INFO] Finished at: 2015-09-17T10:11:49+05:30 [INFO] Final Memory: 179M/809M [INFO] ------------------------------------------------------------------------ > Lens Server not Starting if there is a failure in creating "saved query" table > ------------------------------------------------------------------------------ > > Key: LENS-776 > URL: https://issues.apache.org/jira/browse/LENS-776 > Project: Apache Lens > Issue Type: Bug > Reporter: Arshad Matin > Assignee: Amruth S > Attachments: LENS-776.patch > > > This is coming with the default config and i was using MySql db > {noformat} > <property> > <name>lens.server.savedquery.jdbc.dialectclass</name> > <value>org.apache.lens.server.query.save.SavedQueryDao$HSQLDialect</value> > <description>Dialect of the target DB, Default is HSQL. Override with the > target DB used.</description> > </property> > {noformat} > Even with HSQL, saved_query table creation failure shouldnt stop lens server > from coming up. > Exception > {noformat} > 16 Sep 2015 08:17:34 [0bd00660-d2d0-42a6-bdc6-e8b31e895da6] [main] ERROR > org.apache.lens.server.LensServer - Error while creating Lens server > java.lang.RuntimeException: Cannot initialize saved query service > at > org.apache.lens.server.query.save.SavedQueryServiceImpl.init(SavedQueryServiceImpl.java:69) > ~[classes/:na] > at > org.apache.hive.service.CompositeService.init(CompositeService.java:59) > ~[hive-service-0.13.3-inm.jar:0.13.3-inm] > at org.apache.lens.server.LensServices.init(LensServices.java:235) > ~[classes/:na] > at > org.apache.lens.server.LensServer.startServices(LensServer.java:135) > ~[classes/:na] > at org.apache.lens.server.LensServer.<init>(LensServer.java:85) > ~[classes/:na] > at > org.apache.lens.server.LensServer.createLensServer(LensServer.java:74) > ~[classes/:na] > at org.apache.lens.server.LensServer.main(LensServer.java:191) > ~[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:64) > ~[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: You have an error in your SQL syntax; check > the manual that corresponds to your MySQL server version for the right syntax > to use near 'GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, name varchar(255), > description var' at line 1 Query: CREATE TABLE if not exists saved_query (id > int GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, name varchar(255), > description varchar(255), query varchar(255), params_json varchar(255), > created_at timestamp, updated_at timestamp) 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] > ... 8 common frames omitted > 16 Sep 2015 08:17:34 [0bd00660-d2d0-42a6-bdc6-e8b31e895da6] [main] INFO > org.apache.lens.server.LensServices - Stopping lens server > 16 Sep 2015 08:17:34 [0bd00660-d2d0-42a6-bdc6-e8b31e895da6] [main] INFO > org.apache.lens.server.LensServices - Server restart is not enabled. Not > persisting the server state > 16 Sep 2015 08:17:34 [0bd00660-d2d0-42a6-bdc6-e8b31e895da6] [main] INFO > org.apache.hive.service.CompositeService - Error stopping query > java.lang.NullPointerException: null > at > org.apache.lens.server.query.QueryExecutionServiceImpl.stop(QueryExecutionServiceImpl.java:1129) > ~[classes/:na] > at > org.apache.hive.service.CompositeService.stop(CompositeService.java:102) > [hive-service-0.13.3-inm.jar:0.13.3-inm] > at > org.apache.hive.service.CompositeService.stop(CompositeService.java:92) > [hive-service-0.13.3-inm.jar:0.13.3-inm] > at org.apache.lens.server.LensServices.stop(LensServices.java:402) > [classes/:na] > at org.apache.lens.server.LensServer.main(LensServer.java:201) > [classes/:na] > 16 Sep 2015 08:17:34 [0bd00660-d2d0-42a6-bdc6-e8b31e895da6] [main] INFO > org.apache.lens.server.EventServiceImpl - Removed listener > org.apache.lens.server.metrics.MetricsServiceImpl$AsyncQueryStatusListener@3ddc6915 > 16 Sep 2015 08:17:34 [0bd00660-d2d0-42a6-bdc6-e8b31e895da6] [main] INFO > org.apache.lens.server.metrics.MetricsServiceImpl - Stopped metrics service > 16 Sep 2015 08:17:34 [0bd00660-d2d0-42a6-bdc6-e8b31e895da6] [main] INFO > org.apache.lens.server.EventServiceImpl - Event service stopped > 16 Sep 2015 08:17:34 [0bd00660-d2d0-42a6-bdc6-e8b31e895da6] [main] ERROR > org.apache.lens.server.LensServer - Error stopping services > java.lang.NullPointerException: null > at org.apache.lens.server.LensServices.stop(LensServices.java:395) > ~[classes/:na] > at org.apache.lens.server.LensServer.main(LensServer.java:201) > ~[classes/:na] > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)