phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vamsi Krishna <vamsi.attl...@gmail.com>
Subject Phoenix 4.1.0 client jar ivy dependency
Date Mon, 17 Nov 2014 04:51:24 GMT
Hi,

I'm trying to use Phoenix JDBC driver 4.1.0 in my application.

I'm able to resolve ivy dependency to 'phoenix-4.1.0.jar'. Ivy dependency:
<dependency org="org.apache.phoenix" name="phoenix" rev="4.1.0" />
I see ‘phoenix-4.1.0.jar’ is containing the ‘PhoenixDriver’.
$unzip -l phoenix-4.1.0.jar  | grep PhoenixDriver
     1102  08-29-14 14:14   org/apache/phoenix/jdbc/PhoenixDriver$1.class
     7908  08-29-14 14:14   org/apache/phoenix/jdbc/PhoenixDriver.class

But, at runtime I’m seeing below error:
org.mybatis.spring.MyBatisSystemException: nested exception is
org.apache.ibatis.exceptions.PersistenceException:
### Error querying database.  Cause:
org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get
JDBC Connection; nested exception is
org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class
'org.apache.phoenix.jdbc.PhoenixDriver'
### The error may exist in com/test/dal/xml/TestTableMapper.xml
### The error may involve
com.test.dal.mapper.TestTableMapper.selectByExample
### The error occurred while executing a query
### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could
not get JDBC Connection; nested exception is
org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class
'org.apache.phoenix.jdbc.PhoenixDriver'

I downloaded Phoenix 4.1.0 binary package from ‘
http://www.gtlib.gatech.edu/pub/apache/phoenix/phoenix-4.1.0/bin/’
I see ‘phoenix-4.1.0-client-hadoop2.jar’ is containing ‘PhoenixDriver’.
And I’m able to successfully use the driver in my application to connect to
HBase.

$unzip -l phoenix-4.1.0-client-hadoop2.jar | grep PhoenixDriver
     1102  08-25-14 12:11   org/apache/phoenix/jdbc/PhoenixDriver$1.class
     7908  08-25-14 12:11   org/apache/phoenix/jdbc/PhoenixDriver.class

But, I’m having trouble to add ‘phoenix-4.1.0-client-hadoop2.jar’ Ivy
dependency in my application.

What is the right jar file to use in java application to use Phoenix JDBC
driver?
Could someone please let me know how to add Ivy dependency to
‘phoenix-4.1.0-client-hadoop2.jar’ in my application?

Thanks,
Vamsi Attluri.

Mime
View raw message