You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by "Mihir Monani (Jira)" <ji...@apache.org> on 2020/09/14 14:58:00 UTC
[jira] [Comment Edited] (PHOENIX-6133) Exclude transitive
dependency of hadoop-common STAX2 and WOODSTOX jars from phoenix-client JAR
[ https://issues.apache.org/jira/browse/PHOENIX-6133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17195502#comment-17195502 ]
Mihir Monani edited comment on PHOENIX-6133 at 9/14/20, 2:57 PM:
-----------------------------------------------------------------
Changes to Hadoop happened during hadoop-2.9 (https://issues.apache.org/jira/browse/HADOOP-14216 and https://issues.apache.org/jira/browse/HADOOP-14727 )
was (Author: mihir6692):
Changes to Hadoop happened during hadoop-2.9 (https://issues.apache.org/jira/browse/HADOOP-14727)
> Exclude transitive dependency of hadoop-common STAX2 and WOODSTOX jars from phoenix-client JAR
> ----------------------------------------------------------------------------------------------
>
> Key: PHOENIX-6133
> URL: https://issues.apache.org/jira/browse/PHOENIX-6133
> Project: Phoenix
> Issue Type: Sub-task
> Reporter: Mihir Monani
> Assignee: Mihir Monani
> Priority: Major
>
> The issue here is :- # HBase does not have any fat JARs in it's libs folder i.e. they don't bundle any JAR in hbase.tar.gz
> # When Phoenix builds phoenix-client JAR, it includes many upstream JARs as part of the JAR.
> # If any application is bundling all upstream JARs with it's transitive dependency also (like STAX2 and WOODSTOX JARs comes from hadoop-common) then they create conflicts and throws errors during calls like
> {code:java}
> HBaseConfiguration.create()
> {code}
> Error Stack Trace :-
> {code:java}
> Exception in thread "main" java.lang.NoSuchMethodError: com.ctc.wstx.stax.WstxInputFactory.createSR(Lcom/ctc/wstx/api/ReaderConfig;Lcom/ctc/wstx/io/SystemId;Lcom/ctc/wstx/io/InputBootstrapper;ZZ)Lorg/codehaus/stax2/XMLStreamReader2;
> at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2752)
> at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2736)
> at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2787)
> at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2761)
> at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2641)
> at org.apache.hadoop.conf.Configuration.get(Configuration.java:1103)
> at org.apache.hadoop.conf.Configuration.getTrimmed(Configuration.java:1157)
> at org.apache.hadoop.conf.Configuration.getBoolean(Configuration.java:1562)
> at org.apache.hadoop.hbase.HBaseConfiguration.checkDefaultsVersion(HBaseConfiguration.java:73)
> at org.apache.hadoop.hbase.HBaseConfiguration.addHbaseResources(HBaseConfiguration.java:87)
> at org.apache.hadoop.hbase.HBaseConfiguration.create(HBaseConfiguration.java:102)
> at com.project.service.ServiceStart.main(ServiceStart.java:198)
> {code}
> To avoid this kind of issues, we should start excluding JARs from phoenix-client JARs which are part of upstream project's transitive dependency.
> One such instance is to exclude STAX2 and WOODSTOX jars from phoenix-client JAR.
> This is happening with below code version :-
> *Hadoop-2.10 (between 2.7 and 2.10 , above mentioned JARs are introduced.)*
> *HBase-1.6*
> *Phoenix-4.14.3*
--
This message was sent by Atlassian Jira
(v8.3.4#803005)