You will need to first upgrade to Elasticsearch 7.17 and run the migration assistant as outlined in the documentation. There should be no compatibility issues doing that. Then you need to address any issues identified by the assistant before migrating to the latest version (if going to 7.17 does not resolve your issue).
The only supported way to upgrade jars within Elasticsearch is to upgrade Elasticsearch itself (as @Christian_Dahlqvist has recommended).
There is no safe way to upgrade dependencies on their own and it is entirely possible that you will break your cluster - sometimes in ways that cannot be repaired.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.