Synchrony won't start after Confluence update to 6.15.8
Asked by Duet Techadmin:

Hello all.

After updating from Confluence 6.13.4 to 6.15.8 on Windows 2012r2, Synchrony won't start. If I try and start it manually, I see this in atlassian-confluence.log:

```
java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.platform.win32.WinNT$OSVERSIONINFOEX
at oshi.software.os.windows.WindowsOSVersionInfoEx.<init>(WindowsOSVersionInfoEx.java:47)
at oshi.software.os.windows.WindowsOperatingSystem.<init>(WindowsOperatingSystem.java:54)
at oshi.SystemInfo.getOperatingSystem(SystemInfo.java:92)
at com.atlassian.confluence.plugins.synchrony.bootstrap.DefaultSynchronyProcessManager.getConfluenceProcessId(DefaultSynchronyProcessManager.java:688)
at com.atlassian.confluence.plugins.synchrony.bootstrap.DefaultSynchronyProcessManager.setupEnvironment(DefaultSynchronyProcessManager.java:389)
at com.atlassian.confluence.plugins.synchrony.bootstrap.DefaultSynchronyProcessManager.trySetup(DefaultSynchronyProcessManager.java:696)
at com.atlassian.confluence.plugins.synchrony.bootstrap.DefaultSynchronyProcessManager.lambda$startProcess$1(DefaultSynchronyProcessManager.java:590)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
```

My setup is very simple, I used the exe installer and don't have other separate components of Confluence (i.e. Synchrony running as its own daemon or external Java).

Synchrony was working fine in confluence 6.13.4.

Has anyone seen this error before?


Answers:
author: Stephen Sifers
body: Hello,

Thanks for reporting your issues with Synchrony having issues starting after a Confluence upgrade. The include error log does help to see what is going on. I would ask you to please check your versions of Java currently installed within your Windows server, we need to ensure that you're running Java x64 and not Java x86. This could most likely be the cause of the "java.lang.NoClassDefFoundError:"

If you've confirmed the proper Java is installed and being used as $JAVA_HOME and $JRE_HOME and you're still having the issue please let us know.

Regards,  
Stephen Sifers

comments: author: Stephen Sifers
body: Hello again,

After looking into this further, your issue looks to be related to a bug. Here is the bug request: [CONFSERVER-58784](https://jira.atlassian.com/browse/CONFSERVER-58784) along with the workaround for the issue:
> Downgrade the bundled AdoptOpenJDK from 1.8.0_222-10 to previously bundled JVM (i.e. **1.8.0_202-b08**) resolves the issue.
>
> Substitute C:\\Program Files\\Atlassian\\Confluence below if you have Confluence installed in a non-default location.
>
> 1. Download AdoptOpenJDK 8u202-b08 from <https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u202-b08/OpenJDK8U-jre_x64_windows_hotspot_8u202b08.zip>
> 2. Shutdown Confluence
> 3. Rename **C:\\Program Files\\Atlassian\\Confluence\\jre** to **C:\\Program Files\\Atlassian\\Confluence\\jre8u222-b10**
> 4. Extract **OpenJDK8U-jre_x64_windows_hotspot_8u202b08.zip** to C:\\Program Files\\Atlassian\\Confluence - it will extract with a sub-directory called jdk8u202-b08-jre
>    1. Rename the new C:\\Program Files\\Atlassian\\Confluence\\jdk8u202-b08-jre to **C:\\Program Files\\Atlassian\\Confluence\\jre**
> 5. Start Confluence and Collaborative Editing should now start

Please attempt the workaround and let us know the results.

Regards,  
Stephen Sifers


author: Duet Techadmin
body: Worked like a treat. Thanks!


author: Duet Techadmin
body: Hi Stephen.

Thank you for your reply.

I have Oracle JRE 8u221 x64, and the env variables are correctly set. I still have the same problem. But I thought that Confluence came with its own JRE. Is that not the case?

comments: author: Guido Kollande
body: Hey Duet Techadmin,

Confluence comes with a bundled JRE but to use it you have to start confluence using the "startup_bundled_jre.bat" instead of the service.


Tags: collaborative-editing

confluence-server

server

synchrony