phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mujtaba Chohan <mujt...@apache.org>
Subject Re: Phoenix client maven dependencies
Date Thu, 18 Sep 2014 19:12:20 GMT
Falvio - Client jar is composed on multiple dependency jars extracted in
one and is for convenience available in binary
<http://phoenix.apache.org/download.html> download only. This type of
bundled jars are not supposed to go in maven repo. as maven automatically
resolves required dependencies. To use maven repo
<http://phoenix.apache.org/building.html>., use the *phoenix-core *as
artifact id and maven will pull in all the required dependencies for your
project. Then if you want a single jar for your project, you can bundle
your project jars in one.

    <dependency>
        <groupId>org.apache.phoenix</groupId>
        <artifactId>phoenix-core</artifactId>
        <version>4.1.0</version>
    </dependency>

//mujtaba

On Thu, Sep 18, 2014 at 11:54 AM, Flavio Pompermaier <pompermaier@okkam.it>
wrote:

> Is the client jar available on maven central?
> On Sep 18, 2014 8:46 PM, "anil gupta" <anilgupta84@gmail.com> wrote:
>
>> Hi Flavio,
>>
>> Phoenix-core is for sever side. If this app is for client side then you
>> can use client jars. Maybe you can try to use
>> phoenix-client-without-hbase.jar. In this case, i think you will at least
>> need hbase-client jar in your client app to be added in your pom.
>>
>> Thanks,
>> Anil Gupta
>>
>> On Thu, Sep 18, 2014 at 6:13 AM, Flavio Pompermaier <pompermaier@okkam.it
>> > wrote:
>>
>>> Is it really necessary the dependency to hbase-server..? Then if I try
>>> to run my application from a webapp using resteasy I get this error:
>>>
>>> Caused by:
>>> org.jboss.as.server.deployment.DeploymentUnitProcessingException:
>>> JBAS011232: Only one JAX-RS Application Class allowed.
>>>  com.sun.jersey.api.core.ClasspathResourceConfig
>>> com.sun.jersey.server.impl.application.DeferredResourceConfig
>>> com.sun.jersey.api.core.ScanningResourceConfig
>>> org.apache.hadoop.hbase.rest.ResourceConfig
>>> com.sun.jersey.api.core.ClassNamesResourceConfig
>>> com.sun.jersey.api.core.ApplicationAdapter
>>> com.sun.jersey.api.core.WebAppResourceConfig
>>> com.sun.jersey.api.core.PackagesResourceConfig
>>> com.sun.jersey.api.core.DefaultResourceConfig
>>> com.sun.jersey.api.core.ResourceConfig
>>> at
>>> org.jboss.as.jaxrs.deployment.JaxrsScanningProcessor.scan(JaxrsScanningProcessor.java:209)
>>>
>>> On Thu, Sep 18, 2014 at 11:40 AM, Flavio Pompermaier <
>>> pompermaier@okkam.it> wrote:
>>>
>>>> I was able to obtain a minimal set of dependencies *for hadoop1) using:
>>>>                 <dependency>
>>>> <groupId>org.apache.phoenix</groupId>
>>>> <artifactId>phoenix</artifactId>
>>>> <version>4.1.0</version>
>>>> </dependency>
>>>> <dependency>
>>>> <groupId>org.apache.hbase</groupId>
>>>> <artifactId>hbase-client</artifactId>
>>>> <version>0.98.4-hadoop1</version>
>>>> </dependency>
>>>>                 <!-- Need hbase server just for ConstantSizeRegionSplitPolicy
>>>> class.. -->
>>>> <dependency>
>>>> <groupId>org.apache.hbase</groupId>
>>>> <artifactId>hbase-server</artifactId>
>>>> <version>0.98.4-hadoop1</version>
>>>> <exclusions>
>>>> <exclusion>
>>>> <artifactId>*</artifactId>
>>>> <groupId>*</groupId>
>>>> </exclusion>
>>>> </exclusions>
>>>> </dependency>
>>>> <dependency>
>>>> <groupId>org.apache.phoenix</groupId>
>>>> <artifactId>phoenix-hadoop-compat</artifactId>
>>>> <version>4.1.0</version>
>>>> <exclusions>
>>>>                                  <!-- conflict with
>>>> hbase-client-0.98.4-hadoop1 version -->
>>>> <exclusion>
>>>> <artifactId>hbase-common</artifactId>
>>>> <groupId>org.apache.hbase</groupId>
>>>> </exclusion>
>>>> </exclusions>
>>>> </dependency>
>>>>
>>>> but I still get this exception (that however seems not causing any
>>>> issue):
>>>> java.lang.RuntimeException: Could not create  interface
>>>> org.apache.phoenix.trace.PhoenixSpanReceiver Is the hadoop compatibility
>>>> jar on the classpath?
>>>> at
>>>> org.apache.hadoop.hbase.CompatibilityFactory.getInstance(CompatibilityFactory.java:60)
>>>> at
>>>> org.apache.phoenix.trace.TracingCompat.newTraceMetricSource(TracingCompat.java:40)
>>>> at
>>>> org.apache.phoenix.trace.util.Tracing.addTraceMetricsSource(Tracing.java:294)
>>>> at
>>>> org.apache.phoenix.jdbc.PhoenixConnection.<clinit>(PhoenixConnection.java:125)
>>>> at
>>>> org.apache.phoenix.query.ConnectionQueryServicesImpl$9.call(ConnectionQueryServicesImpl.java:1516)
>>>> at
>>>> org.apache.phoenix.query.ConnectionQueryServicesImpl$9.call(ConnectionQueryServicesImpl.java:1489)
>>>> at
>>>> org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:77)
>>>> at
>>>> org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:1489)
>>>> at
>>>> org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:162)
>>>> at
>>>> org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.connect(PhoenixEmbeddedDriver.java:129)
>>>> at org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:133)
>>>> at java.sql.DriverManager.getConnection(DriverManager.java:571)
>>>> at java.sql.DriverManager.getConnection(DriverManager.java:233)
>>>> Caused by: java.util.NoSuchElementException
>>>> at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:357)
>>>> at java.util.ServiceLoader$1.next(ServiceLoader.java:445)
>>>> at
>>>> org.apache.hadoop.hbase.CompatibilityFactory.getInstance(CompatibilityFactory.java:46)
>>>> ... 14 more
>>>>
>>>> How can I fix those problems?
>>>>
>>>> On Thu, Sep 18, 2014 at 10:34 AM, Flavio Pompermaier <
>>>> pompermaier@okkam.it> wrote:
>>>>
>>>>> Hi to all,
>>>>>
>>>>> I'm trying to write a J2EE application that uses the Phoenix JDBC
>>>>> driver for HBase 0.98 (not on yarn for tests but it will be in production)
>>>>> through maven.
>>>>> Do I really need all the jars of the hbase-server side contained in
>>>>> the phoenix core jar..?
>>>>> I can't see a phoenix-client jar on the central maven repository while
>>>>> in the documentation there's to use that jar!
>>>>>
>>>>> Thanks in advance,
>>>>> Flavio
>>>>>
>>>>
>>>>
>>
>>
>> --
>> Thanks & Regards,
>> Anil Gupta
>>
>

Mime
View raw message