In the other thread you tell that you import this certificate (created by your internal CA, so it is not globally trusted) to Openfire’s keystore. But Spark has its own Java and its own keystore. So you have to do the same with Spark. Or use certificate known for Java keystore. Or use Accept all certificates option in Spark.
This is the only thread I was posting in. So you might be confusing usernames haha. However. I found some good instructions here: https://alpha-labs.net/2014/12/openfire-and-ciphers/
Where i just deleted and created a new Java Keystore with my appropriate certificates. Which are certificates signed by a CA. It worked.