Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-9556

java.lang.IllegalAccessError with apache beam 2.19 and BigQuery

Details

    • Bug
    • Status: Resolved
    • P2
    • Resolution: Fixed
    • 2.19.0
    • Not applicable
    • beam-community
    • None
    • jdk8 kotlin 1.3.70

    Description

      Hi

       

      I was updating my dataflow code from Apache beam 2.18 to Apache beam 2.19

      As soon as I upgrade the dependency in my build.grade and try to run the flow with the direct runner to test, the code immediately fails with this exception:

       

      Exception in thread "main" com.google.common.util.concurrent.ExecutionError: java.lang.IllegalAccessError: tried to access field io.opencensus.trace.unsafe.ContextUtils.CONTEXT_SPAN_KEY from class io.grpc.internal.CensusTracingModule$TracingClientInterceptor
      	at com.google.common.util.concurrent.Futures.wrapAndThrowUnchecked(Futures.java:1183 undefined)
      	at com.google.common.util.concurrent.Futures.getUnchecked(Futures.java:1176 undefined)
      	at com.google.api.gax.rpc.ApiExceptions.callAndTranslateApiException(ApiExceptions.java:53 undefined)
      	at com.google.api.gax.rpc.UnaryCallable.call(UnaryCallable.java:112 undefined)
      	at com.google.cloud.bigquery.storage.v1beta1.BigQueryStorageClient.createReadSession(BigQueryStorageClient.java:237 undefined)
      	at org.apache.beam.sdk.io.gcp.bigquery.BigQueryServicesImpl$StorageClientImpl.createReadSession(BigQueryServicesImpl.java:1044 undefined)
      	at org.apache.beam.sdk.io.gcp.bigquery.BigQueryStorageSourceBase.split(BigQueryStorageSourceBase.java:139 undefined)
      	at org.apache.beam.sdk.io.gcp.bigquery.BigQueryStorageTableSource.split(BigQueryStorageTableSource.java:42 undefined)
      	at org.apache.beam.runners.direct.BoundedReadEvaluatorFactory$InputProvider.getInitialInputs(BoundedReadEvaluatorFactory.java:214 undefined)
      	at org.apache.beam.runners.direct.ReadEvaluatorFactory$InputProvider.getInitialInputs(ReadEvaluatorFactory.java:89 undefined)
      	at org.apache.beam.runners.direct.RootProviderRegistry.getInitialInputs(RootProviderRegistry.java:76 undefined)
      	at org.apache.beam.runners.direct.ExecutorServiceParallelExecutor.start(ExecutorServiceParallelExecutor.java:155 undefined)
      	at org.apache.beamners.direct.DirectRunner.run.run(DirectRunner.java:208 undefined)
      	at org.apache.beamners.direct.DirectRunner.run.run(DirectRunner.java:67 undefined)
      	at org.apache.beam.sdk.Pipeline.run(Pipeline.java:315 undefined)
      	at org.apache.beam.sdk.Pipeline.run(Pipeline.java:301 undefined)
      	at reports.pipelines.LeadsEnricher.runPipeline(LeadsEnricher.kt:87 undefined)
      	at reports.PipelineRunnerKt.main(PipelineRunner.kt:13 undefined)
      Caused by: java.lang.IllegalAccessError: tried to access field io.opencensus.trace.unsafe.ContextUtils.CONTEXT_SPAN_KEY from class io.grpc.internal.CensusTracingModule$TracingClientInterceptor
      	at io.grpc.internal.CensusTracingModule$TracingClientInterceptor.interceptCall(CensusTracingModule.java:384 undefined)
      	at io.grpc.ClientInterceptors$InterceptorChannel.newCall(ClientInterceptors.java:156 undefined)
      	at io.grpc.internal.CensusStatsModule$StatsClientInterceptor.interceptCall(CensusStatsModule.java:685 undefined)
      	at io.grpc.ClientInterceptors$InterceptorChannel.newCall(ClientInterceptors.java:156 undefined)
      	at com.google.api.gax.grpc.GrpcHeaderInterceptor.interceptCall(GrpcHeaderInterceptor.java:81 undefined)
      	at io.grpc.ClientInterceptors$InterceptorChannel.newCall(ClientInterceptors.java:156 undefined)
      	at com.google.api.gax.grpc.GrpcMetadataHandlerInterceptor.interceptCall(GrpcMetadataHandlerInterceptor.java:55 undefined)
      	at io.grpc.ClientInterceptors$InterceptorChannel.newCall(ClientInterceptors.java:156 undefined)
      	at io.grpc.internal.ManagedChannelImpl.newCall(ManagedChannelImpl.java:766 undefined)
      	at io.grpc.internal.ForwardingManagedChannel.newCall(ForwardingManagedChannel.java:63 undefined)
      	at com.google.api.gax.grpc.ChannelPool.newCall(ChannelPool.java:77 undefined)
      	at com.google.api.gax.grpc.GrpcClientCalls.newCall(GrpcClientCalls.java:88 undefined)
      	at com.google.api.gax.grpc.GrpcDirectCallable.futureCall(GrpcDirectCallable.java:58 undefined)
      	at com.google.api.gax.grpc.GrpcUnaryRequestParamCallable.futureCall(GrpcUnaryRequestParamCallable.java:65 undefined)
      	at com.google.api.gax.grpc.GrpcExceptionCallable.futureCall(GrpcExceptionCallable.java:64 undefined)
      	at com.google.api.gax.rpc.AttemptCallable.call(AttemptCallable.java:86 undefined)
      	at com.google.api.gax.rpc.RetryingCallable.futureCall(RetryingCallable.java:63 undefined)
      	at com.google.api.gax.rpc.RetryingCallable.futureCall(RetryingCallable.java:41 undefined)
      	at com.google.api.gax.tracing.TracedUnaryCallable.futureCall(TracedUnaryCallable.java:75 undefined)
      	at com.google.api.gax.rpc.UnaryCallable$1.futureCall(UnaryCallable.java:126 undefined)
      	at com.google.api.gax.rpc.UnaryCallable.futureCall(UnaryCallable.java:87 undefined)
      	... 15 more
      

      I'm using latest Kotlin version

       

      As I said the only thing I've done is to change the version library to 2.19.0 in my dependency manager

       

      Thanks

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ilTera Stefano
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: