Ok, that was what I did. However, IMHO it will be better, in the next release, to put also the client jar on maven central. I saw that the current master is version 5. When will this version released?is it stable enough to use it right now? On Sep 18, 2014 9:14 PM, "Russell Jurney" <[email protected]> wrote:
> We have to use phoenix-client, phoenix-core, hbase client, server, > and common. > > On Thursday, September 18, 2014, Flavio Pompermaier <[email protected]> > wrote: > >> Is the client jar available on maven central? >> On Sep 18, 2014 8:46 PM, "anil gupta" <[email protected]> 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 < >>> [email protected]> 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 < >>>> [email protected]> 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 < >>>>> [email protected]> 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 >>> >> > > -- > Russell Jurney twitter.com/rjurney [email protected] datasyndrome. > com >
