异常Error: ERROR 1012 (42M03): Table undefined. (state=42M03,code=1012)

Posted questionszhang

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了异常Error: ERROR 1012 (42M03): Table undefined. (state=42M03,code=1012)相关的知识,希望对你有一定的参考价值。

1 详细异常信息

Error: ERROR 1012 (42M03): Table undefined. (state=42M03,code=1012)
org.apache.phoenix.schema.TableNotFoundException: ERROR 1012 (42M03): Table undefined.
    at org.apache.phoenix.exception.SQLExceptionCode$9.newException(SQLExceptionCode.java:222)
    at org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:150)
    at org.apache.phoenix.util.ServerUtil.parseRemoteException(ServerUtil.java:189)
    at org.apache.phoenix.util.ServerUtil.parseServerExceptionOrNull(ServerUtil.java:173)
    at org.apache.phoenix.util.ServerUtil.parseServerException(ServerUtil.java:140)
    at org.apache.phoenix.query.ConnectionQueryServicesImpl.metaDataCoprocessorExec(ConnectionQueryServicesImpl.java:1379)
    at org.apache.phoenix.query.ConnectionQueryServicesImpl.metaDataCoprocessorExec(ConnectionQueryServicesImpl.java:1343)
    at org.apache.phoenix.query.ConnectionQueryServicesImpl.getTable(ConnectionQueryServicesImpl.java:1560)
    at org.apache.phoenix.schema.MetaDataClient.updateCache(MetaDataClient.java:644)
    at org.apache.phoenix.schema.MetaDataClient.updateCache(MetaDataClient.java:538)
    at org.apache.phoenix.compile.FromCompiler$BaseColumnResolver.createTableRef(FromCompiler.java:573)
    at org.apache.phoenix.compile.FromCompiler$MultiTableColumnResolver.visit(FromCompiler.java:778)
    at org.apache.phoenix.compile.FromCompiler$MultiTableColumnResolver.visit(FromCompiler.java:736)
    at org.apache.phoenix.parse.NamedTableNode.accept(NamedTableNode.java:76)
    at org.apache.phoenix.compile.FromCompiler$MultiTableColumnResolver.visit(FromCompiler.java:771)
    at org.apache.phoenix.compile.FromCompiler$MultiTableColumnResolver.visit(FromCompiler.java:736)
    at org.apache.phoenix.parse.JoinTableNode.accept(JoinTableNode.java:81)
    at org.apache.phoenix.compile.FromCompiler$MultiTableColumnResolver.visit(FromCompiler.java:770)
    at org.apache.phoenix.compile.FromCompiler$MultiTableColumnResolver.visit(FromCompiler.java:736)
    at org.apache.phoenix.parse.JoinTableNode.accept(JoinTableNode.java:81)
    at org.apache.phoenix.compile.FromCompiler.getResolverForQuery(FromCompiler.java:231)
    at org.apache.phoenix.compile.FromCompiler.getResolverForQuery(FromCompiler.java:206)
    at org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:482)
    at org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:456)
    at org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:302)
    at org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:291)
    at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
    at org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:290)
    at org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:283)
    at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1830)
    at sqlline.Commands.execute(Commands.java:822)
    at sqlline.Commands.sql(Commands.java:732)
    at sqlline.SqlLine.dispatch(SqlLine.java:813)
    at sqlline.SqlLine.begin(SqlLine.java:686)
    at sqlline.SqlLine.start(SqlLine.java:398)
    at sqlline.SqlLine.main(SqlLine.java:291)

  

 

2 解决方案

 
 
按照之前手动的方式 删除了二级索引,再建也建不了,删除也删除不了。各种方法都不管用
 
之前被建索引的表,连查询都查询不了,也是报这个错误
 
然后 ,再次用手动的方法删除了被建索引的表然后重建。就解决了问题 

以上是关于异常Error: ERROR 1012 (42M03): Table undefined. (state=42M03,code=1012)的主要内容,如果未能解决你的问题,请参考以下文章

北大OJ的1012题java做出莫名奇妙的runtime error

错误:[异常...“访问受限 URI 被拒绝”...在调用 $.ajax 方法时

在error日志打印异常

MySQL Error--Error Code

将 PDO 异常记录到 error_reporting 和 error_log

Java异常