Mr.D
Mr.D

Reputation: 7873

WSO2 EI, Integration Studio, custom mediator inside carbon application

I have created my custom mediator inside my ESB project by Integration Studio like this:

Custom mediator

After that I build my project as carbon application:

enter image description here

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

Answers (1)

Dilan Premarathna
Dilan Premarathna

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.

[1]-https://medium.com/wso2-enterprise-integrator-wso2-dev-studio-wso2/developing-and-debugging-custom-mediators-using-wso2-integration-studio-a3d974d1a2cf

Upvotes: 1

Related Questions