phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mihir Monani (Jira)" <j...@apache.org>
Subject [jira] [Updated] (PHOENIX-6133) Exclude transitive dependency of hadoop-common STAX2 and WOODSTOX jars from phoenix-client JAR
Date Mon, 14 Sep 2020 12:30:00 GMT

     [ https://issues.apache.org/jira/browse/PHOENIX-6133?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Mihir Monani updated PHOENIX-6133:
----------------------------------
    Description: 
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(PerfSrv.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.

> 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(PerfSrv.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 message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message