WSO2 - Unable to sendViaPost to url - wso2

I'm using WSO2 ESB to send JSON message using call mediator to Bitrix CRM. I had a look to all the posts and tutorials and I get always the same error:
HTTPSender - Unable to sendViaPost to url
After i switched Bitrix24 to use Nginx Push I have following problem on ESB.
TID[-1234] [EI] [2020-02-11 07:04:01,702] INFO {org.apache.axis2.transport.http.HTTPSender} - Unable to sendViaPost to url[https://xxxx.com/rest/update?id=33826]
org.opensaml.ws.soap.client.http.TLSProtocolSocketFactory.verifyHostname(TLSProtocolSocketFactory.java:233)
org.opensaml.ws.soap.client.http.TLSProtocolSocketFactory.createSocket(TLSProtocolSocketFactory.java:194)
org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387) org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:704)
org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:199)
org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:81)
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:459)
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:286)
org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:441)
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:227) org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
org.apache.synapse.message.senders.blocking.BlockingMsgSender.sendReceive(BlockingMsgSender.java:490)
org.apache.synapse.message.senders.blocking.BlockingMsgSender.send(BlockingMsgSender.java:382)
org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:88)
org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:85)
org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:547)
org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:384)
org.apache.synapse.endpoints.HTTPEndpoint.send(HTTPEndpoint.java:85)
org.apache.synapse.mediators.builtin.CallMediator.handleBlockingCall(CallMediator.java:164)
org.apache.synapse.mediators.builtin.CallMediator.mediate(CallMediator.java:119)
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:108)
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:70)
org.apache.synapse.config.xml.AnonymousListMediator.mediate(AnonymousListMediator.java:37)
org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:203)
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:108)
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:70)
org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:169)
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:108)
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:70)
org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:169)
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:108)
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:70)
org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
org.apache.synapse.mediators.builtin.ForEachMediator.mediateSequence(ForEachMediator.java:183)
org.apache.synapse.mediators.builtin.ForEachMediator.mediate(ForEachMediator.java:145)
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:108)
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:70)
org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:224)
org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:415)
org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:151)
org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
java.lang.Thread.run(Thread.java:748)
My call mediator looks like:
<property description="messageType JSON"
name="messageType"
scope="axis2"
type="STRING"
value="application/json"/>
<call blocking="true">
<endpoint>
<http method="POST"
statistics="enable"
trace="enable"
uri-template="{uri.var.RESTURL}">
<suspendOnFailure>
<errorCodes>400</errorCodes>
<initialDuration>0</initialDuration>
<progressionFactor>1.0</progressionFactor>
<maximumDuration>0</maximumDuration>
</suspendOnFailure>
</http>
</endpoint>
</call>
I've tried to send same message using Postman and It worked fine.
Thanks for any help.
UPDATE
Logs in admin panel are not full. I've checked manually on server and the problem is with:
javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
UPDATE2
Full stack:
[2020-02-11 22:18:01,953] [EI-Core] INFO - HTTPSender Unable to sendViaPost to url[https:/xxxx.com/rest/7]
javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
at sun.security.ssl.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:450)
at org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.verifyHostName(SSLProtocolSocketFactory.java:276)
at org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:186)
at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:704)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:199)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:81)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:459)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:286)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:441)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:227)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
at org.apache.synapse.message.senders.blocking.BlockingMsgSender.sendReceive(BlockingMsgSender.java:490)
at org.apache.synapse.message.senders.blocking.BlockingMsgSender.send(BlockingMsgSender.java:382)
at org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:88)
at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:85)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:547)
at org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:384)
at org.apache.synapse.endpoints.HTTPEndpoint.send(HTTPEndpoint.java:85)
at org.apache.synapse.mediators.builtin.CallMediator.handleBlockingCall(CallMediator.java:164)
at org.apache.synapse.mediators.builtin.CallMediator.mediate(CallMediator.java:119)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:108)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:70)
at org.apache.synapse.config.xml.AnonymousListMediator.mediate(AnonymousListMediator.java:37)
at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:203)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:108)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:70)
at org.apache.synapse.config.xml.AnonymousListMediator.mediate(AnonymousListMediator.java:37)
at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:203)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:108)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:70)
at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:169)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:108)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:70)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
at org.apache.synapse.mediators.builtin.ForEachMediator.mediateSequence(ForEachMediator.java:183)
at org.apache.synapse.mediators.builtin.ForEachMediator.mediate(ForEachMediator.java:145)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:108)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:70)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:224)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:415)
at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:151)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

There seems to be a known issue in Call mediator blocking="true" mode. Please try out the work around suggested in the issue.
As a workaround for this, we can disable switching to opensaml http
client by setting rampart.axiom.parser.pool=false in a server start
up.

Related

The service on the integrator is not deployed

