You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "Raymond Augé (Jira)" <ji...@apache.org> on 2021/06/27 15:56:00 UTC

[jira] [Resolved] (ARIES-2052) ProxyServices#supportsClassDefining() in weld 3.1.7 breaks aries-cdi

     [ https://issues.apache.org/jira/browse/ARIES-2052?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Raymond Augé resolved ARIES-2052.
---------------------------------
      Assignee: Raymond Augé
    Resolution: Fixed

> ProxyServices#supportsClassDefining() in weld 3.1.7 breaks aries-cdi
> --------------------------------------------------------------------
>
>                 Key: ARIES-2052
>                 URL: https://issues.apache.org/jira/browse/ARIES-2052
>             Project: Aries
>          Issue Type: Bug
>          Components: CDI
>            Reporter: Grzegorz Grzybek
>            Assignee: Raymond Augé
>            Priority: Major
>
> https://issues.redhat.com/browse/WELD-2581 (fixed in weld 3.1.7+) changed WeldStartup behavior from:
> {code:java}
> if (!registry.get(ProxyServices.class).supportsClassDefining()) {
>     // we will need to invoke CL.defineClass() ourselves, crack open those methods eagerly
>     ClassFileUtils.makeClassLoaderMethodsAccessible();
> }
> {code}
> to:
> {code:java}
> ProxyServices proxyServices = registry.get(ProxyServices.class);
> if (!proxyServices.supportsClassDefining()) {
>     throw BootstrapLogger.LOG.proxyServicesWithoutClassDefining(proxyServices.getClass().getName());
> }
> {code}
> However {{org.apache.aries.cdi.weld.BundleResourcesLoader()}} doesn't override default method from the ProxyServices interface:
> {code:java}
> default boolean supportsClassDefining() {
>     return false;
> }
> {code}
> And throws an exception at runtime.



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