Reputation: 7873
I have created my custom mediator inside my ESB project by Integration Studio like this:
After that I build my project as carbon application:
When I try to upload this car file, it throws me that kind of exception:
java.lang.ClassNotFoundException: com.example.mediators.UserApiXMLSignMediator cannot be found by synapse-core_2.1.7.wso2v99
Why this is happening? Did I miss something? I know that I can upload compiled *.jar
file into folder of wso2. However this is not feasible to me.
Upvotes: 1
Views: 910
Reputation: 1294
Please try to unzip the car file and check whether the relevant jar file is present within the car file. If the jar is not present then it implies that the issue is with the tooling project. The blog in [1] contains instructions on creating a class mediator with the integration studio. Please refer to the steps given and make sure there are no errors in the tooling project when creating the car file.
Please note that when you add a *.jar file into the lib folder it will be available to any mediation within the deployed server. But when the jar file is packed with the car file, the class mediator can be access only by the artifacts within that car file.
Upvotes: 1