The message repository/message processor in Enterprise Integrator WSO2 is not deploying. Deployment fails with an error:
Couldn't find repository location './repository/deployment/client'
Versions:
WSO2 enterprise integrator - 6.6.0
Windows 10Pro - 20H2
Server :
Linux - CentOS Linux 7 (Core)
CPE OS Name - cpe:/o:centos:centos:7
Kernel - Linux 3.10.0-1127.19.1.el7.x86_64
Architecture - x86-64
Logs from wso2carbon.log:
ERROR {org.apache.synapse.message.senders.blocking.BlockingMsgSender} - Error initializing BlockingMessageSender org.apache.axis2.AxisFault: Couldn't find repository location './repository/deployment/client'
at org.apache.axis2.deployment.FileSystemConfigurator.<init>(FileSystemConfigur ator.java:68)
at org.apache.axis2.context.Configur tionContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:210)
at org.apache.synapse.message.senders.blocking.BlockingMsgSender.init(BlockingMsgSender.java:98)
at org.apache.synapse.message.processor.impl.ScheduledMessageProcessor.initMessageSender(ScheduledMessageProcessor.java:489)
at org.apache.synapse.message.processor.impl.ScheduledMessageProcessor.init(ScheduledMessageProcessor.java:101)
at org.apache.synapse.message.processor.impl.forwarder.ScheduledMessageForwardingProcessor.init(ScheduledMessageForwardingProcessor.java:52)
at org.apache.synapse.deployers.MessageProcessorDeployer.deploySynapseArtifact(MessageProcessorDeployer.java:58)
at org.apache.synapse.deployers.AbstractSynapseArtifactDeployer.deploy(AbstractSynapseArtifactDeployer.java:200)
at org.wso2.carbon.application.deployer.synapse.SynapseAppDeployer.deployArtifactType(SynapseAppDeployer.java:1099)
at org.wso2.carbon.application.deployer.synapse.SynapseAppDeployer.deployArtifacts(SynapseAppDeployer.java:114)
at org.wso2.carbon.application.deployer.internal.ApplicationManager.deployCarbonApp(ApplicationManager.java:272)
at org.wso2.carbon.application.deployer.CappAxis2Deployer.deploy(CappAxis2Deployer.java:72)
at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:807)
at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)
at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:377)
at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:254)
at org.apache.axis2.deployment.RepositoryListener.startListener(RepositoryListener.java:371)
at org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(SchedulerTask.java:59)
at org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask.java:67)
at org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.runAxisDeployment(CarbonDeploymentSchedulerTask.java:93)
at org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.run(CarbonDeploymentSchedulerTask.java:138)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
TID: [-1234] [] [2022-09-30 12:50:23,169] ERROR {org.apache.synapse.deployers.MessageProcessorDeployer} - Message Processor Deployment from the file : /opt/wso2ei-6.6.0/wso2/tmp/carbonapps/-1234/1664531421939dwhErpTableCapp_1.0.0.car/dwhErpTableMP_1.0.0/dwhErpTableMP-1.0.0.xml : Failed. org.apache.synapse.SynapseException: Error initializing BlockingMessageSender
at org.apache.synapse.message.senders.blocking.BlockingMsgSender.handleException(BlockingMsgSender.java:546)
at org.apache.synapse.message.senders.blocking.BlockingMsgSender.init(BlockingMsgSender.java:103)
at org.apache.synapse.message.processor.impl.ScheduledMessageProcessor.initMessageSender(ScheduledMessageProcessor.java:489)
at org.apache.synapse.message.processor.impl.ScheduledMessageProcessor.init(ScheduledMessageProcessor.java:101)
at org.apache.synapse.message.processor.impl.forwarder.ScheduledMessageForwardingProcessor.init(ScheduledMessageForwardingProcessor.java:52)
at org.apache.synapse.deployers.MessageProcessorDeployer.deploySynapseArtifact(MessageProcessorDeployer.java:58)
at org.apache.synapse.deployers.AbstractSynapseArtifactDeployer.deploy(AbstractSynapseArtifactDeployer.java:200)
at org.wso2.carbon.application.deployer.synapse.SynapseAppDeployer.deployArtifactType(SynapseAppDeployer.java:1099)
at org.wso2.carbon.application.deployer.synapse.SynapseAppDeployer.deployArtifacts(SynapseAppDeployer.java:114)
at org.wso2.carbon.application.deployer.internal.ApplicationManager.deployCarbonApp(ApplicationManager.java:272)
at org.wso2.carbon.application.deployer.CappAxis2Deployer.deploy(CappAxis2Deployer.java:72)
at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:807)
at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)
at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:377)
at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:254)
at org.apache.axis2.deployment.RepositoryListener.startListener(RepositoryListener.java:371)
at org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(SchedulerTask.java:59)
at org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask.java:67)
at org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.runAxisDeployment(CarbonDeploymentSchedulerTask.java:93)
at org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.run(CarbonDeploymentSchedulerTask.java:138)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
Caused by: org.apache.axis2.AxisFault: Couldn't find repository location './repository/deployment/client'
at org.apache.axis2.deployment.FileSystemConfigurator.<init>(FileSystemConfigurator.java:68)
at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:210)
at org.apache.synapse.message.senders.blocking.BlockingMsgSender.init(BlockingMsgSender.java:98)
... 26 more
TID: [-1234] [] [2022-09-30 12:50:23,173] ERROR {org.apache.synapse.deployers.AbstractSynapseArtifactDeployer} - Deployment of the Synapse Artifact from file : /opt/wso2ei-6.6.0/wso2/tmp/carbonapps/-1234/1664531421939dwhErpTableCapp_1.0.0.car/dwhErpTableMP_1.0.0/dwhErpTableMP-1.0.0.xml : Failed! org.apache.synapse.deployers.SynapseArtifactDeploymentException: Message Processor Deployment from the file : /opt/wso2ei-6.6.0/wso2/tmp/carbonapps/-1234/1664531421939dwhErpTableCapp_1.0.0.car/dwhErpTableMP_1.0.0/dwhErpTableMP-1.0.0.xml : Failed.
at org.apache.synapse.deployers.AbstractSynapseArtifactDeployer.handleSynapseArtifactDeploymentError(AbstractSynapseArtifactDeployer.java:483)
at org.apache.synapse.deployers.MessageProcessorDeployer.deploySynapseArtifact(MessageProcessorDeployer.java:77)
at org.apache.synapse.deployers.AbstractSynapseArtifactDeployer.deploy(AbstractSynapseArtifactDeployer.java:200)
at org.wso2.carbon.application.deployer.synapse.SynapseAppDeployer.deployArtifactType(SynapseAppDeployer.java:1099)
at org.wso2.carbon.application.deployer.synapse.SynapseAppDeployer.deployArtifacts(SynapseAppDeployer.java:114)
at org.wso2.carbon.application.deployer.internal.ApplicationManager.deployCarbonApp(ApplicationManager.java:272)
at org.wso2.carbon.application.deployer.CappAxis2Deployer.deploy(CappAxis2Deployer.java:72)
at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:807)
at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)
at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:377)
at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:254)
at org.apache.axis2.deployment.RepositoryListener.startListener(RepositoryListener.java:371)
at org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(SchedulerTask.java:59)
at org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask.java:67)
at org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.runAxisDeployment(CarbonDeploymentSchedulerTask.java:93)
at org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.run(CarbonDeploymentSchedulerTask.java:138)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
Caused by: org.apache.synapse.SynapseException: Error initializing BlockingMessageSender
at org.apache.synapse.message.senders.blocking.BlockingMsgSender.handleException(BlockingMsgSender.java:546)
at org.apache.synapse.message.senders.blocking.BlockingMsgSender.init(BlockingMsgSender.java:103)
at org.apache.synapse.message.processor.impl.ScheduledMessageProcessor.initMessageSender(ScheduledMessageProcessor.java:489)
at org.apache.synapse.message.processor.impl.ScheduledMessageProcessor.init(ScheduledMessageProcessor.java:101)
at org.apache.synapse.message.processor.impl.forwarder.ScheduledMessageForwardingProcessor.init(ScheduledMessageForwardingProcessor.java:52)
at org.apache.synapse.deployers.MessageProcessorDeployer.deploySynapseArtifact(MessageProcessorDeployer.java:58)
... 22 more
Caused by: org.apache.axis2.AxisFault: Couldn't find repository location './repository/deployment/client'
at org.apache.axis2.deployment.FileSystemConfigurator.<init>(FileSystemConfigurator.java:68)
at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:210)
at org.apache.synapse.message.senders.blocking.BlockingMsgSender.init(BlockingMsgSender.java:98)
... 26 more
Directory in integrator :
enter image description here
FWIW-- this does not look to be an ActiveMQ issue, but an Axis2 issue.
Caused by: org.apache.axis2.AxisFault: Couldn't find repository location './repository/deployment/client'

[WSO2 APIM 4.1][WSO2 IS 5.11] Changing the Owner of an Application / http error 401

I have configured a distributed wso2 api management platform with separated traffic manager and an identity server as key manager:
https://apim.docs.wso2.com/en/latest/install-and-setup/setup/distributed-deployment/configuring-wso2-identity-server-as-a-key-manager/
https://apim.docs.wso2.com/en/latest/install-and-setup/setup/distributed-deployment/deploying-wso2-api-m-in-a-distributed-setup-with-tm-separated/
I am trying to change the ownership of an application as desribed the instructions in the documentation below :
https://apim.docs.wso2.com/en/latest/consume/manage-application/advanced-topics/changing-the-owner-of-an-application/
It works fine but as soon as i generate client credentials for my application, i no longer can change the owner and I get the following error .
TID: [-1234] [api/am/admin] [2022-08-17 18:09:07,903] ERROR {org.wso2.carbon.apimgt.rest.api.admin.v1.impl.ApplicationsApiServiceImpl} - Error while updating application owner 9eaefedz7b-e4e6fefeefeeea-f8410fefefre53 org.wso2.carbon.apimgt.api.APIManagementException: Error occurred while updating OAuth Client :
at org.wso2.carbon.apimgt.impl.AbstractKeyManager.handleException_aroundBody12(AbstractKeyManager.java:274)
at org.wso2.carbon.apimgt.impl.AbstractKeyManager.handleException(AbstractKeyManager.java:272)
at org.wso2.carbon.apimgt.impl.AMDefaultKeyManagerImpl.updateApplicationOwner_aroundBody6(AMDefaultKeyManagerImpl.java:402)
at org.wso2.carbon.apimgt.impl.AMDefaultKeyManagerImpl.updateApplicationOwner(AMDefaultKeyManagerImpl.java:390)
at org.wso2.carbon.apimgt.impl.APIConsumerImpl.updateApplicationOwner_aroundBody178(APIConsumerImpl.java:4707)
at org.wso2.carbon.apimgt.impl.APIConsumerImpl.updateApplicationOwner(APIConsumerImpl.java:4667)
at org.wso2.carbon.apimgt.rest.api.admin.v1.impl.ApplicationsApiServiceImpl.applicationsApplicationIdChangeOwnerPost(ApplicationsApiServiceImpl.java:67)
at org.wso2.carbon.apimgt.rest.api.admin.v1.ApplicationsApi.applicationsApplicationIdChangeOwnerPost(ApplicationsApi.java:56)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:179)
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:201)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:104)
at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)
at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:265)
at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234)
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208)
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160)
at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:225)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:304)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:217)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:279)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.wso2.carbon.identity.context.rewrite.valve.TenantContextRewriteValve.invoke(TenantContextRewriteValve.java:107)
at org.wso2.carbon.identity.authz.valve.AuthorizationValve.invoke(AuthorizationValve.java:110)
at org.wso2.carbon.identity.auth.valve.AuthenticationValve.invoke(AuthenticationValve.java:102)
at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:101)
at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:49)
at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62)
at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:146)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687)
at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:58)
at org.wso2.carbon.tomcat.ext.valves.RequestCorrelationIdValve.invoke(RequestCorrelationIdValve.java:126)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.wso2.carbon.apimgt.impl.kmclient.KeyManagerClientException: Received status code: 401 Reason:
at org.wso2.carbon.apimgt.impl.kmclient.KMClientErrorDecoder.decode_aroundBody0(KMClientErrorDecoder.java:42)
at org.wso2.carbon.apimgt.impl.kmclient.KMClientErrorDecoder.decode(KMClientErrorDecoder.java:35)
at feign.AsyncResponseHandler.handleResponse(AsyncResponseHandler.java:96)
at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:138)
at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:89)
at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:100)
at com.sun.proxy.$Proxy440.updateApplicationOwner(Unknown Source)
at org.wso2.carbon.apimgt.impl.AMDefaultKeyManagerImpl.updateApplicationOwner_aroundBody6(AMDefaultKeyManagerImpl.java:398)
... 57 more
I don't understand why the identity server sends 401 http status ! Can anybody help =) ?
i got http 401 cuz the resource called while trying to update the ownership of an application (with authorization keys) was not allowed due the resources acces control configuration in identity server dployment.toml file :
context = "(.)/keymanager-operations/dcr/register(.)"
secure = true
http_method = "POST"
permissions = "/permission/admin/manage/identity/applicationmgt/update"
scopes = "internal_application_mgt_update"
it works after changing the context parameter in the configuration above, from :
context = "(.)/keymanager-operations/dcr/register(.)"
to :
context = "(.*)/keymanager-operations/dcr/register(.*)"

