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

Istvan Toth commented on PHOENIX-6602:
--------------------------------------

Yes, this is happens in Avatica, it is, not something that Phoenix can do 
anything about.

However, this doesn't look like a bug to me.
You are creating an invalid request. 
The point of has_parameter_values is to tell if you pass any parameters.
You are not getting a "pretty" error message, but nothing breaks.

> NullPointerException when send ExectuteRequest via protobuf with no parameters
> ------------------------------------------------------------------------------
>
>                 Key: PHOENIX-6602
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-6602
>             Project: Phoenix
>          Issue Type: Bug
>          Components: queryserver
>    Affects Versions: queryserver-6.0.0
>         Environment: 
>            Reporter: Aleksey Stavrov
>            Priority: Major
>
> ExecuteRequest has following format:
> {noformat}
> message ExecuteRequest {
>   StatementHandle statementHandle = 1;
>   repeated TypedValue parameter_values = 2;
>   uint64 deprecated_first_frame_max_size = 3;
>   bool has_parameter_values = 4;
>   int32 first_frame_max_size = 5;
> }
> {noformat}
> When i try to set *_has_parameter_values_* to _*false*_ and set 0 parameters 
> then i get error:
> {noformat}
> 'protocol' => {
>                 'severity' => 0,
>                 'exceptions' => [
>                                 'java.lang.NullPointerException
>       at 
> org.apache.calcite.avatica.MetaImpl.checkParameterValueHasNull(MetaImpl.java:1633)
>       at org.apache.calcite.avatica.jdbc.JdbcMeta.execute(JdbcMeta.java:849)
>       at 
> org.apache.calcite.avatica.remote.LocalService.apply(LocalService.java:260)
>       at 
> org.apache.calcite.avatica.remote.Service$ExecuteRequest.accept(Service.java:1056)
>       at 
> org.apache.calcite.avatica.remote.Service$ExecuteRequest.accept(Service.java:1026)
>       at 
> org.apache.calcite.avatica.remote.AbstractHandler.apply(AbstractHandler.java:94)
>       at 
> org.apache.calcite.avatica.remote.ProtobufHandler.apply(ProtobufHandler.java:46)
>       at 
> org.apache.calcite.avatica.server.AvaticaProtobufHandler.handle(AvaticaProtobufHandler.java:134)
>       at 
> org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:59)
>       at 
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
>       at org.eclipse.jetty.server.Server.handle(Server.java:501)
>       at 
> org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383)
>       at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:556)
>       at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375)
>       at 
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)
>       at 
> org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
>       at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
>       at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
>       at 
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
>       at 
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
>       at 
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
>       at 
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
>       at 
> org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
>       at 
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)
>       at 
> org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
>       at java.lang.Thread.run(Thread.java:748)
> '],
>     'message' => 'NullPointerException: (null exception message)',
>     'sql_state' => '00000',
>     'error_code' => 4294967295
> }
> {noformat}
> It work well when *_parameter_values_* is not empty list.
> Perhaps it was necessary to create issue in calcite avatica project, but I 
> decided to try it here, since I still use queryserver.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to