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

Tomo Suzuki commented on BEAM-9304:
-----------------------------------

The situation will be fixed by Beam 2.20.0. Dependency trees of the sample 
project:
 * With 2.18.0 and 2.19.0, it picks up 
io.opencensus:opencensus-api:jar:0.*15*.0 through 
com.google.cloud.bigtable:bigtable-client-core:jar:1.8.0
 2.18.0 [https://gist.github.com/suztomo/6217ae075b48bafc504e47af0536d973]
 2.19.0 [https://gist.github.com/suztomo/c6a1119be1926fd0ae382d4c43dac454]
 * With 2.20.0-SNAPSHOT and With 2.21.0-SNAPSHOT, it picks up 
io.opencensus:opencensus-api:jar:0.24.0 through com.google.api:gax:jar:1.53.0
 2.20.0-SNAPSHOT 
[https://gist.github.com/suztomo/4805beec96d406b50f3f485c017961d2]
 2.21.0-SNAPSHOT 
[https://gist.github.com/suztomo/2f8f9bda33d0f029a261174958579c54]

> beam-sdks-java-io-google-cloud-platform imports conflicting versions for 
> BigTable and Spanner
> ---------------------------------------------------------------------------------------------
>
>                 Key: BEAM-9304
>                 URL: https://issues.apache.org/jira/browse/BEAM-9304
>             Project: Beam
>          Issue Type: Bug
>          Components: io-java-gcp
>    Affects Versions: 2.18.0
>            Reporter: Knut Olav Loite
>            Assignee: Chamikara Madhusanka Jayalath
>            Priority: Critical
>             Fix For: 2.20.0
>
>         Attachments: SpannerRead.java, pom.xml
>
>
> If I include `beam-sdks-java-io-google-cloud-platform` version 2.18.0 in a 
> project and try to use `SpannerIO`, the exception 
> `java.lang.NoClassDefFoundError: io/opencensus/trace/Tracestate`. This seems 
> to be caused by conflicting versions of `io.opencensus:opencensus-api` being 
> included by the BigTable client and the Spanner client. BigTable imports 
> version 0.15.0. Spanner depends on 0.18.0, but as they are at the same level 
> in the dependency tree and BigTable is defined first, version 0.15.0 is used.
>  
> The workaround for this issue is to exclude the BigTable client in the 
> project pom in order to be able to use SpannerIO.
>  
> An example pom and simple Java class are included. If the commented exclusion 
> of the BigTable client is removed, the example will run without problems. The 
> example will also run without problems on Beam version 2.17 without the 
> exclusion.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to