NullPointerException when starting Synchrony

When I set up Confluence, Synchrony kept failing to start. I turned up logging settings until it logged the error, which was this:

2017-12-08 13:28:50,156 WARN [synchrony-interop-executor:thread-2] [plugins.synchrony.bootstrap.DefaultSynchronyProcessManager] lambda$startProcess$2 Failed to setup Synchrony, turn on debug for stack trace: null
 -- url: /confluence/rest/synchrony-interop/restart | referer: https://REDACTED/confluence/admin/confluence-collaborative-editor-plugin/configure.action | traceId: REDACTED | userName: REDACTED
2017-12-08 13:28:50,157 DEBUG [synchrony-interop-executor:thread-2] [plugins.synchrony.bootstrap.DefaultSynchronyProcessManager] lambda$startProcess$2
 -- url: /confluence/rest/synchrony-interop/restart | referer: https://REDACTED/confluence/admin/confluence-collaborative-editor-plugin/configure.action | traceId: REDACTED | userName: REDACTED
    at java.util.Hashtable.put(
    at java.util.Properties.setProperty(
    at com.atlassian.confluence.plugins.synchrony.bootstrap.DefaultSynchronyProcessManager.setupEnvironment(
    at com.atlassian.confluence.plugins.synchrony.bootstrap.DefaultSynchronyProcessManager.trySetup(
    at com.atlassian.confluence.plugins.synchrony.bootstrap.DefaultSynchronyProcessManager.lambda$startProcess$2(
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(
    at java.util.concurrent.ScheduledThreadPoolExecutor$
    at java.util.concurrent.ThreadPoolExecutor.runWorker(
    at java.util.concurrent.ThreadPoolExecutor$

Looking at the source code, I think I see the problem. We're using PostgreSQL with non-password-based authentication, so we're not defining hibernate.connection.password in confluence.cfg.xml, so Confluence tries to set the password property to null, which crashes since properties are stored in a Hashtable, which isn't allowed to contain nulls.

Once I figured this out, I was able to work around it (by defining a dummy value for hibernate.connection.password), but since the rest of Confluence (and every other Atlassian product that I've set up so far) all work fine without defining a database password, this seems like a bug.

2 answers

1 accepted

0 votes
Answer accepted
Ann Worley Atlassian Team Dec 11, 2017

Our setup doc for PostgreSQL requires a user name and password so I can't really call the behavior a bug, even if you can make it work for other Atlassian products.

I definitely see the value of supporting other authentication methods, so I created this suggestion ticket: Provide support for PostgreSQL authentication other than password based

The ticket is public so you may comment and vote on it to communicate directly with the development team. That will also add you to notifications so you will see updates.

We have the same problem but with the use of Oracle Wallet. Confluence works just fine but Synchrony does not start.

I tried to follow your Suggestion and set hibernate.connection.password to the following

    <property name="hibernate.connection.password"></property>

but this resulted in a looked Oracle user.

Do I need to set other properties or hibernate.connection.password differently?

@Armin Dittrich hi Armin -- this is an old post; please avoid resurrecting old posts to try and get votes for this issue. Thanks. 

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Tuesday in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

206 views 2 10
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you