Skip to content

Cannot define class using reflection #99

@weisern

Description

@weisern

Simply cloning the DataflowTemplates repo (yesterday's commit id: df38854) in GCP cloudshell, and
running a single GCP Cloud Build yaml step with maven goal of 'test':

steps:
- name: 'gcr.io/cloud-builders/mvn'
  id: 'Build, Test, ...'
  args:
  - 'clean'
  - 'test'
  - '--batch-mode'

...results in unit test errors.

CB_unit_test_errors.txt

Example:
org.apache.beam.vendor.guava.v26_0_jre.com.google.common.util.concurrent.UncheckedExecutionException: java.lang.UnsupportedOperationException: Cannot define class using reflection: Cannot define nest member class java.lang.reflect.AccessibleObject$Cache + within different package then class org.apache.beam.vendor.bytebuddy.v1_9_3.net.bytebuddy.mirror.AccessibleObject
Caused by: java.lang.UnsupportedOperationException: Cannot define class using reflection: Cannot define nest member class java.lang.reflect.AccessibleObject$Cache + within different package then class org.apache.beam.vendor.bytebuddy.v1_9_3.net.bytebuddy.mirror.AccessibleObject

The Cloud Build, Dataflow, and Compute service accounts have already been granted appropriate roles. All necessary APIs are enabled.

It is using pom.xml from commit id: df38854 where :
<beam.version>2.18.0</beam.version>
<java.version>1.8</java.version>

Adding the below dependency for artifactId, beam-vendor-bytebuddy-1_9_3, to pom.xml still produces same errors:
https://mvnrepository.com/artifact/org.apache.beam/beam-vendor-bytebuddy-1_9_3/0.1

<!-- https://mvnrepository.com/artifact/org.apache.beam/beam-vendor-bytebuddy-1_9_3 -->
<dependency>
    <groupId>org.apache.beam</groupId>
    <artifactId>beam-vendor-bytebuddy-1_9_3</artifactId>
    <version>0.1</version>
</dependency>

Help please?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions