It won’t be easy. Your server version is ancient (6 years old). It won’t update just installing on top without issues. You can try, but it might fail. You may try downloading all the intermittent versions from https://github.com/igniterealtime/Openfire/releases and installing them one by one. Maybe even one version per day. To see if everything works fine and fixing issues as they appear. I would say it may be easier just to scrap your server and start with a fresh 4.2.1 installation…
Spark issue is probably not related to Openfire version. But you haven’t explained what issue exactly do your users have. Btw, 2.6.3 might not work with Openfire 3.10+ versions. So you should first think about upgrading Spark.
Another option might be just to tell your users to use 2.6.3
P.S. in any case DO BACKUPS.