[
https://issues.apache.org/jira/browse/BEAM-7556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17151994#comment-17151994
]
Silvan Hollenstein edited comment on BEAM-7556 at 7/6/20, 12:46 PM:
--------------------------------------------------------------------
Hi,
Is there a solution for this problem? I'm struggling with the same error
message when running JUnit tests. Well, almost the same:
{code:java}
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{code}
I've tried with the latest Beam version (2.22.0) and with different Java
versions. The error occurs when running JUnit tests using
{{org.apache.beam.sdk.testing.TestPipeline}}. I've never done anything with
shading, so I wouldn't know which package I would have to shade. Any hints on
what I could try?
The full stacktrace: [^error.txt]
Thanks
Silvan
was (Author: shollenstein):
Hi,
Is there a solution for this problem? I'm struggling with the same error
message when running JUnit tests. Well, almost the same:
{code:java}
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{code}
{{}}I've tried with the latest Beam version (2.22.0) and with different Java
versions. The error occurs when running JUnit tests using
{{org.apache.beam.sdk.testing.TestPipeline}}. I've never done anything with
shading, so I wouldn't know which package I would have to shade. Any hints on
what I could try?
The full stacktrace: [^error.txt]
Thanks
Silvan
> Enable to upgrade proxy generation independently of beam for java support
> -------------------------------------------------------------------------
>
> Key: BEAM-7556
> URL: https://issues.apache.org/jira/browse/BEAM-7556
> Project: Beam
> Issue Type: Task
> Components: sdk-java-core
> Affects Versions: 2.13.0
> Reporter: Romain Manni-Bucau
> Priority: P2
> Fix For: Not applicable
>
> Attachments: error.txt
>
>
> Beam is now using a custom shaded version of bytebudy which makes impossible
> - until you reshade - to upgrade bytebuddy without requiring a new beam
> release.
> However with the fast release rate of the JVM it is important to be able to
> upgrade bytebuddy - at least while beam is using it which is technically not
> a strong requirement - to enable to run on the new JVM.
> For example, last beam release does not support recent java:
> {code}
> 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.repackaged.beam_sdks_java_core.net.bytebuddy.mirror.AccessibleObject
> {code}
> My preference to fix this issue would be to relax the proxying definition to
> just use a "proxy classloader" where the proxy would be defined but it
> requires to be able to attach it to an execution - where beam is not yet
> super clean.
> Alternative is to have a SPI for the asm usage and enable to user to replace
> the bytebuddy impl with either a not shaded version or even a pure asm one to
> let him control the dependencies.
> Romain
--
This message was sent by Atlassian Jira
(v8.3.4#803005)