Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-2066

Existing client fails initialization due to upgrade atttempting to create column with no name

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.5.0
    • Labels:
      None

      Description

      When using the latest version from git, starting the queryserver fails, because it tries to run an invalid SQL command on server startup.

      2015-06-24 12:45:19,105 WARN org.apache.phoenix.query.ConnectionQueryServicesImpl: Add column failed due to:org.apache.phoenix.exception.PhoenixParserException: ERROR 601 (42P00): Syntax error. Encountered "<EOF>" at line 1, column 49.
      2015-06-24 12:45:19,106 INFO org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation: Closing zookeeper sessionid=0x14e1d23182d002f
      2015-06-24 12:45:19,363 FATAL org.apache.phoenix.queryserver.server.Main: Unrecoverable service error. Shutting down.
      java.lang.RuntimeException: org.apache.phoenix.exception.PhoenixParserException: ERROR 601 (42P00): Syntax error. Encountered "<EOF>" at line 1, column 49.
              at org.apache.phoenix.queryserver.server.PhoenixMetaFactoryImpl.create(PhoenixMetaFactoryImpl.java:73)
              at org.apache.phoenix.queryserver.server.Main.run(Main.java:203)
              at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
              at org.apache.phoenix.queryserver.server.Main.main(Main.java:226)
      Caused by: org.apache.phoenix.exception.PhoenixParserException: ERROR 601 (42P00): Syntax error. Encountered "<EOF>" at line 1, column 49.
              at org.apache.phoenix.exception.PhoenixParserException.newException(PhoenixParserException.java:33)
              at org.apache.phoenix.parse.SQLParser.parseStatement(SQLParser.java:111)
              at org.apache.phoenix.jdbc.PhoenixStatement$PhoenixStatementParser.parseStatement(PhoenixStatement.java:1097)
              at org.apache.phoenix.jdbc.PhoenixStatement.parseStatement(PhoenixStatement.java:1178)
              at org.apache.phoenix.jdbc.PhoenixStatement.executeUpdate(PhoenixStatement.java:1228)
              at org.apache.phoenix.query.ConnectionQueryServicesImpl.addColumn(ConnectionQueryServicesImpl.java:1837)
              at org.apache.phoenix.query.ConnectionQueryServicesImpl.addColumnsIfNotExists(ConnectionQueryServicesImpl.java:1863)
              at org.apache.phoenix.query.ConnectionQueryServicesImpl.access$500(ConnectionQueryServicesImpl.java:174)
              at org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:1946)
              at org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:1869)
              at org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:77)
              at org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:1869)
              at org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:180)
              at org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.connect(PhoenixEmbeddedDriver.java:132)
              at org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:151)
              at java.sql.DriverManager.getConnection(DriverManager.java:664)
              at java.sql.DriverManager.getConnection(DriverManager.java:208)
              at org.apache.calcite.avatica.jdbc.JdbcMeta.<init>(JdbcMeta.java:342)
              at org.apache.phoenix.queryserver.server.PhoenixMetaFactoryImpl.create(PhoenixMetaFactoryImpl.java:71)
              ... 3 more
      Caused by: NoViableAltException(-1@[])
              at org.apache.phoenix.parse.PhoenixSQLParser.column_name(PhoenixSQLParser.java:2316)
              at org.apache.phoenix.parse.PhoenixSQLParser.column_def(PhoenixSQLParser.java:3505)
              at org.apache.phoenix.parse.PhoenixSQLParser.column_defs(PhoenixSQLParser.java:3430)
              at org.apache.phoenix.parse.PhoenixSQLParser.alter_table_node(PhoenixSQLParser.java:3136)
              at org.apache.phoenix.parse.PhoenixSQLParser.oneStatement(PhoenixSQLParser.java:810)
              at org.apache.phoenix.parse.PhoenixSQLParser.statement(PhoenixSQLParser.java:494)
              at org.apache.phoenix.parse.SQLParser.parseStatement(SQLParser.java:108)
              ... 20 more
      

      The exact SQL it tries to run is this (no column name)

      ALTER TABLE SYSTEM."CATALOG" ADD  IF NOT EXISTS
      

        Attachments

          Activity

            People

            • Assignee:
              jamestaylor James Taylor
              Reporter:
              lukaslalinsky Lukas Lalinsky
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: