Internal server error java.lang.NullPointerException

Hi All,
We are using openfire 4.1.4. And we are getting a lot of “Internal server error” error in logs.

2018.07.25 19:28:11 org.jivesoftware.openfire.spi.PresenceManagerImpl - Internal server error
java.lang.NullPointerException

Please let me know what is the root cause and how we can prevent it?
Thanks,
Anil

As with the other thread, i advice first to update to the latest version, to see if it still happens.