Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-2581

Illegal reflective access warning appears using JDK12+

    XMLWordPrintable

    Details

      Description

      An illegal-access warning may appear when starting the servlet container (i.e. Tomcat) using JDK12+ :
      ...
      INFO: WELD-ENV-000020: Using jandex for bean discovery
      WARNING: An illegal reflective access operation has occurred
      WARNING: Illegal reflective access by org.jboss.weld.util.bytecode.ClassFileUtils$1 (file:../WeldIllegalAccessWarn/WebContent/WEB-INF/lib/weld-core-impl-3.1.1.Final.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int)
      WARNING: Please consider reporting this to the maintainers of org.jboss.weld.util.bytecode.ClassFileUtils$1
      WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
      WARNING: All illegal access operations will be denied in a future release
      ...

      Note that this warning does not appear if setting the JDK runtime with the parameter --add-opens=java.base/java.lang=ALL-UNNAMED

      Attached a war file with a simple web app to reproduce the problem + log file

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              manovotn Matěj Novotný
              Reporter:
              caristu Carlos Aristu (Inactive)
              Votes:
              4 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: