0
votes

This is my first time to write NTLM mediator followed by NTLM Mediator

The mediator project:

project

Exported Jar and [ESB_HOME]/repository/components/dropins

har

Proxy service to test:

enter image description here

The mediator seems not work:

output

Line 73 throw out exception:

Code

3

3 Answers

3
votes

You have to put jars into lib ($ESB_HOME/repository/components/lib). Delete jar in the dropins. As ESB start, it will put that jar into dropins folder. Try that.

If not you may have to add three folders as given in documentation[2].

Further references:

[1] https://docs.wso2.com/display/ESB490/Class+Mediator

[2] https://docs.wso2.com/display/ESB490/Places+for+Putting+Custom+Mediators

0
votes

The issue seems to be related to the mediation logic. The mediator seems to have deployed correctly since there is no ClassNotFound exceptions. To figure out the error you can add logs to the mediator or remote debug the mediator by starting ESB server in debug mode (./wso2server.sh debug 5005). You should debug the mediate() method. The error that you have got is thrown due to some exception being thrown in your class mediator's mediate() method.

0
votes

DilshaniS' answer is correct. You have to place your mediator jar in lib folder (also need to delete the existing jar in dropins folder). Following is the reason.

WSO2 products can only load/activate a jar placed in dropins folder only if it is written as an osgi component. In your case, it is just a jar. There are no classes which should be there in a osgi bundle. If it is a normal jar, you have to place it in the repository/components/lib folder. Then, when the server starts, it creates a osgi bundle from that jar and places it in the dropins folder. Then that osgi bundle gets activated and you are able to uses the classes in it.