[
https://issues.apache.org/jira/browse/HBASE-22889?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16917205#comment-16917205
]
stack commented on HBASE-22889:
-------------------------------
Yeah, looks wrong. Thanks for the pom. The only jetty I see in the shaded jar is
{code}
$ jar -tf hbase-shaded-client-2.1.6-SNAPSHOT.jar |grep jetty
org/apache/hadoop/hbase/shaded/org/mortbay/jetty/
org/apache/hadoop/hbase/shaded/org/mortbay/jetty/security/
org/apache/hadoop/hbase/shaded/org/mortbay/jetty/security/SslHttpChannelEndPoint$1.class
org/apache/hadoop/hbase/shaded/org/mortbay/jetty/security/SslHttpChannelEndPoint$2.class
org/apache/hadoop/hbase/shaded/org/mortbay/jetty/security/SslHttpChannelEndPoint.class
org/apache/hadoop/hbase/shaded/org/mortbay/jetty/security/SslSelectChannelConnector.class
org/apache/hadoop/hbase/shaded/org/mortbay/jetty/security/SslSelectChannelConnector$CachedInfo.class
META-INF/maven/org.mortbay.jetty/
META-INF/maven/org.mortbay.jetty/jetty-sslengine/
META-INF/maven/org.mortbay.jetty/jetty-sslengine/pom.xml
META-INF/maven/org.mortbay.jetty/jetty-sslengine/pom.properties
{code}
This is at build time?
If you leave this out of your pom, does it work?
{code}
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-server</artifactId>
<version>${hbase.version}</version>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
{code}
Thanks.
> hbase-shaded-client for Hbase 2.x does not include all the classes it needs
> at runtime
> --------------------------------------------------------------------------------------
>
> Key: HBASE-22889
> URL: https://issues.apache.org/jira/browse/HBASE-22889
> Project: HBase
> Issue Type: Bug
> Components: Client
> Reporter: Ismaël Mejía
> Priority: Minor
>
> When running a simple Job to read data from HBase 2 I got this exception, so
> it seems not all needed classes are included in `hbase-shaded-client`
> {quote}java.lang.NoClassDefFoundError:
> org/apache/hadoop/hbase/shaded/org/mortbay/jetty/nio/SelectChannelConnector
> at com.example.hbase.HBaseIOTest.beforeClass(HBaseIOTest.java:79)
> Caused by: java.lang.ClassNotFoundException:
> org.apache.hadoop.hbase.shaded.org.mortbay.jetty.nio.SelectChannelConnector
> at com.example.hbase.HBaseIOTest.beforeClass(HBaseIOTest.java:79{quote}
> If I replace the dependency with just `hbase-client` everything works
> correctly.
> I created an external repo to test this in case someone may want to take a
> look.
> https://github.com/iemejia/hbase-shaded-server-test/blob/f644a7b9850d416f19093c717b73dd8c1048c553/pom.xml#L55
--
This message was sent by Atlassian Jira
(v8.3.2#803003)