1
votes

I am trying to access a service that I created in WSO2 Data Service Server 3.2.2. using the WSO2 Enterprise Service Bus 4.9.0. I generated the source code to access the service operations, and then created a class mediator using a Mediator Project in the WSO2 Developer Studio. First, the mediator simply calls an operation and print the obtained response. When I access the endpoint through a java application, it works, but when I put the same logic inside the mediator and load it in ESB, I receive the following error:

[2016-05-12 11:22:54,632] ERROR - NativeWorkerPool Uncaught exception javax.xml.ws.spi.FactoryFinder$ConfigurationError: Provider org.apache.cxf.jaxws.spi.ProviderImpl not found at javax.xml.ws.spi.FactoryFinder$2.run(FactoryFinder.java:130) at javax.xml.ws.spi.FactoryFinder.doPrivileged(FactoryFinder.java:220) at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:124) at javax.xml.ws.spi.FactoryFinder.access$200(FactoryFinder.java:44) at javax.xml.ws.spi.FactoryFinder$3.run(FactoryFinder.java:211) at javax.xml.ws.spi.FactoryFinder.doPrivileged(FactoryFinder.java:220) at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:160) at javax.xml.ws.spi.Provider.provider(Provider.java:43) at javax.xml.ws.Service.(Service.java:35) at org.wso2.ws.dataservice.myDSSDataService.(myDSSDataService.java:42) at mediators.DSSMediator.getVolume(DSSMediator.java:12) at mediators.DSSMediator.mediate(DSSMediator.java:22) at org.apache.synapse.mediators.ext.ClassMediator.mediate(ClassMediator.java:78) at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:81) at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:48) at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:149) at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:185) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180) at org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:317) at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:363) at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:142) at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)

2
Did you copy your class mediator and all other necessary jars into the $ESB_HOME/repository/components/lib directory.Ravindra Ranwala

2 Answers

1
votes

First of all to fetch the data from DSS and expose it through ESB does not need a class mediator. Usually we use class mediator to extend the ESB. Could you please let us know the purpose of the class mediator and your usecase. You may refer blogpost [1] to get this thing done. Also please check whether you have copied your database driver into the $DSS_HOME/repository/components/lib directory.

[1] http://dakshithar.blogspot.com/2014/05/entity-aggregation-with-wso2-esb-and_14.html

0
votes

Thank you for your response. The idea of use the class mediator in our usecase is to inject a business logic(operations) in the middle of the services' orchestration. Specifically, we can capture the data returned from one DSS data service, process them(using certain computations) and them put the result into the same service flow.