You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@phoenix.apache.org by Cheyenne Forbes <ch...@gmail.com> on 2017/03/02 05:10:01 UTC

Squirrel SQL Client doesnt work with phoenix-4.9.0-HBase-1.2

I've used Squirrel SQL Client before but now I'm trying Squirrel'
snapshot-20170214_2214 with phoenix-4.9.0-HBase-1.2-client.jar it wont work.

URL field: jdbc:phoenix:thin:url=http://172.17.0.2:8765

Class name: org.apache.phoenix.queryserver.client.Driver

Error:











































*java.util.concurrent.ExecutionException: java.lang.RuntimeException:
java.lang.RuntimeException: Failed to construct AvaticaHttpClient
implementation
org.apache.calcite.avatica.remote.AvaticaCommonsHttpClientImpl    at
java.util.concurrent.FutureTask.report(FutureTask.java:122)    at
java.util.concurrent.FutureTask.get(FutureTask.java:206)    at
net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.awaitConnection(OpenConnectionCommand.java:132)
at
net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.access$100(OpenConnectionCommand.java:45)
at
net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand$2.run(OpenConnectionCommand.java:115)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)    at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)Caused by:
java.lang.RuntimeException: java.lang.RuntimeException: Failed to construct
AvaticaHttpClient implementation
org.apache.calcite.avatica.remote.AvaticaCommonsHttpClientImpl    at
net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.executeConnect(OpenConnectionCommand.java:175)
at
net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.access$000(OpenConnectionCommand.java:45)
at
net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand$1.run(OpenConnectionCommand.java:104)
... 5 moreCaused by: java.lang.RuntimeException: Failed to construct
AvaticaHttpClient implementation
org.apache.calcite.avatica.remote.AvaticaCommonsHttpClientImpl    at
org.apache.calcite.avatica.remote.AvaticaHttpClientFactoryImpl.instantiateClient(AvaticaHttpClientFactoryImpl.java:106)
at
org.apache.calcite.avatica.remote.AvaticaHttpClientFactoryImpl.getClient(AvaticaHttpClientFactoryImpl.java:67)
at
org.apache.calcite.avatica.remote.Driver.getHttpClient(Driver.java:159)
at
org.apache.calcite.avatica.remote.Driver.createService(Driver.java:122)
at org.apache.calcite.avatica.remote.Driver.createMeta(Driver.java:96)
at
org.apache.calcite.avatica.AvaticaConnection.<init>(AvaticaConnection.java:118)
at
org.apache.calcite.avatica.AvaticaJdbc41Factory$AvaticaJdbc41Connection.<init>(AvaticaJdbc41Factory.java:105)
at
org.apache.calcite.avatica.AvaticaJdbc41Factory.newConnection(AvaticaJdbc41Factory.java:62)
at
org.apache.calcite.avatica.UnregisteredDriver.connect(UnregisteredDriver.java:143)
at org.apache.calcite.avatica.remote.Driver.connect(Driver.java:164)    at
net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager.getConnection(SQLDriverManager.java:133)
at
net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.executeConnect(OpenConnectionCommand.java:167)
... 7 moreCaused by: java.lang.reflect.InvocationTargetException    at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)    at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)    at
org.apache.calcite.avatica.remote.AvaticaHttpClientFactoryImpl.instantiateClient(AvaticaHttpClientFactoryImpl.java:103)
... 18 moreCaused by: java.lang.NoClassDefFoundError: Could not initialize
class
org.apache.phoenix.shaded.org.apache.http.conn.ssl.SSLConnectionSocketFactory
at
org.apache.phoenix.shaded.org.apache.http.impl.conn.PoolingHttpClientConnectionManager.getDefaultRegistry(PoolingHttpClientConnectionManager.java:109)
at
org.apache.phoenix.shaded.org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:116)
at
org.apache.calcite.avatica.remote.AvaticaCommonsHttpClientImpl.<init>(AvaticaCommonsHttpClientImpl.java:99)
... 23 more*
Regards,

Cheyenne O. Forbes

Re: Squirrel SQL Client doesnt work with phoenix-4.9.0-HBase-1.2

Posted by Cheyenne Forbes <ch...@gmail.com>.
yes, if I dont use ;serialization=PROTOBUF I get the error, I am also
confused, I'm using kali linux.

