title: Phoenix Error while trying to create table
body: <p>When I either log in to sqlline.py in phoenix or I try to create table in phoenix through api's I get  an exception.</p>
  
  <p>With my limited knowledge of phenix I am unable to figure out why phoenix is checking for System.Catalog table even before it creates it.Any help will be greatly appreciated.</p>
  
  <p>StackTrace:</p>
  
  <p>*4/11/18 06:07:18 WARN client.HConnectionManager$HConnectionImplementation: Encountered problems when prefetch META table: </p>
  
  <pre><code>org.apache.hadoop.hbase.TableNotFoundException: Cannot find row in .META. for table: SYSTEM.CATALOG, row=SYSTEM.CATALOG,\x00SYSTEM\x00CATALOG,99999999999999
      at org.apache.hadoop.hbase.client.MetaScanner.metaScan(MetaScanner.java:151)
      at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.prefetchRegionCache(HConnectionManager.java:1059)
      at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegionInMeta(HConnectionManager.java:1121)
      at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:1001)
      at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:958)
      at org.apache.phoenix.query.ConnectionQueryServicesImpl.metaDataCoprocessorExec(ConnectionQueryServicesImpl.java:914)
      at org.apache.phoenix.query.ConnectionQueryServicesImpl.createTable(ConnectionQueryServicesImpl.java:1053)
      at org.apache.phoenix.schema.MetaDataClient.createTableInternal(MetaDataClient.java:1156)
      at org.apache.phoenix.schema.MetaDataClient.createTable(MetaDataClient.java:422)
      at org.apache.phoenix.compile.CreateTableCompiler$2.execute(CreateTableCompiler.java:183)
      at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:226)
      at org.apache.phoenix.jdbc.PhoenixStatement.executeUpdate(PhoenixStatement.java:908)
      at org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:1351)
      at org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:131)
      at org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.connect(PhoenixEmbeddedDriver.java:112)
      at sqlline.SqlLine$DatabaseConnection.connect(SqlLine.java:4650)
      at sqlline.SqlLine$DatabaseConnection.getConnection(SqlLine.java:4701)
      at sqlline.SqlLine$Commands.connect(SqlLine.java:3942)
      at sqlline.SqlLine$Commands.connect(SqlLine.java:3851)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at sqlline.SqlLine$ReflectiveCommandHandler.execute(SqlLine.java:2810)
      at sqlline.SqlLine.dispatch(SqlLine.java:817)
      at sqlline.SqlLine.initArgs(SqlLine.java:633)
      at sqlline.SqlLine.begin(SqlLine.java:680)
      at sqlline.SqlLine.mainWithInputRedirection(SqlLine.java:441)
      at sqlline.SqlLine.main(SqlLine.java:424)
  Error: SYSTEM.CATALOG (state=08000,code=101)
  org.apache.phoenix.exception.PhoenixIOException: SYSTEM.CATALOG
      at org.apache.phoenix.util.ServerUtil.parseServerException(ServerUtil.java:97)
      at org.apache.phoenix.query.ConnectionQueryServicesImpl.metaDataCoprocessorExec(ConnectionQueryServicesImpl.java:935)
      at org.apache.phoenix.query.ConnectionQueryServicesImpl.createTable(ConnectionQueryServicesImpl.java:1053)
      at org.apache.phoenix.schema.MetaDataClient.createTableInternal(MetaDataClient.java:1156)
      at org.apache.phoenix.schema.MetaDataClient.createTable(MetaDataClient.java:422)
      at org.apache.phoenix.compile.CreateTableCompiler$2.execute(CreateTableCompiler.java:183)
      at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:226)
      at org.apache.phoenix.jdbc.PhoenixStatement.executeUpdate(PhoenixStatement.java:908)
      at org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:1351)
      at org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:131)
      at org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.connect(PhoenixEmbeddedDriver.java:112)
      at sqlline.SqlLine$DatabaseConnection.connect(SqlLine.java:4650)
      at sqlline.SqlLine$DatabaseConnection.getConnection(SqlLine.java:4701)
      at sqlline.SqlLine$Commands.connect(SqlLine.java:3942)
      at sqlline.SqlLine$Commands.connect(SqlLine.java:3851)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at sqlline.SqlLine$ReflectiveCommandHandler.execute(SqlLine.java:2810)
      at sqlline.SqlLine.dispatch(SqlLine.java:817)
      at sqlline.SqlLine.initArgs(SqlLine.java:633)
      at sqlline.SqlLine.begin(SqlLine.java:680)
      at sqlline.SqlLine.mainWithInputRedirection(SqlLine.java:441)
      at sqlline.SqlLine.main(SqlLine.java:424)
  Caused by: org.apache.hadoop.hbase.TableNotFoundException: SYSTEM.CATALOG
      at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegionInMeta(HConnectionManager.java:1139)
      at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:1001)
      at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:958)
      at org.apache.phoenix.query.ConnectionQueryServicesImpl.metaDataCoprocessorExec(ConnectionQueryServicesImpl.java:914)
      ... 23 more*
  </code></pre>