Problem Releasing APP-UI module

Hello all…

I’m having a strange issue when trying to release the APP UI module… when I run the standard build via CI, it builds successfully, and all the tests pass, but when I run the release job, the test fail, with this issue:

java.lang.IllegalAccessError: class jdk.internal.reflect.ConstructorAccessorImpl loaded by org.powermock.core.classloader.MockClassLoader @2781e022 cannot access jdk/internal/reflect superclass jdk.internal.reflect.MagicAccessorImpl

It looks like this problem may occur on newer versions of Java, see:

It is possible that the release scripts are somehow using a later version of Java than Java 8? I’m seeing some referenced to JDK 11 in the release logs (though there are referenced to JDK 8 as well).

fyi @dkayiwa @ibacher @cintiadr

Thanks and take care! Mark

So as part of the migration to Jetstream v2, I know we also upgraded the base image we use to Ubuntu 22.04. Probably what’s happened is that now the system default Java on the Bamboo agents is Java 11 rather than Java 8.

In Bamboo, the default job for APP UI is configured like this:

So notice we’re telling it to run Maven with JDK 8. However, on the release step the entry is configured like this:

Here, instead of directly calling Maven, we use this script, which handles some release-specific logic for us (largely determining what the next dev version should be if one wasn’t specified). In this environment, since we don’t specify otherwise, it runs Maven, but doesn’t specify which JDK to use so it’s falling back to the system default, hence the errors.

Probably the simplest thing to do is to add a new environment variable for the release job like this:

JAVA_HOME=${bamboo.capability.system.jdk.JDK 8}

Which should ensure its run using JDK 8 instead of JDK 11.

Makes total sense to me, @ibacher , thanks!

I’m happy to ticket this… anyone know what project this stuff belongs in? And where the release script stuff lives in GitHub?

Take care, Mark

This worked. I just modified the bamboo job and kicked it off and everything passed without issue. Version 1.16.0 of appui is released. @mogoodrich FYI

Thanks @ibacher !

1 Like

Thanks @mseaton !

@mogoodrich / @ibacher / @dkayiwa there may be a lot of jobs that we need to apply this same fix for above (setting JAVA_HOME to JDK 8 explicitly). This only rears its head when doing a release. @mogoodrich I just noticed a failure in releasing idgen, and then I saw it was successful, and now I see this has been applied there. Was that the fix?

Yes, that was the fix @mseaton … I meant to post a reminder to this post as well, but forgot… thanks for doing so, we should definitely remember to keep an eye out for this.