Re: Squirrel SQL Client doesnt work with phoenix-4.9.0-HBase-1.2

Posted by Josh Elser <el...@apache.org>.
I'm confused as to how those two points are related.

Are you saying that without setting the default serialization, you got an
error about being unable to load a commons-http SSL class?

On Mar 5, 2017 17:18, "Cheyenne Forbes" <ch...@gmail.com>
wrote:

turns out that the only way to connect to phoenix from the latest version
of Squirrel is with "jdbc:phoenix:thin:url=http://172.17.0.2:8765
;serialization=PROTOBUF" instead of just "jdbc:phoenix:thin:url=http://
172.17.0.2:8765;" If I'm using the default phoenix 4.9.0 settings

Re: Squirrel SQL Client doesnt work with phoenix-4.9.0-HBase-1.2

Posted by Cheyenne Forbes <ch...@gmail.com>.
turns out that the only way to connect to phoenix from the latest version
of Squirrel is with
"jdbc:phoenix:thin:url=http://172.17.0.2:8765;serialization=PROTOBUF"
instead of just "jdbc:phoenix:thin:url=http://172.17.0.2:8765;" If I'm
using the default phoenix 4.9.0 settings

Re: Squirrel SQL Client doesnt work with phoenix-4.9.0-HBase-1.2

Posted by Cheyenne Forbes <ch...@gmail.com>.
I also looked in the Jar file with the Archive manager (Kali Linux) and
SSLConnectionSocketFactory.class was also located in the right place

Re: Squirrel SQL Client doesnt work with phoenix-4.9.0-HBase-1.2

Posted by Cheyenne Forbes <ch...@gmail.com>.
I do see
org/apache/phoenix/shaded/org/apache/http/conn/ssl/SSLConnectionSocketFactory.class

anything else?

Re: Squirrel SQL Client doesnt work with phoenix-4.9.0-HBase-1.2

Posted by Josh Elser <el...@apache.org>.
You can first try to inspect the contents of the JAR.

`jar tf <jarfile>`

See if the missing class is contained in it..

Cheyenne Forbes wrote:
> What do you suggest I try?

Re: Squirrel SQL Client doesnt work with phoenix-4.9.0-HBase-1.2

Posted by Cheyenne Forbes <ch...@gmail.com>.
What do you suggest I try?

Re: Squirrel SQL Client doesnt work with phoenix-4.9.0-HBase-1.2

Posted by Josh Elser <el...@apache.org>.
I just built phoenix-4.9.0-HBase-1.2, inspecting the thin-client jar and 
it contains the class which could not be loaded.

org/apache/phoenix/shaded/org/apache/http/conn/ssl/SSLConnectionSocketFactory.class

It doesn't look like there is any reason in the commons httpclient which 
would cause a problem. Most likely this is an issue in your environment.

Cheyenne Forbes wrote:
> Thanks Josh but its phoenix-4.9.0-HBase-1.2-thin-client.jar I'm actually
> using and getting that error, saying
> "phoenix-4.9.0-HBase-1.2-client.jar" was a mistake, what could the issue be?

Re: Squirrel SQL Client doesnt work with phoenix-4.9.0-HBase-1.2

Posted by Cheyenne Forbes <ch...@gmail.com>.
Thanks Josh but its phoenix-4.9.0-HBase-1.2-thin-client.jar I'm actually
using and getting that error, saying "phoenix-4.9.0-HBase-1.2-client.jar"
was a mistake, what could the issue be?

Re: Squirrel SQL Client doesnt work with phoenix-4.9.0-HBase-1.2

Posted by Josh Elser <el...@apache.org>.
You're using the wrong jar, Cheyenne.

The client.jar is for the "thick" JDBC driver. The thin-client.jar is 
for the "thin" JDBC driver.

