Search code examples
jarwso2wso2-esbwso2-enterprise-integrator

wso2: updating jar files in server to latest versions


I'm trying to update (and replace) some of the jar files in my '<MI_HOME>/wso2/plugins folder' to the latest version since they have some vulnerabilities. When manually replacing (deleting the existing jars and adding the new ones) initially for few jars the server is running fine, but when trying for some jars it is not working. For eg; I wanted to replace the com.google.gson_2.8.5.jar with the com.google.gson_2.8.9.jar. While replacing it in the wso2/lib folder it works, but when adding to wso2/components/plugins I get an error as follows : ERROR {SynapseHandlersLoader} - Error creating Handler for class name : org.wso2.micro.integrator.dataservices.odata.endpoint.ODataPassThroughHandler java.lang.ClassNotFoundException: org.wso2.micro.integrator.dataservices.odata.endpoint.ODataPassThroughHandler cannot be found by synapse-core_2.1.7.wso2v227

and

FATAL {ServiceBusInitializer} - Couldn't initialize the ESB... org.apache.synapse.SynapseException: Error creating Handler for class name : org.wso2.micro.integrator.dataservices.odata.endpoint.ODataPassThroughHandler

The same goes for other jars like the 'com.google.guava_32.0.0-jre.jar'. I even tried editing the wso2/components/artifacts.xml file too, but to no avail.

I was wondering if my approach was wrong or if i'm missing something.


Solution

  • You can't update WSO2 dependencies like that. One option is the build the product again from the source or you can migrate to a newer WSO2 product version where the issues are fixed.