Pass CDATA tag inside mc.setPayloadXML of WSO2 Api Manager (Script mediator)

Description :
I am basically transforming json to xml using script mediator in wso2 3.2 api manager message mediation and calling the third party api. The issue which I am facing is the third party api has a CDATA in its body request, so I am trying to generate the xml request using script mediator but I didn't find any solution how shall I pass CDATA tag inside Script mediator mc.setPayloadXML function.
Mediation.xml
<sequence xmlns="http://ws.apache.org/ns/synapse" name="change_request_custom_js">
<script language="js"><![CDATA[
payload = mc.getPayloadJSON();
var i;
var start = '<![CDATA[';
var end = "]]>";
var response = <Identifiers/>;
results = payload.identifiers;
for (i = 0; i < results.length; ++i) {
var elem = results[i];
response.Identifiers += <Identifier>
<IdNumber>{elem.identifierIdNumber}</IdNumber>
<IdType>{elem.identifierIdType}</IdType>
</Identifier>
}
mc.setPayloadXML(<soapenv:Envelope><soapenv:Body><tem:ExecuteXMLString tem="http://services.samples/xsd"> <tem:request>{start}<DCRequest xmlns="http://transunion.com/dc/extsvc"><Authentication type="OnDemand"><UserId>{payload.authenticationUserId}</UserId><Password>{payload.authenticationPassword}</Password></Authentication><RequestInfo><ExecutionMode>{payload.executionMode}</ExecutionMode><SolutionSetId>{payload.solutionSetId}</SolutionSetId><ExecuteLatestVersion>{payload.executeLatestVersion}</ExecuteLatestVersion></RequestInfo><Fields><Field key="Applicants"><Applicants><Applicant><ApplicantType>{payload.applicantType}</ApplicantType><ApplicantFirstName>{payload.applicantFirstName}</ApplicantFirstName><ApplicantMiddleName>{payload.applicantMiddleName}</ApplicantMiddleName><ApplicantLastName>{payload.applicantLastName}</ApplicantLastName><DateOfBirth>{payload.dateOfBirth}</DateOfBirth><Gender>{payload.gender}</Gender><EmailAddress/><CompanyName/>{response}<Telephones><Telephone><TelephoneExtension/><TelephoneNumber>{payload.telephoneNumber}</TelephoneNumber><TelephoneType>01</TelephoneType></Telephone></Telephones><Addresses><Address><AddressLine1>{payload.addressLine1}</AddressLine1><AddressLine2>{payload.addressLine2}</AddressLine2><AddressLine3/><AddressType>01</AddressType><City>{payload.city}</City><PinCode>{payload.pinCode}</PinCode><ResidenceType>01</ResidenceType><StateCode>{payload.stateCode}</StateCode></Address></Addresses><NomineeRelation/><NomineeName/><MemberRelationType4/><MemberRelationName4/><MemberRelationType3/><MemberRelationName3/><MemberRelationType2/><MemberRelationName2/><MemberRelationType1/><MemberRelationName1/><KeyPersonRelation/><KeyPersonName/><MemberOtherId3/><MemberOtherId3Type/><MemberOtherId2/><MemberOtherId2Type/><MemberOtherId1/><MemberOtherId1Type/><Accounts><Account><AccountNumber/></Account></Accounts></Applicant></Applicants></Field><Field key="ApplicationData"><ApplicationData><Purpose>02</Purpose><Amount>1000000</Amount><ScoreType>08</ScoreType><GSTStateCode>{payload.gstStateCode}</GSTStateCode><MemberCode>{payload.memberCode}</MemberCode><Password>{payload.password}</Password><CibilBureauFlag>False</CibilBureauFlag><DSTuNtcFlag>FALSE</DSTuNtcFlag><IDVerificationFlag>FALSE</IDVerificationFlag><MFIBureauFlag>FALSE</MFIBureauFlag><NTCProductType>AL</NTCProductType><ConsumerConsentForUIDAIAuthentication>Y</ConsumerConsentForUIDAIAuthentication><MFIEnquiryAmount>6458</MFIEnquiryAmount><MFILoanPurpose>40</MFILoanPurpose><MFICenterReferenceNo/><MFIBranchReferenceNo/><FormattedReport>False</FormattedReport></ApplicationData></Field></Fields></DCRequest>{end}</tem:request></tem:ExecuteXMLString></soapenv:Body></soapenv:Envelope>);
]]>
</script>
<property name="messageType" value="text/xml" scope="axis2"/>
<property name="ContentType" value="text/xml" scope="axis2"/>
</sequence>
In the above code you can see i have attempted to pass CDATA tag by taking it inside a variable start and end but its throwing below error while uploading xml in message mediation wso2 api manager.
wso2carbon.log
TID: [-1234] [] [2021-03-18 12:18:40,565] ERROR {org.wso2.carbon.apimgt.impl.APIGatewayManager} - Error in deploying the sequence to gateway com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character ' ' (code 32) in content after '<' (malformed start element?).
at [row,col {unknown-source}]: [16,20]
at com.ctc.wstx.sr.StreamScanner.throwUnexpectedChar(StreamScanner.java:647)
at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2845)
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1073)
at org.apache.axiom.om.impl.SwitchingWrapper.next(SwitchingWrapper.java:1131)
at javax.xml.stream.util.StreamReaderDelegate.next(StreamReaderDelegate.java:88)
at org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serializeNode(StreamingOMSerializer.java:146)
at org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serialize(StreamingOMSerializer.java:107)
at org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serialize(StreamingOMSerializer.java:76)
at org.apache.axiom.om.impl.util.OMSerializerUtil.serializeByPullStream(OMSerializerUtil.java:547)
at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:882)
at org.apache.axiom.om.impl.llom.OMSerializableImpl.serialize(OMSerializableImpl.java:125)
at org.apache.axiom.om.impl.llom.OMSerializableImpl.serializeAndConsume(OMSerializableImpl.java:117)
at org.apache.axiom.om.impl.llom.OMSerializableImpl.serializeAndConsume(OMSerializableImpl.java:159)
at org.wso2.carbon.apimgt.impl.utils.APIUtil.convertOMtoString_aroundBody730(APIUtil.java:10592)
at org.wso2.carbon.apimgt.impl.utils.APIUtil.convertOMtoString(APIUtil.java:10589)
at org.wso2.carbon.apimgt.impl.APIGatewayManager.addSequence_aroundBody58(APIGatewayManager.java:1347)
at org.wso2.carbon.apimgt.impl.APIGatewayManager.addSequence(APIGatewayManager.java:1335)
at org.wso2.carbon.apimgt.impl.APIGatewayManager.setCustomSequencesToBeAdded_aroundBody56(APIGatewayManager.java:1315)
at org.wso2.carbon.apimgt.impl.APIGatewayManager.setCustomSequencesToBeAdded(APIGatewayManager.java:1300)
at org.wso2.carbon.apimgt.impl.APIGatewayManager.createAPIGatewayDTOtoPublishAPI_aroundBody6(APIGatewayManager.java:346)
at org.wso2.carbon.apimgt.impl.APIGatewayManager.createAPIGatewayDTOtoPublishAPI(APIGatewayManager.java:274)
at org.wso2.carbon.apimgt.impl.APIGatewayManager.publishAPIToGatewayEnvironment_aroundBody4(APIGatewayManager.java:207)
at org.wso2.carbon.apimgt.impl.APIGatewayManager.publishAPIToGatewayEnvironment(APIGatewayManager.java:192)
at org.wso2.carbon.apimgt.impl.APIGatewayManager.publishToGateway_aroundBody2(APIGatewayManager.java:144)
at org.wso2.carbon.apimgt.impl.APIGatewayManager.publishToGateway(APIGatewayManager.java:118)
at org.wso2.carbon.apimgt.impl.APIProviderImpl.publishToGateway_aroundBody116(APIProviderImpl.java:2438)
at org.wso2.carbon.apimgt.impl.APIProviderImpl.publishToGateway(APIProviderImpl.java:2410)
at org.wso2.carbon.apimgt.impl.APIProviderImpl.updateAPI_aroundBody80(APIProviderImpl.java:1502)
at org.wso2.carbon.apimgt.impl.APIProviderImpl.updateAPI(APIProviderImpl.java:1315)
at org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.manageAPI_aroundBody12(UserAwareAPIProvider.java:137)
at org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.manageAPI(UserAwareAPIProvider.java:126)
at org.wso2.carbon.apimgt.rest.api.publisher.v1.impl.ApisApiServiceImpl.apisApiIdPut(ApisApiServiceImpl.java:913)
at org.wso2.carbon.apimgt.rest.api.publisher.v1.ApisApi.apisApiIdPut(ApisApi.java:690)
at sun.reflect.GeneratedMethodAccessor793.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:179)
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:193)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:103)
at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)
at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267)
at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234)
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208)
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160)
at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:216)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:301)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPut(AbstractHTTPServlet.java:237)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:663)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:276)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.wso2.carbon.identity.context.rewrite.valve.TenantContextRewriteValve.invoke(TenantContextRewriteValve.java:86)
at org.wso2.carbon.identity.authz.valve.AuthorizationValve.invoke(AuthorizationValve.java:110)
at org.wso2.carbon.identity.auth.valve.AuthenticationValve.invoke(AuthenticationValve.java:101)
at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:99)
at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:49)
at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62)
at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:145)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690)
at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57)
at org.wso2.carbon.tomcat.ext.valves.RequestCorrelationIdValve.invoke(RequestCorrelationIdValve.java:119)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1590)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
TID: [-1234] [api/am/publisher] [2021-03-18 12:18:40,592] ERROR {org.wso2.carbon.apimgt.impl.APIGatewayManager} - Error occurred deploying sequences on Production and Sandbox org.wso2.carbon.apimgt.api.APIManagementException: Error in deploying the sequence to gateway
at org.wso2.carbon.apimgt.impl.APIGatewayManager.setCustomSequencesToBeAdded_aroundBody56(APIGatewayManager.java:1327)
at org.wso2.carbon.apimgt.impl.APIGatewayManager.setCustomSequencesToBeAdded(APIGatewayManager.java:1300)
at org.wso2.carbon.apimgt.impl.APIGatewayManager.createAPIGatewayDTOtoPublishAPI_aroundBody6(APIGatewayManager.java:346)
at org.wso2.carbon.apimgt.impl.APIGatewayManager.createAPIGatewayDTOtoPublishAPI(APIGatewayManager.java:274)
at org.wso2.carbon.apimgt.impl.APIGatewayManager.publishAPIToGatewayEnvironment_aroundBody4(APIGatewayManager.java:207)
at org.wso2.carbon.apimgt.impl.APIGatewayManager.publishAPIToGatewayEnvironment(APIGatewayManager.java:192)
at org.wso2.carbon.apimgt.impl.APIGatewayManager.publishToGateway_aroundBody2(APIGatewayManager.java:144)
at org.wso2.carbon.apimgt.impl.APIGatewayManager.publishToGateway(APIGatewayManager.java:118)
at org.wso2.carbon.apimgt.impl.APIProviderImpl.publishToGateway_aroundBody116(APIProviderImpl.java:2438)
at org.wso2.carbon.apimgt.impl.APIProviderImpl.publishToGateway(APIProviderImpl.java:2410)
at org.wso2.carbon.apimgt.impl.APIProviderImpl.updateAPI_aroundBody80(APIProviderImpl.java:1502)
at org.wso2.carbon.apimgt.impl.APIProviderImpl.updateAPI(APIProviderImpl.java:1315)
at org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.manageAPI_aroundBody12(UserAwareAPIProvider.java:137)
at org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.manageAPI(UserAwareAPIProvider.java:126)
at org.wso2.carbon.apimgt.rest.api.publisher.v1.impl.ApisApiServiceImpl.apisApiIdPut(ApisApiServiceImpl.java:913)
at org.wso2.carbon.apimgt.rest.api.publisher.v1.ApisApi.apisApiIdPut(ApisApi.java:690)
at sun.reflect.GeneratedMethodAccessor793.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:179)
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:193)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:103)
at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)
at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267)
at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234)
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208)
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160)
at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:216)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:301)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPut(AbstractHTTPServlet.java:237)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:663)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:276)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.wso2.carbon.identity.context.rewrite.valve.TenantContextRewriteValve.invoke(TenantContextRewriteValve.java:86)
at org.wso2.carbon.identity.authz.valve.AuthorizationValve.invoke(AuthorizationValve.java:110)
at org.wso2.carbon.identity.auth.valve.AuthenticationValve.invoke(AuthenticationValve.java:101)
at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:99)
at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:49)
at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62)
at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:145)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690)
at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57)
at org.wso2.carbon.tomcat.ext.valves.RequestCorrelationIdValve.invoke(RequestCorrelationIdValve.java:119)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1590)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
TID: [-1234] [AuthenticationAdmin] [2021-03-18 12:18:40,702] INFO {org.wso2.carbon.core.services.util.CarbonAuthenticationUtil} - 'admin#carbon.super [-1234]' logged in at [2021-03-18 12:18:40,701+0530]
TID: [-1234] [api/am/publisher] [2021-03-18 12:18:40,895] ERROR {org.wso2.carbon.apimgt.rest.api.publisher.v1.impl.ApisApiServiceImpl} - Error while updating API : cc61d349-94a4-4b12-b6e4-1b65b4e2214c org.wso2.carbon.apimgt.api.FaultGatewaysException
at org.wso2.carbon.apimgt.impl.APIProviderImpl.updateAPI_aroundBody80(APIProviderImpl.java:1581)
at org.wso2.carbon.apimgt.impl.APIProviderImpl.updateAPI(APIProviderImpl.java:1315)
at org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.manageAPI_aroundBody12(UserAwareAPIProvider.java:137)
at org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.manageAPI(UserAwareAPIProvider.java:126)
at org.wso2.carbon.apimgt.rest.api.publisher.v1.impl.ApisApiServiceImpl.apisApiIdPut(ApisApiServiceImpl.java:913)
at org.wso2.carbon.apimgt.rest.api.publisher.v1.ApisApi.apisApiIdPut(ApisApi.java:690)
at sun.reflect.GeneratedMethodAccessor793.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:179)
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:193)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:103)
at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)
at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267)
at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234)
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208)
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160)
at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:216)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:301)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPut(AbstractHTTPServlet.java:237)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:663)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:276)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.wso2.carbon.identity.context.rewrite.valve.TenantContextRewriteValve.invoke(TenantContextRewriteValve.java:86)
at org.wso2.carbon.identity.authz.valve.AuthorizationValve.invoke(AuthorizationValve.java:110)
at org.wso2.carbon.identity.auth.valve.AuthenticationValve.invoke(AuthenticationValve.java:101)
at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:99)
at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:49)
at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62)
at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:145)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690)
at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57)
at org.wso2.carbon.tomcat.ext.valves.RequestCorrelationIdValve.invoke(RequestCorrelationIdValve.java:119)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1590)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
Tried multiple ways and searched so many things but couldn't find anything. Please help
You need to escape the square brackets like this:
var end = "\]\]>";
And in the mc.setPayloadXML you need to fix two things:
Add <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
Misssing xmlns: <tem:ExecuteXMLString xmlns:tem="http://services.samples/xsd">
Edited:
For me works on EI 6.5.0, and also should work with API Manager 3.2.0.
But that solution needs additional config file: <APIM_HOME>/XMLInputFactory.properties with line: javax.xml.stream.isCoalescing=false. And next restart WSO2 to load that config.
<sequence xmlns="http://ws.apache.org/ns/synapse" name="change_request_custom_js">
<script language="js"><![CDATA[payload = mc.getPayloadJSON();
var i;
var response = <Identifiers></Identifiers>;
results = payload.identifiers;
for (i = 0; i < results.length; ++i) {
var elem = results[i];
response.Identifiers += <Identifier>
<IdNumber>{elem.identifierIdNumber}</IdNumber>
<IdType>{elem.identifierIdType}</IdType>
</Identifier>
}
var someXml = <DCRequest xmlns="http://transunion.com/dc/extsvc"><Authentication type="OnDemand"><UserId>{payload.authenticationUserId}</UserId><Password>{payload.authenticationPassword}</Password></Authentication><RequestInfo><ExecutionMode>{payload.executionMode}</ExecutionMode><SolutionSetId>{payload.solutionSetId}</SolutionSetId><ExecuteLatestVersion>{payload.executeLatestVersion}</ExecuteLatestVersion></RequestInfo><Fields><Field key="Applicants"><Applicants><Applicant><ApplicantType>{payload.applicantType}</ApplicantType><ApplicantFirstName>{payload.applicantFirstName}</ApplicantFirstName><ApplicantMiddleName>{payload.applicantMiddleName}</ApplicantMiddleName><ApplicantLastName>{payload.applicantLastName}</ApplicantLastName><DateOfBirth>{payload.dateOfBirth}</DateOfBirth><Gender>{payload.gender}</Gender><EmailAddress></EmailAddress><CompanyName></CompanyName>{response}<Telephones><Telephone><TelephoneExtension></TelephoneExtension><TelephoneNumber>{payload.telephoneNumber}</TelephoneNumber><TelephoneType>01</TelephoneType></Telephone></Telephones><Addresses><Address><AddressLine1>{payload.addressLine1}</AddressLine1><AddressLine2>{payload.addressLine2}</AddressLine2><AddressLine3></AddressLine3><AddressType>01</AddressType><City>{payload.city}</City><PinCode>{payload.pinCode}</PinCode><ResidenceType>01</ResidenceType><StateCode>{payload.stateCode}</StateCode></Address></Addresses><NomineeRelation></NomineeRelation><NomineeName></NomineeName><MemberRelationType4></MemberRelationType4><MemberRelationName4></MemberRelationName4><MemberRelationType3></MemberRelationType3><MemberRelationName3></MemberRelationName3><MemberRelationType2></MemberRelationType2><MemberRelationName2></MemberRelationName2><MemberRelationType1></MemberRelationType1><MemberRelationName1></MemberRelationName1><KeyPersonRelation></KeyPersonRelation><KeyPersonName></KeyPersonName><MemberOtherId3></MemberOtherId3><MemberOtherId3Type></MemberOtherId3Type><MemberOtherId2></MemberOtherId2><MemberOtherId2Type></MemberOtherId2Type><MemberOtherId1></MemberOtherId1><MemberOtherId1Type></MemberOtherId1Type><Accounts><Account><AccountNumber></AccountNumber></Account></Accounts></Applicant></Applicants></Field><Field key="ApplicationData"><ApplicationData><Purpose>02</Purpose><Amount>1000000</Amount><ScoreType>08</ScoreType><GSTStateCode>{payload.gstStateCode}</GSTStateCode><MemberCode>{payload.memberCode}</MemberCode><Password>{payload.password}</Password><CibilBureauFlag>False</CibilBureauFlag><DSTuNtcFlag>FALSE</DSTuNtcFlag><IDVerificationFlag>FALSE</IDVerificationFlag><MFIBureauFlag>FALSE</MFIBureauFlag><NTCProductType>AL</NTCProductType><ConsumerConsentForUIDAIAuthentication>Y</ConsumerConsentForUIDAIAuthentication><MFIEnquiryAmount>6458</MFIEnquiryAmount><MFILoanPurpose>40</MFILoanPurpose><MFICenterReferenceNo></MFICenterReferenceNo><MFIBranchReferenceNo></MFIBranchReferenceNo><FormattedReport>False</FormattedReport></ApplicationData></Field></Fields></DCRequest>;
mc.setProperty('someXml', someXml);
]]></script>
<payloadFactory media-type="xml">
<format>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Body>
<tem:ExecuteXMLString xmlns:tem="http://services.samples/xsd">
<tem:request><![CDATA[$1]]></tem:request>
</tem:ExecuteXMLString>
</soapenv:Body>
</soapenv:Envelope>
</format>
<args>
<arg xmlns:ns="http://org.apache.synapse/xsd"
evaluator="xml"
expression="$ctx:someXml"/>
</args>
</payloadFactory>
<property name="messageType" value="text/xml" scope="axis2"/>
<property name="ContentType" value="text/xml" scope="axis2"/>
</sequence>
If that don't work, you need maybe try the old solution with registry:
WSO2 AM 1.9 - Keep CDATA in payload factory

