[
https://issues.apache.org/jira/browse/HBASE-9479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13762282#comment-13762282
]
Nicolas Liochon commented on HBASE-9479:
----------------------------------------
Please ask on the mailing list before creating jira. This tool is not for
support but for change tracking.
When you ask something on the mialing list, mention the hbase version.
There is a hbase-client in the hbase version currently released (0.96). This
won't remove all the dependencies. And yes, dependencyManagement in maven is
the way to do it.
> Using HBase Jars in Webapp Causes Many Issues
> ---------------------------------------------
>
> Key: HBASE-9479
> URL: https://issues.apache.org/jira/browse/HBASE-9479
> Project: HBase
> Issue Type: Bug
> Reporter: David Williams
>
> Right now, HBase contains so many dependencies, that using the most basic
> HBase functionality such as HConnection in a larger application is
> unreasonable hard. For example, trying to include HBase connectivity in a
> Spring web app leads to hundreds of JarClassLoader errors such as:
> {code}
> JarClassLoader: Warning:
> org/apache/commons/collections/FastHashMap$CollectionView.class in
> lib/commons-collections-3.2.1.jar is hidden by
> lib/commons-beanutils-core-1.8.3.jar (with different bytecode)
> JarClassLoader: Warning:
> org/apache/commons/collections/FastHashMap$EntrySet.class in
> lib/commons-collections-3.2.1.jar is hidden by
> lib/commons-beanutils-core-1.8.3.jar (with different bytecode)
> JarClassLoader: Warning:
> org/apache/commons/collections/FastHashMap$KeySet.class in
> lib/commons-collections-3.2.1.jar is hidden by
> lib/commons-beanutils-core-1.8.3.jar (with different bytecode)
> JarClassLoader: Warning:
> org/apache/commons/collections/FastHashMap$Values.class in
> lib/commons-collections-3.2.1.jar is hidden by
> lib/commons-beanutils-core-1.8.3.jar (with different bytecode)
> JarClassLoader: Warning: org/apache/commons/collections/FastHashMap.class in
> lib/commons-collections-3.2.1.jar is hidden by
> lib/commons-beanutils-core-1.8.3.jar (with different bytecode)
> JarClassLoader: Warning: javax/servlet/Filter.class in
> lib/servlet-api-2.5-6.1.14.jar is hidden by
> lib/javax.servlet-3.0.0.v201112011016.jar (with different bytecode)
> JarClassLoader: Warning: javax/servlet/FilterChain.class in
> lib/servlet-api-2.5-6.1.14.jar is hidden by
> lib/javax.servlet-3.0.0.v201112011016.jar (with different bytecode)
> JarClassLoader: Warning: javax/servlet/FilterConfig.class in
> lib/servlet-api-2.5-6.1.14.jar is hidden by
> lib/javax.servlet-3.0.0.v201112011016.jar (with different bytecode)
> JarClassLoader: Warning: javax/servlet/GenericServlet.class in
> lib/servlet-api-2.5-6.1.14.jar is hidden by
> lib/javax.servlet-3.0.0.v201112011016.jar (with different bytecode)
> JarClassLoader: Warning: javax/servlet/http/Cookie.class in
> lib/servlet-api-2.5-6.1.14.jar is hidden by
> lib/javax.servlet-3.0.0.v201112011016.jar (with different bytecode)
> {code}
> Why is this all bundled together? Why not have an "hbase-client" or
> "hbase-client-dev" package which is friendly for creating applications?
> I have spent 2+ days attempting to run a web service which is backed by HBase
> with no luck. I have created several stack overflow questions:
> http://stackoverflow.com/questions/18703903/java-massive-class-collision
> http://stackoverflow.com/questions/18690582/how-to-create-jetty-spring-app-with-hbase-connection
> The use of BeanUtils is also known to have a very bad issue:
> "The three jars contain wrong classes"
> https://issues.apache.org/jira/browse/BEANUTILS-398
> Why is this so difficult? How do I include what I need to make an HBase app.
> So far I have tried using Maven, but this approach is draconian, and I have
> not succeeded. Am I Pwned?
> {code}
> <dependencyManagement>
> <dependencies>
> <dependency>
> <groupId>org.jboss.netty</groupId>
> <artifactId>netty</artifactId>
> <version>3.2.4.Final</version>
> </dependency>
> <dependency>
> <groupId>org.codehaus.jackson</groupId>
> <artifactId>jackson-core-asl</artifactId>
> <version>1.9.12</version>
> </dependency>
> <dependency>
> <groupId>org.codehaus.jackson</groupId>
> <artifactId>jackson-jaxrs</artifactId>
> <version>1.9.12</version>
> </dependency>
> <dependency>
> <groupId>com.sun.xml.bind</groupId>
> <artifactId>jackson-jaxrs</artifactId>
> <version>2.2.6</version>
> </dependency>
> <dependency>
> <groupId>com.sun.xml.bind</groupId>
> <artifactId>jaxb-impl</artifactId>
> <version>2.2.6</version>
> </dependency>
> <dependency>
> <groupId>log4j</groupId>
> <artifactId>log4j</artifactId>
> <version>1.2.16</version>
> </dependency>
> <dependency>
> <groupId>asm</groupId>
> <artifactId>asm</artifactId>
> <version>3.3.1</version>
> </dependency>
> <dependency>
> <groupId>commons-codec</groupId>
> <artifactId>commons-codec</artifactId>
> <version>1.4</version>
> </dependency>
> <dependency>
> <groupId>commons-lang</groupId>
> <artifactId>commons-lang</artifactId>
> <version>2.5</version>
> </dependency>
> <dependency>
> <groupId>org.slf4j</groupId>
> <artifactId>slf4j-api</artifactId>
> <version>1.7.5</version>
> </dependency>
> <dependency>
> <groupId>commons-logging</groupId>
> <artifactId>commons-logging</artifactId>
> <version>1.1.1</version>
> </dependency>
> <dependency>
> <groupId>org.codehaus.jackson</groupId>
> <artifactId>jackson-mapper-asl</artifactId>
> <version>1.9.12</version>
> </dependency>
> <dependency>
> <groupId>org.slf4j</groupId>
> <artifactId>slf4j-log4j12</artifactId>
> <version>1.6.1</version>
> </dependency>
> <dependency>
> <groupId>org.apache.httpcomponents</groupId>
> <artifactId>httpcore</artifactId>
> <version>4.1.3</version>
> </dependency>
> <dependency>
> <groupId>commons-httpclient</groupId>
> <artifactId>commons-httpclient</artifactId>
> <version>3.1</version>
> </dependency>
> <dependency>
> <groupId>org.codehaus.jackson</groupId>
> <artifactId>jackson-xc</artifactId>
> <version>1.9.12</version>
> </dependency>
> <dependency>
> <groupId>commons-beanutils</groupId>
> <artifactId>commons-beanutils-core</artifactId>
> <version>1.8.3</version>
> </dependency>
> <dependency>
> <groupId>commons-beanutils</groupId>
> <artifactId>commons-beanutils</artifactId>
> <version>1.8.3</version>
> </dependency>
> </dependencies>
> </dependencyManagement>
> <dependencies>
> <dependency>
> <groupId>commons-beanutils</groupId>
> <artifactId>commons-beanutils-core</artifactId>
> <version>1.8.3</version>
> </dependency>
> <dependency>
> <groupId>commons-beanutils</groupId>
> <artifactId>commons-beanutils</artifactId>
> <version>1.8.3</version>
> <scope>provided</scope>
> </dependency>
> <dependency>
> <groupId>org.apache.cxf</groupId>
> <artifactId>cxf-rt-frontend-jaxrs</artifactId>
> <version>2.7.2</version>
> </dependency>
> <dependency>
> <groupId>org.apache.cxf</groupId>
> <artifactId>cxf-rt-frontend-jaxws</artifactId>
> <version>2.7.2</version>
> </dependency>
> <dependency>
> <groupId>org.codehaus.jackson</groupId>
> <artifactId>jackson-core-asl</artifactId>
> <version>1.9.12</version>
> </dependency>
> <dependency>
> <groupId>org.codehaus.jackson</groupId>
> <artifactId>jackson-mapper-asl</artifactId>
> <version>1.9.12</version>
> </dependency>
> <dependency>
> <groupId>org.codehaus.jackson</groupId>
> <artifactId>jackson-jaxrs</artifactId>
> <version>1.9.12</version>
> </dependency>
> <dependency>
> <groupId>org.codehaus.jackson</groupId>
> <artifactId>jackson-xc</artifactId>
> <version>1.9.12</version>
> </dependency>
> <dependency>
> <groupId>org.springframework</groupId>
> <artifactId>spring-core</artifactId>
> <version>3.2.4.RELEASE</version>
> </dependency>
> <dependency>
> <groupId>org.springframework</groupId>
> <artifactId>spring-context</artifactId>
> <version>3.2.4.RELEASE</version>
> </dependency>
> <dependency>
> <groupId>org.springframework</groupId>
> <artifactId>spring-webmvc</artifactId>
> <version>3.2.4.RELEASE</version>
> </dependency>
> <dependency>
> <groupId>ch.qos.logback</groupId>
> <artifactId>logback-classic</artifactId>
> <version>1.0.13</version>
> </dependency>
> <dependency>
> <groupId>ch.qos.logback</groupId>
> <artifactId>logback-core</artifactId>
> <version>1.0.13</version>
> </dependency>
> <dependency>
> <groupId>junit</groupId>
> <artifactId>junit</artifactId>
> <version>4.11</version>
> <scope>test</scope>
> </dependency>
> <dependency>
> <groupId>net.sf.opencsv</groupId>
> <artifactId>opencsv</artifactId>
> <version>2.3</version>
> </dependency>
> <dependency>
> <groupId>javax.inject</groupId>
> <artifactId>javax.inject</artifactId>
> <version>1</version>
> </dependency>
> <dependency>
> <groupId>org.eclipse.jetty</groupId>
> <artifactId>jetty-server</artifactId>
> <version>9.0.4.v20130625</version>
> </dependency>
> <dependency>
> <groupId>org.eclipse.jetty</groupId>
> <artifactId>jetty-webapp</artifactId>
> <version>9.0.4.v20130625</version>
> </dependency>
> <dependency>
> <groupId>org.apache.hbase</groupId>
> <artifactId>hbase</artifactId>
> <version>0.94.11</version>
> <exclusions>
> <exclusion>
> <groupId>org.codehaus.jackson</groupId>
> <artifactId>jackson-core-asl</artifactId>
> </exclusion>
> <exclusion>
> <groupId>org.codehaus.jackson</groupId>
> <artifactId>jackson-jaxrs</artifactId>
> </exclusion>
> <exclusion>
> <groupId>org.codehaus.jackson</groupId>
> <artifactId>jackson-mapper-asl</artifactId>
> </exclusion>
> <exclusion>
> <groupId>org.codehaus.jackson</groupId>
> <artifactId>jackson-xc</artifactId>
> </exclusion>
> <exclusion>
> <groupId>com.sun.jersey</groupId>
> <artifactId>jersey-core</artifactId>
> </exclusion>
> <exclusion>
> <groupId>com.sun.jersey</groupId>
> <artifactId>jersey-json</artifactId>
> </exclusion>
> <exclusion>
> <groupId>com.sun.jersey</groupId>
> <artifactId>jersey-server</artifactId>
> </exclusion>
> <exclusion>
> <groupId>org.mortbay.jetty</groupId>
> <artifactId>jetty</artifactId>
> </exclusion>
> <exclusion>
> <groupId>com.sun.jersey</groupId>
> <artifactId>jetty-util</artifactId>
> </exclusion>
> <exclusion>
> <groupId>com.sun.jersey</groupId>
> <artifactId>jsp-2.1</artifactId>
> </exclusion>
> <exclusion>
> <groupId>com.sun.jersey</groupId>
> <artifactId>jsp-api-2.1</artifactId>
> </exclusion>
> <exclusion>
> <groupId>com.sun.jersey</groupId>
> <artifactId>servlet-api-2.5</artifactId>
> </exclusion>
> <exclusion>
> <groupId>javax.xml.bind</groupId>
> <artifactId>jaxb-api</artifactId>
> </exclusion>
> <exclusion>
> <groupId>tomcat</groupId>
> <artifactId>jasper-compiler</artifactId>
> </exclusion>
> <exclusion>
> <groupId>tomcat</groupId>
> <artifactId>jasper-runtime</artifactId>
> </exclusion>
> <exclusion>
> <groupId>org.slf4j</groupId>
> <artifactId>slf4j-api</artifactId>
> </exclusion>
> <exclusion>
> <groupId>org.slf4j</groupId>
> <artifactId>slf4j-log4j12</artifactId>
> </exclusion>
> <exclusion>
> <groupId>org.apache.thrift</groupId>
> <artifactId>libthrift</artifactId>
> </exclusion>
> </exclusions>
> </dependency>
> <dependency>
> <groupId>org.apache.hadoop</groupId>
> <artifactId>hadoop-core</artifactId>
> <version>1.2.1</version>
> <exclusions>
> <exclusion>
> <groupId>com.sun.jersey</groupId>
> <artifactId>jersey-core</artifactId>
> </exclusion>
> <exclusion>
> <groupId>com.sun.jersey</groupId>
> <artifactId>jersey-json</artifactId>
> </exclusion>
> <exclusion>
> <groupId>com.sun.jersey</groupId>
> <artifactId>jersey-server</artifactId>
> </exclusion>
> <exclusion>
> <groupId>tomcat</groupId>
> <artifactId>jasper-compiler</artifactId>
> </exclusion>
> <exclusion>
> <groupId>tomcat</groupId>
> <artifactId>jasper-runtime</artifactId>
> </exclusion>
> </exclusions>
> </dependency>
> </dependencies>
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira