Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Kotlin pipeline stopped compiling: ExceptionInInitializerError > Unable to make protected void

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?

1 answer

1 accepted

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

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira

Admins, notify your Jira instance of system-wide changes with the new admin announcement banner

Hi All! We’re excited to share the launch of an announcement banner that lets Jira site administrators communicate directly to their users across their  Jira Cloud instance.  ...

483 views 16 17
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you