<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Cannot connect to Phoenix Query Server using JDBC thin client in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-Phoenix-Query-Server-using-JDBC-thin/m-p/124608#M47240</link>
    <description>&lt;P&gt;Thanks, &lt;A rel="user" href="https://community.cloudera.com/users/627/asinghal.html" nodeid="627"&gt;@Ankit Singhal&lt;/A&gt;&lt;/P&gt;&lt;P&gt;This solved the issue.&lt;/P&gt;</description>
    <pubDate>Tue, 29 Nov 2016 22:59:43 GMT</pubDate>
    <dc:creator>yjiang</dc:creator>
    <dc:date>2016-11-29T22:59:43Z</dc:date>
    <item>
      <title>Cannot connect to Phoenix Query Server using JDBC thin client</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-Phoenix-Query-Server-using-JDBC-thin/m-p/124603#M47235</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I could not connect to Phoenix Query Server in HDP2.5 in my Java program using the thin JDBC client. Any advice?&lt;/P&gt;&lt;P&gt;My connection string is: jdbc:phoenix:thin:url=http://localhost:8765. I am using the thin driver: org.apache.phoenix.queryserver.client.Driver.&lt;/P&gt;&lt;PRE&gt;try {
    Class.forName(driver);
    conn = DriverManager.getConnection(connectionString);
} catch(Exception e) {
    logger.error("Failed connecting to database.", e);
}&lt;/PRE&gt;&lt;P&gt;I got the below error:&lt;/P&gt;&lt;PRE&gt;java.lang.RuntimeException: org.apache.phoenix.shaded.com.fasterxml.jackson.core.JsonParseException: Unexpected character ('o' (code 111)): Expected space separating root-level values
 at [Source:
8org.apache.calcite.avatica.proto.Responses$ErrorResponse�
�org.apache.calcite.avatica.com.google.protobuf.InvalidProtocolBufferException: While parsing a protocol message, the input ended unexpectedly in the middle of a field.  This could mean either that the input has been truncated or that an embedded message misreported its own length.
	at org.apache.calcite.avatica.com.google.protobuf.InvalidProtocolBufferException.truncatedMessage(InvalidProtocolBufferException.java:70)
	at org.apache.calcite.avatica.com.google.protobuf.CodedInputStream.skipRawBytesSlowPath(CodedInputStream.java:1293)
	at org.apache.calcite.avatica.com.google.protobuf.CodedInputStream.skipRawBytes(CodedInputStream.java:1276)
	at org.apache.calcite.avatica.com.google.protobuf.CodedInputStream.skipField(CodedInputStream.java:197)
	at org.apache.calcite.avatica.com.google.protobuf.CodedInputStream.skipMessage(CodedInputStream.java:273)
	at org.apache.calcite.avatica.com.google.protobuf.CodedInputStream.skipField(CodedInputStream.java:200)
	at org.apache.calcite.avatica.proto.Common$WireMessage.&amp;lt;init&amp;gt;(Common.java:11627)
	at org.apache.calcite.avatica.proto.Common$WireMessage.&amp;lt;init&amp;gt;(Common.java:11595)
	at org.apache.calcite.avatica.proto.Common$WireMessage$1.parsePartialFrom(Common.java:12061)
	at org.apache.calcite.avatica.proto.Common$WireMessage$1.parsePartialFrom(Common.java:12055)
	at org.apache.calcite.avatica.com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:89)
	at org.apache.calcite.avatica.com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:95)
	at org.apache.calcite.avatica.com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:49)
	at org.apache.calcite.avatica.proto.Common$WireMessage.parseFrom(Common.java:11791)
	at org.apache.calcite.avatica.remote.ProtobufTranslationImpl.parseRequest(ProtobufTranslationImpl.java:354)
	at org.apache.calcite.avatica.remote.ProtobufHandler.decode(ProtobufHandler.java:51)
	at org.apache.calcite.avatica.remote.ProtobufHandler.decode(ProtobufHandler.java:31)
	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:124)
	at org.apache.phoenix.shaded.org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)
	at org.apache.phoenix.shaded.org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
	at org.apache.phoenix.shaded.org.eclipse.jetty.server.Server.handle(Server.java:499)
	at org.apache.phoenix.shaded.org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
	at org.apache.phoenix.shaded.org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
	at org.apache.phoenix.shaded.org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
	at org.apache.phoenix.shaded.org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
	at org.apache.phoenix.shaded.org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
	at java.lang.Thread.run(Thread.java:745)