Enabling Role-Based Access Control Using XACML - Error occurred while evaluating the policy

I followed the Enabling Role-Based Access Control Using XACML. I could setup all with out any issue. But when invoking the API it responds with below error.
<am:fault xmlns:am="http://wso2.org/apimanager"><am:code>0</am:code><am:type>Status report</am:type><am:message>Runtime Error</am:message><am:description>Error occurred while evaluating the policy</am:description></am:fault>
And in the APIM log I can see the below error. I'm running the APIM 2.6 and IS 5.3 in the same machine with offset of 2 in AM. It seems the issue is with the remoteServiceUrl="https://127.0.0.1:9443/services" url in EntitlementMediator.xml mentioned in the step 14 of the Given Guide.
[2019-05-28 12:33:05,162] INFO - HTTPSender Unable to sendViaPost to
url[https://127.0.0.1:9443/services/EntitlementService]
javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated at
sun.security.ssl.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:431)
at
org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.verifyHostName(SSLProtocolSocketFactory.java:276)
at
org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:186)
at
org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
at
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
at
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
at
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at
org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:704)
at
org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:199)
at
org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:81)
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:459)
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:286)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442) at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:441)
at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:227)
at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
at
org.wso2.carbon.identity.entitlement.stub.EntitlementServiceStub.getDecision(EntitlementServiceStub.java:836)
at
org.wso2.carbon.identity.entitlement.proxy.soap.basicAuth.BasicAuthEntitlementServiceClient.getDecision(BasicAuthEntitlementServiceClient.java:259)
at
org.wso2.carbon.identity.entitlement.proxy.soap.basicAuth.BasicAuthEntitlementServiceClient.getDecision(BasicAuthEntitlementServiceClient.java:123)
at
org.wso2.carbon.identity.entitlement.proxy.PEPProxy.getDecision(PEPProxy.java:94)
at
org.wso2.carbon.identity.entitlement.proxy.PEPProxy.getDecision(PEPProxy.java:66)
at
org.wso2.carbon.identity.entitlement.mediator.EntitlementMediator.mediate(EntitlementMediator.java:203)
at
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:108)
at
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:70)
at
org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
at
org.wso2.carbon.apimgt.gateway.handlers.ext.APIManagerExtensionHandler.mediate(APIManagerExtensionHandler.java:66)
at
org.wso2.carbon.apimgt.gateway.handlers.ext.APIManagerExtensionHandler.handleRequest(APIManagerExtensionHandler.java:75)
at org.apache.synapse.rest.API.process(API.java:325) at
org.apache.synapse.rest.RESTRequestHandler.apiProcessNonDefaultStrategy(RESTRequestHandler.java:149)
at
org.apache.synapse.rest.RESTRequestHandler.dispatchToAPI(RESTRequestHandler.java:95)
at
org.apache.synapse.rest.RESTRequestHandler.process(RESTRequestHandler.java:71)
at
org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:303)
at
org.apache.synapse.core.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:92)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at
org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:337)
at
org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:158)
at
org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745) [2019-05-28 12:33:05,164]
ERROR - EntitlementMediator Error occurred while evaluating the policy
org.apache.axis2.AxisFault: peer not authenticated at
org.apache.axis2.AxisFault.makeFault(AxisFault.java:430) at
org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:203)
at
org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:81)
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:459)
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:286)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442) at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:441)
at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:227)
at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
at
org.wso2.carbon.identity.entitlement.stub.EntitlementServiceStub.getDecision(EntitlementServiceStub.java:836)
at
org.wso2.carbon.identity.entitlement.proxy.soap.basicAuth.BasicAuthEntitlementServiceClient.getDecision(BasicAuthEntitlementServiceClient.java:259)
at
org.wso2.carbon.identity.entitlement.proxy.soap.basicAuth.BasicAuthEntitlementServiceClient.getDecision(BasicAuthEntitlementServiceClient.java:123)
at
org.wso2.carbon.identity.entitlement.proxy.PEPProxy.getDecision(PEPProxy.java:94)
at
org.wso2.carbon.identity.entitlement.proxy.PEPProxy.getDecision(PEPProxy.java:66)
at
org.wso2.carbon.identity.entitlement.mediator.EntitlementMediator.mediate(EntitlementMediator.java:203)
at
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:108)
at
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:70)
at
org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
at
org.wso2.carbon.apimgt.gateway.handlers.ext.APIManagerExtensionHandler.mediate(APIManagerExtensionHandler.java:66)
at
org.wso2.carbon.apimgt.gateway.handlers.ext.APIManagerExtensionHandler.handleRequest(APIManagerExtensionHandler.java:75)
at org.apache.synapse.rest.API.process(API.java:325) at
org.apache.synapse.rest.RESTRequestHandler.apiProcessNonDefaultStrategy(RESTRequestHandler.java:149)
at
org.apache.synapse.rest.RESTRequestHandler.dispatchToAPI(RESTRequestHandler.java:95)
at
org.apache.synapse.rest.RESTRequestHandler.process(RESTRequestHandler.java:71)
at
org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:303)
at
org.apache.synapse.core.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:92)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at
org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:337)
at
org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:158)
at
org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745) Caused by:
javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated at
sun.security.ssl.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:431)
at
org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.verifyHostName(SSLProtocolSocketFactory.java:276)
at
org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:186)
at
org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
at
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
at
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
at
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at
org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:704)
at
org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:199)
... 31 more [2019-05-28 12:33:05,172] INFO - LogMediator STATUS =
Executing default 'fault' sequence, ERROR_CODE = 0, ERROR_MESSAGE =
Error occurred while evaluating the policy
There is a host name verification issue when entitlement mediator try to invoke EntitlementService exposed by WSO2 IS.
You need to correctly export public cert from APIM and import to WSO2 IS trust store. In public cert CN value should be equal to hostname or IP address.
As I can remember primary key store key length is different in APIM 2.6.0 and IS 5.3.0. However above step should resolve your issue.
Further more this should work out of the box if you have used later version of WSO2 IS than 5.3.0 with default host names and default public certs.

WSO2 Identity Server - First Access to Entitlement Menu for PAP and PDP Throws Error

At the first access to the Main - Entitlement - Policy section I get the following error:
TID[-1234] [IS] [2015-05-07 11:11:03,046] ERROR
{org.apache.axis2.rpc.receivers.RPCMessageReceiver} - Exception
occurred while trying to invoke service method getAllPolicies
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
java.lang.reflect.Method.invoke(Method.java:611)
org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:212)
org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:117)
org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
org.apache.axis2.transport.local.LocalTransportReceiver.processMessage(LocalTransportReceiver.java:169)
org.apache.axis2.transport.local.LocalTransportReceiver.processMessage(LocalTransportReceiver.java:82)
org.wso2.carbon.core.transports.local.CarbonLocalTransportSender.finalizeSendWithToAddress(CarbonLocalTransportSender.java:45)
org.apache.axis2.transport.local.LocalTransportSender.invoke(LocalTransportSender.java:77)
org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:430)
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
Similar to report: see at this forum
Thanks in advance for assistance how fix this error.