So, my project was working fine and for some odd reason it starts to falling the build.
Looking at it, I found this
[ERROR] java.lang.ExceptionInInitializerError
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected void java.util.ResourceBundle.setParent(java.util.ResourceBundle) accessible: module java.base does not "opens java.util" to unnamed module @646427f7
Looking into I saw some posts in the IntelliJ issues about this, pointing to java 16 and kotlin compiler.
My poem is set to
<properties>
<java.version>14</java.version>
<kotlin.version>1.4.31</kotlin.version>
</properties>
Any ideas on this one?
So, finally found a answer, actually very simple one.
Just specify the java version in the pipeline yml file.
At the first line whe you have
image: maven:3.6.3
add the -java version
I changed mine to: image: maven:3.6.3-jdk-14
Since this error is caused by how kotlin access some methos in java that were changed in java 16, so they don't work anymore. And bitbucket has upgraded it images with the last version of java, which cause this issue to happen.
Would be nice if the bitbucket detect if you have a kotlin project and does not update the java
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.