I had a very quick look - I wonder if we simply need to move to
MethodHandles.Lookup.defineClass():
https://docs.oracle.com/javase/9/docs/api/java/lang/invoke/MethodHandles.Lookup.html#defineClass-byte:A-
in the LocalBeanProxyFactory. There's likely a couple of other libraries
that TomEE uses that do similar things, such as OWB and OpenJPA, so we'll
need to check that they do the right thing in Java 17 as well.

Jon

On Mon, Sep 20, 2021 at 9:08 AM Zowalla, Richard <
[email protected]> wrote:

> Hi ladies,
>
> I wanted to start a discussion about TomEE and its Java 17
> compatibility.
>
> I did some tests in one of our demo projects It looks like that "
> --illegal-access=permit" was removed in Java 17, which leads to
> some InaccessibleObjectException [1].
>
> Does anybody know, if there are solutions / workarounds for it in Java
> 17 or do we need to fix it? If so: how? ;)
>
> I bet, that many other frameworks / containers will run in this issue,
> so maybe someone already thought about a possible solution? Discussion
> seems to be "hot" [2].
>
> Gruss
> Richard
>
>
> [1] https://gist.github.com/rzo1/5c1d0724a700e262a2e2824ded9f32ab
> [2] https://twitter.com/delabassee/status/1438446396865224705
>
>
>

Reply via email to