Hi All - So i ran into weird issue today. We have an external saas provider jar file for which we created a bundle and installed it on our AEM server. We included this external saas provider jar file as dependency in our pom.xml and the code builds perfectly fine and our application jar file is deployed without any issues on server. When we execute our code on server, we were getting ClassNotFoundError for okhttp3/RequestBody which is expected by saas provider class. So we proceeded to create another bundle for okhttp3 and installed it on server. We checked OSGI Package dependency to ensure that required class which gave error before is found on the server. Even after creating and deploying okhttp3 bundle we are still getting same error when we execute our code.
We tried one more approach to fix this issue, which was to add Import-Package in 3rd party saas jar to explicitly mention okhttp3 dependency but still could not resolve the issue.
Here is rough diagram of dependency and issue which is occurring:
Any help/ pointers in resolving the issue will be highly appreciated.