Hi Santiago, I believe its because of the default value issue in mysql Try setting
Open your mysql CLI and run this. (have the session open till you start lens) SET GLOBAL SQL_MODE='ALLOW_INVALID_DATES'; And then start lens. It should work now. Will create to come up with a way to manage this across mysql versions. Meanwhile try this out and let us know if it works. Thanks, On Wed, May 4, 2016 at 11:53 PM, Santiago Gimenez < [email protected]> wrote: > This is the lensserver.log file > > > > 04 may 2016 17:37:45 [76bdbdb2-a848-4d14-b653-799083cdf4ac] [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:75) > ~[classes/:na] > > at > org.apache.hive.service.CompositeService.init(CompositeService.java:59) > ~[hive-service-0.13.4-inm.jar:0.13.4-inm] > > at > org.apache.lens.server.LensServices.init(LensServices.java:235) > ~[classes/:na] > > at > org.apache.lens.server.LensServer.startServices(LensServer.java:134) > ~[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:190) ~[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:70) > ~[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: palabra no esperado: ( 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,updated_at 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] > > ... 8 common frames omitted > > > > *From:* Amruth Sampath [mailto:[email protected]] > *Sent:* Wednesday, May 4, 2016 12:28 > *To:* Santiago Gimenez <[email protected]> > *Cc:* [email protected]; Amruth Sampath <[email protected]> > *Subject:* Re: LENS UI > > > > Whats the error you are getting? > > > > Can you take a look at lensserver.log and paste the stacktrace here? > > > Thanks, > > Amruth S > > (09486075517) > > > > On Wed, May 4, 2016 at 7:43 PM, Santiago Gimenez < > [email protected]> wrote: > > Hi, I’ve done that and the server doesn’t start. My lens-site.xml file > looks like this: > > > > <?xml version="1.0"?> > > <!-- > > > > Licensed to the Apache Software Foundation (ASF) under one > > or more contributor license agreements. See the NOTICE file > > distributed with this work for additional information > > regarding copyright ownership. The ASF licenses this file > > to you under the Apache License, Version 2.0 (the > > "License"); you may not use this file except in compliance > > with the License. You may obtain a copy of the License at > > > > http://www.apache.org/licenses/LICENSE-2.0 > > > > Unless required by applicable law or agreed to in writing, > > software distributed under the License is distributed on an > > "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY > > KIND, either express or implied. See the License for the > > specific language governing permissions and limitations > > under the License. > > > > --> > > <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> > > > > <configuration> > > <property> > > <name>lens.server.drivers</name> > > > <value>hive:org.apache.lens.driver.hive.HiveDriver,jdbc:org.apache.lens.driver.jdbc.JDBCDriver</value> > > </property> > > > > <property> > > <name>hive.metastore.warehouse.dir</name> > > <value>/tmp/hive/warehouse</value> > > </property> > > > > <property> > > <name>lens.server.savedquery.jdbc.dialectclass</name> > > > <value>org.apache.lens.server.query.save.SavedQueryDao$MySQLDialect</value> > > </property> > > > > <property> > > <name>lens.server.servicenames</name> > > <value>savedquery</value> > > </property> > > > > <property> > > <name>lens.server.ws.resourcesnames</name> > > <value>savedquery</value> > > </property> > > </configuration> > > > > *From:* Amruth Sampath [mailto:[email protected]] > *Sent:* Wednesday, May 4, 2016 03:55 > *To:* [email protected] > *Cc:* Santiago Gimenez <[email protected]>; Amruth Sampath < > [email protected]> > *Subject:* Re: LENS UI > > > > Hi Santiago, In your lens-site.xml add savedquery to > 'lens.server.servicenames' and 'lens.server.ws.resourcenames' > > > > and this property > > > > <*property*> > <*name*>lens.server.savedquery.jdbc.dialectclass</*name*> > > <*value*>org.apache.lens.server.query.save.SavedQueryDao$MySQLDialect</*value*> > </*property*> > > > > Let us know if you face any problems. > > > > Thanks, > > > Thanks, > > Amruth S > > (09486075517) > > > > On Wed, May 4, 2016 at 12:14 PM, Ankeet Maini <[email protected]> > wrote: > > + Amruth > > > > Santiago wants to enable Saved query support in the LENS server. Amruth > can you please help him out? > > > > On Tue, 3 May 2016 at 19:48 Ankeet Maini <[email protected]> wrote: > > Issue resolved. Node was the problem. The current node maven plugin seems > to be a problem. I'll look into the issue and send a patch over the weekend. > > On Tue, 3 May 2016 at 19:08 Santiago Gimenez <[email protected]> > wrote: > > > > > > *From:* Santiago Gimenez > *Sent:* Tuesday, May 3, 2016 10:27 > *To:* 'Ankeet Maini' <[email protected]> > *Subject:* RE: LENS UI > > > > There isn’t NodeJS inside lens-ui folder “node”. I’ve also tried to edit > the npm file to see if there was something and it’s empty and the file size > is 0Kb. > > [image: image001.png] > > *From:* Ankeet Maini [mailto:[email protected] > <[email protected]>] > *Sent:* Tuesday, May 3, 2016 10:14 > > > *To:* [email protected]; Santiago Gimenez <[email protected]> > *Subject:* Re: LENS UI > > > > I'm not sure why it's happening like that. Maybe npm isn't recognized that > might mean that NodeJS isn't installed properly. > > > > As part of mvn install, the pom file installs a local copy of NodeJS > inside lens-ui folder "node". > > > > Will it be possible to install NodeJS on your box and then from the root > of lens-ui, do an "npm install && npm start"? > > > > Also, if possible can you share a screen-shot after doing npm start, be > sure to wait a few seconds as it builds the assets. > > On Tue, 3 May 2016 at 18:35 Santiago Gimenez <[email protected]> > wrote: > > The terminal doesn’t show anything when I do ‘npm start’. The file > package.json seems to be configured correctly. > > > > *From:* Ankeet Maini [mailto:[email protected]] > *Sent:* Tuesday, May 3, 2016 09:54 > > > *To:* [email protected]; Santiago Gimenez <[email protected]> > *Subject:* Re: LENS UI > > > > Hi, so when you do > > *-> cd > $HOME/downloads/lens/lens/lens-ui/node/node-v0.10.32-darwin-x64/bin/* > > -> *npm start* > > > > The UI server starts up after building assets, and listens at > localhost:8080. > > > > If started correctly, it should print the following message at the > terminal window. > > > > *Using this as your LENS Server Address: http://0.0.0.0:9999/lensapi/ > <http://0.0.0.0:9999/lensapi/>* > > *If this seems wrong, please edit `lensserver` argument in package.json. > Do not forget to append http://* > > > > *Ad hoc UI server listening at 8082* > > > > Can you see the above message? A terminal log would be helpful. > > Also it doesn't matter on the locations, as long as your server is up on > port 9999, the UI can communicate with it. > > > > > > > > On Tue, 3 May 2016 at 18:14 Santiago Gimenez <[email protected]> > wrote: > > Yeah, I’ve done that but it doesn’t seems to work. I have the server > installed in /usr/local/lens/server and the lens-ui is in > $HOME/downloads/lens/lens/lens-ui. Does that affect in some way? > > The server is running, if I go to <baseurl> shows me the server is running. > > > > *From:* amareshwarisr . [mailto:[email protected]] > *Sent:* Tuesday, May 3, 2016 09:41 > *To:* [email protected]; Santiago Gimenez <[email protected]> > *Subject:* Re: LENS UI > > > > Santiago, > > > > As responded by Ankeet on dev list, can you do npm start and try ? > > > > Thanks > > > > > > On Tue, May 3, 2016 at 5:59 PM, Santiago Gimenez < > [email protected]> wrote: > > Hi, I have Lens running on Ubuntu Server 14.04 and I can’t access the UI. > I’ve compiled the new UI but anyway I can’t access it by entering the > server IP address, port:8082. > > > > > > >
