Switching from OracleJDK to AdoptOpenJDK fails
Asked by kuang5:

Hi all, I set the Confluence to run on AdoptOpenJDK, however, it shows error message "Exec format error". Please see screenshot below. The Confluence version is 7.0.3 and the AdoptOpenJDK version is 13.0.1. I manually installed Confluence on a server.

![Untitled.png](/t5/image/serverpage/image-id/73037i6958A4212D0870F3/image-size/large?v=v2&px=999 "Untitled.png")According the version support by Confluence, AdoptOpenJDK supports AdoptOpenJDK since version 6.13.2. Please see screenshot below. It is strange that the test fails. Could anyone advise if I did anything wrong?

![v.png](/t5/image/serverpage/image-id/73038i342B85428FA838AF/image-size/large?v=v2&px=999 "v.png")


Answers:
author: Alexis Robert
body: Hi [@kuang5](/t5/user/viewprofilepage/user-id/3618432) ,

looks like you're getting this error because you're using the arm version, for Linux the correct version is this one : <https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jdk_x64_linux_hotspot_8u232b09.tar.gz>

Let me know if this works,

--Alexis

comments: author: kuang5
body: Thank you for the advice, Alexis. The same error still occurs as screenshot below shows.

![Untitled.png](https://community.atlassian.com/t5/image/serverpage/image-id/73050i08CBDC9021C5E007/image-size/large?v=v2&px=999 "Untitled.png")


author: Alexis Robert
body: This is definitely because you're not using the right biinary for your server.

Can you check what's the output of "uname -a" on your server ?


author: kuang5
body: The output is:

Linux SERVERNAME 4.9.0-11-686-pae #1 SMP Debian 4.9.189-3+deb9u1 (2019-09-20) i686 GNU/Linux


author: Alexis Robert
body: Did you download the Linux installer (or tar.gz archive) from <https://www.atlassian.com/software/confluence/download> ?


author: kuang5
body: No, I downloaded the tar.gz archive and extracted it to the home directory.


author: kuang5
body: Hi [@Alexis Robert](/t5/user/viewprofilepage/user-id/1213386), does Confluence only support version 8 of AdoptOpenJDK? Also, I tried all versions from 8 to 13 and no one works with Confluence.

The strange thing is that the Confluence 7.0.3 can run on OpenJDK, which is not said to be supported by Confluence.


author: kuang5
body: Another basic question is that I want to conform with you that the way I did to switch from OracleJDK to AdoptOpenJDK by changing the value of JAVA_HOME (JRE_HOME is not set) is correct, right? Should I delete all other JAVA libraries in case they will affect Confluence choosing the right JAVA library?


author: Alexis Robert
body: Hi [@kuang5](/t5/user/viewprofilepage/user-id/3618432) ,

Confluence 7.0.3 supports AdoptOpenJDK, so there's no problem here. Also, only AdoptOpenJDK 8 or 11 is supported by Confluence, no need to try other versions.

I would suggest that you remove the old Oracle JDK, just in case.

For your issue, there's definitely something wrong with the version of Confluence you're using as the error clearly says "this is not the correct OS to run this". So, I would stick with a Confluence version where you don't have this error, 7.0.3 is fine for example.


author: kuang5
body: Hi [@Alexis Robert](/t5/user/viewprofilepage/user-id/1213386) , I think the issue is that my VM is x86-32bit system, but there is no corresponding AdoptOpenJDK version support it. I will create a X64 system to run the Confluence on AdoptOpenJDK. Thank you.


author: Alexis Robert
body: Hi [@kuang5](/t5/user/viewprofilepage/user-id/3618432) ,

yes you're right, that must be the issue. Let me know if switching to 64 bits fixes the issue for you !


Tags: adopt-open-jdk

confluence-server

server