[ 
https://issues.apache.org/jira/browse/HBASE-22393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16841645#comment-16841645
 ] 

Wellington Chevreuil commented on HBASE-22393:
----------------------------------------------

Latest patch is relocating references to any class in *javax* domain, so it 
causes *NoClassDefFoundError* on process loading the generated hboss jar:

{noformat}
Exception in thread "main" java.lang.NoClassDefFoundError: 
org/apache/hadoop/hbase/oss/thirdparty/javax/security/sasl/SaslException
        at 
org.apache.hadoop.hbase.oss.thirdparty.org.apache.zookeeper.ClientCnxn.<init>(ClientCnxn.java:400)
        at 
org.apache.hadoop.hbase.oss.thirdparty.org.apache.zookeeper.ClientCnxn.<init>(ClientCnxn.java:359)
        at 
org.apache.hadoop.hbase.oss.thirdparty.org.apache.zookeeper.ZooKeeper.<init>(ZooKeeper.java:447)
        at 
org.apache.hadoop.hbase.oss.thirdparty.org.apache.curator.utils.DefaultZookeeperFactory.newZooKeeper(DefaultZookeeperFactory.java:29)
        at 
org.apache.hadoop.hbase.oss.thirdparty.org.apache.curator.framework.imps.CuratorFrameworkImpl$2.newZooKeeper(CuratorFrameworkImpl.java:191)
        at 
org.apache.hadoop.hbase.oss.thirdparty.org.apache.curator.HandleHolder$1.getZooKeeper(HandleHolder.java:101)
        at 
org.apache.hadoop.hbase.oss.thirdparty.org.apache.curator.HandleHolder.getZooKeeper(HandleHolder.java:57)
        at 
org.apache.hadoop.hbase.oss.thirdparty.org.apache.curator.ConnectionState.reset(ConnectionState.java:201)
        at 
org.apache.hadoop.hbase.oss.thirdparty.org.apache.curator.ConnectionState.start(ConnectionState.java:111)
        at 
org.apache.hadoop.hbase.oss.thirdparty.org.apache.curator.CuratorZookeeperClient.start(CuratorZookeeperClient.java:214)
        at 
org.apache.hadoop.hbase.oss.thirdparty.org.apache.curator.framework.imps.CuratorFrameworkImpl.start(CuratorFrameworkImpl.java:308)
        at 
org.apache.hadoop.hbase.oss.sync.ZKTreeLockManager.initialize(ZKTreeLockManager.java:90)
{noformat}

Since the offending dependency (jsr305) is already marked for exclusion, I 
believe we can safely remove this *javax relocation rule* from shade section in 
the pom. Attaching a patch example that worked on my tests (notice I don't have 
*javax* on the relocations portion).

> HBOSS: Shade curator to prevent conflict with Hadoop
> ----------------------------------------------------
>
>                 Key: HBASE-22393
>                 URL: https://issues.apache.org/jira/browse/HBASE-22393
>             Project: HBase
>          Issue Type: Bug
>          Components: Filesystem Integration
>    Affects Versions: hbase-filesystem-1.0.0-alpha1
>            Reporter: Sean Mackrory
>            Assignee: Sean Mackrory
>            Priority: Critical
>              Labels: HBOSS
>             Fix For: hbase-filesystem-1.0.0-alpha1
>
>         Attachments: 
> 0001-HBASE-22393-HBOSS-Shade-dependencies-to-prevent-conf.patch, 
> 0001-HBASE-22393.patch, HBASE-22393.001.patch, HBASE-22393.002.patch
>
>
> Hadoop uses a very old version of Curator, and if it ever ends up in the 
> classpath with HBOSS you can get this:
> {code}Exception in thread "main" java.lang.IllegalAccessError: tried to 
> access method 
> org.apache.curator.framework.recipes.locks.InterProcessMutex.isOwnedByCurrentThread()Z
>  from class org.apache.hadoop.hbase.oss.sync.ZKTreeLockManager{code}
> I think the simplest solution is to just shade Curator.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to