0

我正在尝试使用 jaydebeapi 库通过 JDBC 连接到 apache phoenix 4.4,我正在使用这个脚本 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)

但我得到这个错误:

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

我仍然确定这个驱动程序可以工作,因为我在我的 java API 中使用它并且它与 squirrel 的工作方式相同,所以知道为什么在 python 中找不到驱动程序类吗?

4

0 回答 0