&lt;/PRE&gt;</description>
      <pubDate>Sun, 27 Nov 2016 22:30:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-Phoenix-Query-Server-using-JDBC-thin/m-p/124603#M47235</guid>
      <dc:creator>yjiang</dc:creator>
      <dc:date>2016-11-27T22:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot connect to Phoenix Query Server using JDBC thin client</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-Phoenix-Query-Server-using-JDBC-thin/m-p/124604#M47236</link>
      <description>&lt;P&gt;can you check that both phoenix query server and phoenix client versions are same.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2016 16:08:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-Phoenix-Query-Server-using-JDBC-thin/m-p/124604#M47236</guid>
      <dc:creator>asinghal</dc:creator>
      <dc:date>2016-11-28T16:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot connect to Phoenix Query Server using JDBC thin client</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-Phoenix-Query-Server-using-JDBC-thin/m-p/124605#M47237</link>
      <description>&lt;P&gt;Both shipped from HDP2.5, should be the same.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2016 22:36:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-Phoenix-Query-Server-using-JDBC-thin/m-p/124605#M47237</guid>
      <dc:creator>yjiang</dc:creator>
      <dc:date>2016-11-28T22:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot connect to Phoenix Query Server using JDBC thin client</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-Phoenix-Query-Server-using-JDBC-thin/m-p/124606#M47238</link>
      <description>&lt;P&gt;can you try adding serialization=PROTOBUF in your connection string. There seems to be property "phoenix.queryserver.serialization mismatch at client and server.&lt;/P&gt;&lt;PRE&gt; jdbc:phoenix:thin:url=http://localhost:8765;serialization=PROTOBUF&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Nov 2016 22:47:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-Phoenix-Query-Server-using-JDBC-thin/m-p/124606#M47238</guid>
      <dc:creator>asinghal</dc:creator>
      <dc:date>2016-11-28T22:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot connect to Phoenix Query Server using JDBC thin client</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-Phoenix-Query-Server-using-JDBC-thin/m-p/124607#M47239</link>
      <description>&lt;P&gt;Yup! This is it. The client is trying to use JSON but the server is configured to use PROTOBUF.&lt;/P&gt;&lt;P&gt;If you want to use JSON (which I do not recommend), set phoenix.queryserver.serialization=JSON in hbase-site.xml and restart the Phoenix Query Server.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2016 22:49:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-Phoenix-Query-Server-using-JDBC-thin/m-p/124607#M47239</guid>
      <dc:creator>elserj</dc:creator>
      <dc:date>2016-11-28T22:49:56Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot connect to Phoenix Query Server using JDBC thin client</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-Phoenix-Query-Server-using-JDBC-thin/m-p/124608#M47240</link>
      <description>&lt;P&gt;Thanks, &lt;A rel="user" href="https://community.cloudera.com/users/627/asinghal.html" nodeid="627"&gt;@Ankit Singhal&lt;/A&gt;&lt;/P&gt;&lt;P&gt;This solved the issue.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2016 22:59:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-Phoenix-Query-Server-using-JDBC-thin/m-p/124608#M47240</guid>
      <dc:creator>yjiang</dc:creator>
      <dc:date>2016-11-29T22:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot connect to Phoenix Query Server using JDBC thin client</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-Phoenix-Query-Server-using-JDBC-thin/m-p/124609#M47241</link>
      <description>&lt;P&gt;it's great that it works for you..so can you accept the answer now so that it will be helpful for other users.

&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2016 15:12:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-Phoenix-Query-Server-using-JDBC-thin/m-p/124609#M47241</guid>
      <dc:creator>asinghal</dc:creator>
      <dc:date>2016-12-01T15:12:03Z</dc:date>
    </item>
  </channel>
</rss>

