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

Cheyenne commented on PHOENIX-3044:
-----------------------------------

hey dont know if this will help but the error was thrown by a default case in 
avatica:

    switch (rep) {
    case BYTE:
      return ((Number) value).byteValue();
    case SHORT:
      return ((Number) value).shortValue();
    case INTEGER:
    case JAVA_SQL_DATE:
    case JAVA_SQL_TIME:
      return ((Number) value).intValue();
    case LONG:
    case JAVA_UTIL_DATE:
    case JAVA_SQL_TIMESTAMP:
      return ((Number) value).longValue();
    case FLOAT:
      return ((Number) value).floatValue();
    case DOUBLE:
      return ((Number) value).doubleValue();
    case NUMBER:
      return value instanceof BigDecimal ? value
          : value instanceof BigInteger ? new BigDecimal((BigInteger) value)
          : value instanceof Double ? new BigDecimal((Double) value)
          : value instanceof Float ? new BigDecimal((Float) value)
          : new BigDecimal(((Number) value).longValue());
    case BYTE_STRING:
      return ByteString.ofBase64((String) value);
    default:
      throw new IllegalArgumentException("cannot convert " + value + " ("
          + value.getClass() + ") to " + rep);
    }

> Whenever I try to prepare then execute a query it fails, but 
> prepareAndExecute works fine, avatica protobufs
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-3044
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3044
>             Project: Phoenix
>          Issue Type: Bug
>         Environment: HdInsight on Microsoft's Azure
>            Reporter: Cheyenne
>
> the error I get is "IllegalArgumentException: cannot convert false (class 
> java.lang.Boolean) to PRIMITIVE_BOOLEAN ����*000002"
> Full error returned when I execute the prepared statement:
> �java.lang.IllegalArgumentException: cannot convert false (class 
> java.lang.Boolean) to PRIMITIVE_BOOLEAN
>       at 
> org.apache.calcite.avatica.remote.TypedValue.serialToLocal(TypedValue.java:242)
>       at 
> org.apache.calcite.avatica.remote.TypedValue.serialToJdbc(TypedValue.java:309)
>       at 
> org.apache.calcite.avatica.remote.TypedValue.toJdbc(TypedValue.java:290)
>       at org.apache.calcite.avatica.jdbc.JdbcMeta.execute(JdbcMeta.java:793)
>       at 
> org.apache.calcite.avatica.remote.LocalService.apply(LocalService.java:234)
>       at 
> org.apache.calcite.avatica.remote.Service$ExecuteRequest.accept(Service.java:1167)
>       at 
> org.apache.calcite.avatica.remote.Service$ExecuteRequest.accept(Service.java:1145)
>       at 
> org.apache.calcite.avatica.remote.AbstractHandler.apply(AbstractHandler.java:102)
>       at 
> org.apache.calcite.avatica.remote.ProtobufHandler.apply(ProtobufHandler.java:38)
>       at 
> org.apache.calcite.avatica.server.AvaticaProtobufHandler.handle(AvaticaProtobufHandler.java:68)
>       at 
> org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)
>       at 
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
>       at org.eclipse.jetty.server.Server.handle(Server.java:499)
>       at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
>       at 
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
>       at 
> org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
>       at 
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
>       at 
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
>       at java.lang.Thread.run(Thread.java:745)
> ]IllegalArgumentException: cannot convert false (class java.lang.Boolean) to 
> PRIMITIVE_BOOLEAN ����*000002



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

Reply via email to