1

I'm trying to use jaydebeapi library to connect to apache phoenix 4.4 via JDBC, I'm using this script python :

import jaydebeapi as jdbc

jar ='/usr/hdp/current/phoenix-client/phoenix-4.4.0.2.4.3.0-227-client.jar'
drivername = 'org.apache.phoenix.jdbc.PhoenixDriver'
url = 'jdbc:phoenix:master1:2181/'
conn = jdbc.connect(drivername, url, jar)

But i get this error :

File "/usr/local/lib/python2.7/dist-packages/jpype/_jclass.py", line 55, in JClass
    raise _RUNTIMEEXCEPTION.PYEXC("Class %s not found" % name)
java.lang.RuntimeExceptionPyRaisable: java.lang.RuntimeException: Class org.apache.phoenix.jdbc.PhoenixDriver not found

Still I'm sure this driver works since I'm using it in my java API and it does work the same with squirrel so any idea why in python this can't find the driver class ?

azelix
  • 1,257
  • 4
  • 26
  • 50
  • Is it safe to call external Web service resources ? So we're talking about membership and permission rights. You need a router application or a script for the `org.apache.phoenix.jdbc.PhoenixDriver` app. – dsgdfg Oct 13 '17 at 12:35
  • I'm sorry but I don't really get what are you talking about. – azelix Oct 13 '17 at 12:40
  • Mean : **What makes you expect the Web service to give you the resources?** You need to thoroughly examine the file, access rights and permissions of the Linux. – dsgdfg Oct 13 '17 at 12:42
  • Yes i have checked the permissions on the driver jar – azelix Oct 13 '17 at 12:46
  • jar tvf /usr/hdp/current/phoenix-client/phoenix-4.4.0.2.4.3.0-227-client.jar --- check to see if the PhoenixDriver is where you expect – Paul Bastide Oct 14 '17 at 02:20

0 Answers0