[ 
https://issues.apache.org/jira/browse/CALCITE-1187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15225272#comment-15225272
 ] 

Kevin Liew edited comment on CALCITE-1187 at 4/4/16 11:42 PM:
--------------------------------------------------------------

It looks like it is `-1` over the wire and 4294967295 when we use rapidjson to 
read it as uint32 (side-effect of reading a negative integer into an unsigned 
-type). 


was (Author: kliew):
It looks like it is `-1` over the wire and 4294967295 when we use rapidjson to 
read it as uint32 (side-effect of reading a negative integer into an unsigned 
data-type). But we still get `1` for NoSuchConnectionException.

> JSON error code is misreported as -1
> ------------------------------------
>
>                 Key: CALCITE-1187
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1187
>             Project: Calcite
>          Issue Type: Bug
>          Components: avatica
>    Affects Versions: 1.5.0
>         Environment: Phoenix 4.7.0 release on Calcite 1.5.0
>            Reporter: Kevin Liew
>            Priority: Minor
>              Labels: errorCode, exception
>
> Whereas protobuf error code is 4294967295 for TableNotFoundException
> {code:javascript}
> {
>   "response": "error",
>   "exceptions": [
>     "java.lang.RuntimeException: 
> org.apache.phoenix.schema.TableNotFoundException: ERROR 1012 (42M03): Table 
> undefined. tableName=EMP\n\tat 
> org.apache.calcite.avatica.jdbc.JdbcMeta.propagate(JdbcMeta.java:651)\n\tat 
> org.apache.calcite.avatica.jdbc.JdbcMeta.prepare(JdbcMeta.java:677)\n\tat 
> org.apache.calcite.avatica.remote.LocalService.apply(LocalService.java:177)\n\tat
>  
> org.apache.calcite.avatica.remote.Service$PrepareRequest.accept(Service.java:1113)\n\tat
>  
> org.apache.calcite.avatica.remote.Service$PrepareRequest.accept(Service.java:1091)\n\tat
>  
> org.apache.calcite.avatica.remote.AbstractHandler.apply(AbstractHandler.java:102)\n\tat
>  
> org.apache.calcite.avatica.remote.JsonHandler.apply(JsonHandler.java:43)\n\tat
>  
> org.apache.calcite.avatica.server.AvaticaJsonHandler.handle(AvaticaJsonHandler.java:73)\n\tat
>  
> org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)\n\tat
>  
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)\n\tat
>  org.eclipse.jetty.server.Server.handle(Server.java:497)\n\tat 
> org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)\n\tat 
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:245)\n\tat
>  
> org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)\n\tat
>  
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)\n\tat
>  
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)\n\tat
>  java.lang.Thread.run(Thread.java:745)\nCaused by: 
> org.apache.phoenix.schema.TableNotFoundException: ERROR 1012 (42M03): Table 
> undefined. tableName=EMP\n\tat 
> org.apache.phoenix.compile.FromCompiler$BaseColumnResolver.createTableRef(FromCompiler.java:414)\n\tat
>  
> org.apache.phoenix.compile.FromCompiler$SingleTableColumnResolver.<init>(FromCompiler.java:285)\n\tat
>  
> org.apache.phoenix.compile.FromCompiler.getResolverForQuery(FromCompiler.java:186)\n\tat
>  
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:392)\n\tat
>  
> org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:373)\n\tat
>  
> org.apache.phoenix.jdbc.PhoenixPreparedStatement.getMetaData(PhoenixPreparedStatement.java:223)\n\tat
>  org.apache.calcite.avatica.jdbc.JdbcMeta.prepare(JdbcMeta.java:669)\n\t... 
> 15 more\n"
>   ],
>   "errorMessage": "RuntimeException: 
> org.apache.phoenix.schema.TableNotFoundException: ERROR 1012 (42M03): Table 
> undefined. tableName=EMP -> TableNotFoundException: ERROR 1012 (42M03): Table 
> undefined. tableName=EMP",
>   "errorCode": -1,
>   "sqlState": "00000",
>   "severity": "UNKNOWN",
>   "rpcMetadata": {
>     "response": "rpcMetadata",
>     "serverAddress": "7adb23b9e2ee:8765"
>   }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to