Skip to content

BUG: Java reflection issue in Jenkins windows machine with com.deque.html.axe-core selenium Maven Dependency #503

Open
@Bajjuri

Description

@Bajjuri

Problem : I want to add JVM Arguments (--add-opens java.base/java.lang=ALL-UNNAMED) in Jenkins Machine, so that it can pick those arguments when Jenkins job runs. This is to handle the reflection issue with Java packages.

java.lang.reflect.InaccessibleObjectException: Unable to make final void java.lang.Throwable.setCause(java.lang.Throwable) accessible: module java.base does not "opens java.lang" to unnamed module @74235045

Environment Happening In

  • QA

To Reproduce
Steps to reproduce the behavior:

add the following dependency in pom.xml and try to use any of the AxeBuilder Methods or AxeReporter then it is throwing the reflection issue

com.deque.html.axe-core
selenium
4.10.1

Desktop (please complete the following information):

  • Product: axe-core-maven-html
  • Product Version: 4.10.1
  • Latest Product Version it is NOT happening in: [e.g. v4.7.2]
  • OS: Windows Jenkins machine
  • Browser - Chrome
  • Browser Version - Latest 134.0.6998.89

Additional context

In Windows Jenkins Machine, i tried these and not working.

  1. I tried adding arguments in jenkins.xml file but that is not helping.
  2. I tried the global setting in the windows variables but then Jenkins wouldn't restart.
  3. I added Jenkins specific JENKINS_JAVA_OPTIONS that really did not help either.

In Local i fixed this by doing below change in IDE.

Go to Window → Preferences → Java → Installed JREs. Select the JRE you're using, click Edit, and there will be a line for Default VM Arguments which will apply to every execution. For instance, I use this on OS X to hide the icon from the dock, increase max memory and turn on assertions:
--add-opens java.base/java.lang=ALL-UNNAMED

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