[
https://issues.apache.org/jira/browse/PHOENIX-6759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
selina.yan updated PHOENIX-6759:
--------------------------------
Attachment: Phoenix-6759.V1.patch
> Phoenix driver cannot be loaded
> -------------------------------
>
> Key: PHOENIX-6759
> URL: https://issues.apache.org/jira/browse/PHOENIX-6759
> Project: Phoenix
> Issue Type: Bug
> Components: hive-connector
> Affects Versions: connectors-6.0.0
> Reporter: selina.yan
> Priority: Major
> Attachments: Phoenix-6759.V1.patch
>
>
> When I query the association table of hive Association Phoenix, I cannot load
> the driver.and the error is as follows:
>
> {code:java}
> Caused by: java.sql.SQLException: No suitable driver found for
> jdbc:phoenix:host01:2181:/hbase;
> at java.sql.DriverManager.getConnection(DriverManager.java:689)
> at java.sql.DriverManager.getConnection(DriverManager.java:208)
> at
> org.apache.phoenix.hive.util.PhoenixConnectionUtil.getConnection(PhoenixConnectionUtil.java:99)
> at
> org.apache.phoenix.hive.util.PhoenixConnectionUtil.getInputConnection(PhoenixConnectionUtil.java:62)
> at
> org.apache.phoenix.hive.PhoenixSerializer.<init>(PhoenixSerializer.java:72)
> ... 40 more (state=42000,code=40000) {code}
> The usage scenario is add phoenix-version-hive.jar by adding jar.By viewing
> the code,the reason for the failure is that the getConnection method of the
> query cannot support dynamic addition of drivers.
> {code:java}
> private static Connection getConnection(final String quorum, final Integer
> clientPort, String
> zNodeParent, Properties props) throws SQLException {
> if (LOG.isDebugEnabled()) {
> LOG.debug("Connection attrs [quorum, port, znode] : " + quorum + ", "
> + clientPort +
> ", " +
> zNodeParent);
> }
> return DriverManager.getConnection(clientPort != null ?
> QueryUtil.getUrl(quorum,
> clientPort, zNodeParent) : QueryUtil.getUrl(quorum), props);
> } {code}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)