Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IllegalAccessError when GradleWrapperInDocker #143

Open
ppxl opened this issue Jan 8, 2025 · 0 comments · May be fixed by #144
Open

IllegalAccessError when GradleWrapperInDocker #143

ppxl opened this issue Jan 8, 2025 · 0 comments · May be fixed by #144
Labels

Comments

@ppxl
Copy link
Member

ppxl commented Jan 8, 2025

Since v2.5.0 this bug exists in the library but went unnoticed because of little usage.

Using GradleWrapperInDocker as mentioned in the docs Gradle gradlew = new GradleWrapperInDocker(this, gradleDockerImage) leads to this error:

...
java.lang.IllegalAccessError: class com.cloudogu.ces.cesbuildlib.GradleWrapperInDocker 
tried to access private field com.cloudogu.ces.cesbuildlib.GradleInDockerBase.credentialsId
 (com.cloudogu.ces.cesbuildlib.GradleWrapperInDocker and com.cloudogu.ces.cesbuildlib.GradleInDockerBase 
are in unnamed module of loader org.jenkinsci.plugins.workflow.cps.CpsGroovyShell$CleanGroovyClassLoader
 @3e1fa0e4)
...

The problem lies in the way the superclasses field credentialsId is supposed to be written while it does not contain any visibility modifier.

@ppxl ppxl added the bug label Jan 8, 2025
ppxl added a commit that referenced this issue Jan 8, 2025
Jenkins was not able to set the superclasses' field from the subclass.
This commit makes the field writable by subclasses and classes from the
same package.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant