Collaborative Editing cannot be enabled in Confluence due to "java.lang.NumberFormatException: For input string" error
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
Collaborative Editing cannot be enabled. When making the following actions, the UI hangs or loads indefinitely:
- Go to Cog → General Configuration → Collaborative editing
- Click on Change mode
- Set to ON
- Or, restart Synchrony
The following appears in the atlassian-confluence.log
2018-06-10 10:00:33,650 INFO [ListenableFutureAdapter-thread-1] [plugins.synchrony.bootstrap.DefaultSynchronyProcessManager] startup Starting Synchrony and enabling Collaborative Editing
2018-06-10 10:00:33,655 ERROR [Long running task: Restart Synchrony Task] [plugins.synchrony.tasks.AbstractConfigLongRunningTask] runInternal An error occurred when running a Synchrony ConfigLongRunningTask
-- url: /rest/synchrony-interop/restart | referer: http://wiki.confluence.com/admin/confluence-collaborative-editor-plugin/configure.action | traceId: 0c88ade652e9e0 | userName: admin
java.lang.NumberFormatException: For input string: ""
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:592)
at java.lang.Integer.parseInt(Integer.java:615)
at com.atlassian.confluence.plugins.synchrony.utils.SynchronyProcessUtil.killRunningSynchronyProcess(SynchronyProcessUtil.java:49)
at com.atlassian.confluence.plugins.synchrony.bootstrap.DefaultSynchronyProcessManager.startup(DefaultSynchronyProcessManager.java:521)
at com.atlassian.confluence.plugins.synchrony.bootstrap.DefaultSynchronyProcessManager.lambda$restart$15(DefaultSynchronyProcessManager.java:734)
at com.atlassian.util.concurrent.Promises$Of$1.apply(Promises.java:263)
at com.atlassian.util.concurrent.Promises$2.onSuccess(Promises.java:185)
at com.google.common.util.concurrent.Futures$6.run(Futures.java:1319)
at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:457)
at com.google.common.util.concurrent.ExecutionList.executeListener(ExecutionList.java:156)
at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:145)
at com.google.common.util.concurrent.JdkFutureAdapters$ListenableFutureAdapter$1.run(JdkFutureAdapters.java:177)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Diagnosis
Environment
- Confluence 6+
Diagnostic Steps
Check if enabling Collaborative editing through REST cause the same error by running this on a terminal:
curl -X POST --user admin_user:password --header "X-Atlassian-Token: no-check" https://your.confluence.url/rest/synchrony-interop/disable
Make sure to replace the admin_user:password with your admin credentials, and the Confluence base URL
- Check that there is no Synchrony process running
Cause
Confluence tries to kill the Synchrony process, but Synchrony is not currently running or it is unable to stop the process. The error likely comes from a corrupt cache/file.
Resolution
- From the Manage Add-ons page, disable and re-enable the Synchrony Interop plugin
- Shutdown Confluence
- Clear the plugin cache
Remove the /confluence_install/temp/synchrony.pid file
- Restart Confluence
- Restart Synchrony / Collaborative editing