Cheyenne Forbes wrote:
> I've used Squirrel SQL Client before but now I'm trying Squirrel'
> snapshot-20170214_2214 with phoenix-4.9.0-HBase-1.2-client.jar it wont work.
>
> URL field: jdbc:phoenix:thin:url=http://172.17.0.2:8765
>
> Class name: org.apache.phoenix.queryserver.client.Driver
>
> Error:
> /java.util.concurrent.ExecutionException: java.lang.RuntimeException:
> java.lang.RuntimeException: Failed to construct AvaticaHttpClient
> implementation
> org.apache.calcite.avatica.remote.AvaticaCommonsHttpClientImpl
>      at java.util.concurrent.FutureTask.report(FutureTask.java:122)
>      at java.util.concurrent.FutureTask.get(FutureTask.java:206)
>      at
> net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.awaitConnection(OpenConnectionCommand.java:132)
>      at
> net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.access$100(OpenConnectionCommand.java:45)
>      at
> net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand$2.run(OpenConnectionCommand.java:115)
>      at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>      at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>      at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>      at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.RuntimeException: java.lang.RuntimeException:
> Failed to construct AvaticaHttpClient implementation
> org.apache.calcite.avatica.remote.AvaticaCommonsHttpClientImpl
>      at
> net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.executeConnect(OpenConnectionCommand.java:175)
>      at
> net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.access$000(OpenConnectionCommand.java:45)
>      at
> net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand$1.run(OpenConnectionCommand.java:104)
>      ... 5 more
> Caused by: java.lang.RuntimeException: Failed to construct
> AvaticaHttpClient implementation
> org.apache.calcite.avatica.remote.AvaticaCommonsHttpClientImpl
>      at
> org.apache.calcite.avatica.remote.AvaticaHttpClientFactoryImpl.instantiateClient(AvaticaHttpClientFactoryImpl.java:106)
>      at
> org.apache.calcite.avatica.remote.AvaticaHttpClientFactoryImpl.getClient(AvaticaHttpClientFactoryImpl.java:67)
>      at
> org.apache.calcite.avatica.remote.Driver.getHttpClient(Driver.java:159)
>      at
> org.apache.calcite.avatica.remote.Driver.createService(Driver.java:122)
>      at org.apache.calcite.avatica.remote.Driver.createMeta(Driver.java:96)
>      at
> org.apache.calcite.avatica.AvaticaConnection.<init>(AvaticaConnection.java:118)
>      at
> org.apache.calcite.avatica.AvaticaJdbc41Factory$AvaticaJdbc41Connection.<init>(AvaticaJdbc41Factory.java:105)
>      at
> org.apache.calcite.avatica.AvaticaJdbc41Factory.newConnection(AvaticaJdbc41Factory.java:62)
>      at
> org.apache.calcite.avatica.UnregisteredDriver.connect(UnregisteredDriver.java:143)
>      at org.apache.calcite.avatica.remote.Driver.connect(Driver.java:164)
>      at
> net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager.getConnection(SQLDriverManager.java:133)
>      at
> net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.executeConnect(OpenConnectionCommand.java:167)
>      ... 7 more
> Caused by: java.lang.reflect.InvocationTargetException
>      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
>      at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
>      at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>      at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
>      at
> org.apache.calcite.avatica.remote.AvaticaHttpClientFactoryImpl.instantiateClient(AvaticaHttpClientFactoryImpl.java:103)
>      ... 18 more
> Caused by: java.lang.NoClassDefFoundError: Could not initialize class
> org.apache.phoenix.shaded.org.apache.http.conn.ssl.SSLConnectionSocketFactory
>      at
> org.apache.phoenix.shaded.org.apache.http.impl.conn.PoolingHttpClientConnectionManager.getDefaultRegistry(PoolingHttpClientConnectionManager.java:109)
>      at
> org.apache.phoenix.shaded.org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:116)
>      at
> org.apache.calcite.avatica.remote.AvaticaCommonsHttpClientImpl.<init>(AvaticaCommonsHttpClientImpl.java:99)
>      ... 23 more
>
> /
> Regards,
>
> Cheyenne O. Forbes

Re: Squirrel SQL Client doesnt work with phoenix-4.9.0-HBase-1.2

Posted by mferlay <mf...@gnubila.fr>.
Maybe it will not solve your issue but you can use the last image of
smizy/docker-apache-phoenix with docker. it's an phoenix4.9 - hbase1.2 with
an integrated sql provider



--
View this message in context: http://apache-phoenix-user-list.1124778.n5.nabble.com/Squirrel-SQL-Client-doesnt-work-with-phoenix-4-9-0-HBase-1-2-tp3225p3241.html
Sent from the Apache Phoenix User List mailing list archive at Nabble.com.

Re: Squirrel SQL Client doesnt work with phoenix-4.9.0-HBase-1.2

Posted by Cheyenne Forbes <ch...@gmail.com>.
Can anyone try to see if they get the same error?