无法从 wso2am-2.5.0 访问 wso2is-5.6.0 中的 XACML 策略出现错误 [英] Unable to access XACML policy in wso2is-5.6.0 from wso2am-2.5.0 getting error
问题描述
我关注 link
在 wso2is 中创建 XACML 策略.
Created XACML policy in wso2is.
从 wso2AM 访问创建了一个 POST 类型的函数.
Accessing from wso2AM created one POST type function.
在 wso2AM 存储中发送请求时出错
While sending request in wso2AM store getting an error
我通过评论第二个/test"网址行来更新jndi.properties"文件.
I have update "jndi.properties" file by commenting second "/test" url line.
在那之后我收到错误.
ERROR - EntitlementMediator Error occurred while evaluating the policy
org.wso2.carbon.identity.entitlement.proxy.exception.EntitlementProxyException: Cannot initialize EntitlementServiceStub with null Axis2 configuration context.
at org.wso2.carbon.identity.entitlement.proxy.soap.basicAuth.BasicAuthEntitlementServiceClient.getEntitlementStub(BasicAuthEntitlementServiceClient.java:246)
at org.wso2.carbon.identity.entitlement.proxy.soap.basicAuth.BasicAuthEntitlementServiceClient.getDecision(BasicAuthEntitlementServiceClient.java:122)
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:185)
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.dispatchToAPI(RESTRequestHandler.java:90)
at org.apache.synapse.rest.RESTRequestHandler.process(RESTRequestHandler.java:69)
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.processEntityEnclosingRequest(ServerWorker.java:383)
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:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[2019-01-14 22:28:24,402] INFO - JMSConnectionFactory JMS ConnectionFactory : jmsEventPublisher initialized
[2019-01-14 22:28:24,429] INFO - LogMediator STATUS = Executing default 'fault' sequence, ERROR_CODE = 0, ERROR_MESSAGE = Error occurred while evaluating the policy
[2019-01-14 22:28:25,476] ERROR - JMSConnectionFactory Error acquiring a Connection from the JMS CF : jmsEventPublisher using properties : {transport.jms.ConcurrentPublishers=allow, java.naming.provider.url=repository/conf/jndi.properties, java.naming.factory.initial=org.wso2.andes.jndi.PropertiesFileInitialContextFactory, transport.jms.DestinationType=topic, transport.jms.ConnectionFactoryJNDIName=TopicConnectionFactory, transport.jms.Destination=throttleData}
javax.jms.JMSException: Error creating connection: Unable to Connect
at org.wso2.andes.client.AMQConnectionFactory.createConnection(AMQConnectionFactory.java:346)
at org.wso2.andes.client.AMQConnectionFactory.createConnection(AMQConnectionFactory.java:53)
at org.wso2.carbon.event.output.adapter.jms.internal.util.JMSUtils.createConnection(JMSUtils.java:387)
at org.wso2.carbon.event.output.adapter.jms.internal.util.JMSConnectionFactory.createConnection(JMSConnectionFactory.java:268)
at org.wso2.carbon.event.output.adapter.jms.internal.util.JMSConnectionFactory$PoolableJMSConnectionFactory.makeObject(JMSConnectionFactory.java:356)
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1181)
at org.wso2.carbon.event.output.adapter.jms.internal.util.JMSConnectionFactory.getConnectionFromPool(JMSConnectionFactory.java:286)
at org.wso2.carbon.event.output.adapter.jms.internal.util.JMSMessageSender.send(JMSMessageSender.java:86)
at org.wso2.carbon.event.output.adapter.jms.JMSEventAdapter$JMSSender.run(JMSEventAdapter.java:284)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
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: org.wso2.andes.AMQConnectionFailureException: Unable to Connect
at org.wso2.andes.client.AMQConnection.<init>(AMQConnection.java:485)
at org.wso2.andes.client.AMQConnectionFactory.createConnection(AMQConnectionFactory.java:328)
... 13 more
[2019-01-14 22:28:25,482] ERROR - JMSConnectionFactory Error acquiring a Connection from the JMS CF : jmsEventPublisher using properties : {transport.jms.ConcurrentPublishers=allow, java.naming.provider.url=repository/conf/jndi.properties, java.naming.factory.initial=org.wso2.andes.jndi.PropertiesFileInitialContextFactory, transport.jms.DestinationType=topic, transport.jms.ConnectionFactoryJNDIName=TopicConnectionFactory, transport.jms.Destination=throttleData}
org.wso2.carbon.event.output.adapter.core.exception.OutputEventAdapterRuntimeException: Error acquiring a Connection from the JMS CF : jmsEventPublisher using properties : {transport.jms.ConcurrentPublishers=allow, java.naming.provider.url=repository/conf/jndi.properties, java.naming.factory.initial=org.wso2.andes.jndi.PropertiesFileInitialContextFactory, transport.jms.DestinationType=topic, transport.jms.ConnectionFactoryJNDIName=TopicConnectionFactory, transport.jms.Destination=throttleData}
at org.wso2.carbon.event.output.adapter.jms.internal.util.JMSConnectionFactory.handleException(JMSConnectionFactory.java:197)
at org.wso2.carbon.event.output.adapter.jms.internal.util.JMSConnectionFactory.createConnection(JMSConnectionFactory.java:278)
at org.wso2.carbon.event.output.adapter.jms.internal.util.JMSConnectionFactory$PoolableJMSConnectionFactory.makeObject(JMSConnectionFactory.java:356)
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1181)
at org.wso2.carbon.event.output.adapter.jms.internal.util.JMSConnectionFactory.getConnectionFromPool(JMSConnectionFactory.java:286)
at org.wso2.carbon.event.output.adapter.jms.internal.util.JMSMessageSender.send(JMSMessageSender.java:86)
at org.wso2.carbon.event.output.adapter.jms.JMSEventAdapter$JMSSender.run(JMSEventAdapter.java:284)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
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.jms.JMSException: Error creating connection: Unable to Connect
at org.wso2.andes.client.AMQConnectionFactory.createConnection(AMQConnectionFactory.java:346)
at org.wso2.andes.client.AMQConnectionFactory.createConnection(AMQConnectionFactory.java:53)
at org.wso2.carbon.event.output.adapter.jms.internal.util.JMSUtils.createConnection(JMSUtils.java:387)
at org.wso2.carbon.event.output.adapter.jms.internal.util.JMSConnectionFactory.createConnection(JMSConnectionFactory.java:268)
... 10 more
Caused by: org.wso2.andes.AMQConnectionFailureException: Unable to Connect
at org.wso2.andes.client.AMQConnection.<init>(AMQConnection.java:485)
at org.wso2.andes.client.AMQConnectionFactory.createConnection(AMQConnectionFactory.java:328)
... 13 more
[2019-01-14 22:28:25,486] ERROR - JMSMessageSender
java.lang.NullPointerException
at org.wso2.carbon.event.output.adapter.jms.internal.util.JMSMessageSender.send(JMSMessageSender.java:88)
at org.wso2.carbon.event.output.adapter.jms.JMSEventAdapter$JMSSender.run(JMSEventAdapter.java:284)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
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)
我超出了给定的错误.更新jndi.properties"文件后.
Am getting above given error. After update "jndi.properties" file.
推荐答案
根据您共享的日志,您的设置中似乎有 2 个单独的错误.第一个与 XACML 介体配置相关,第二个与 JMS 传输配置相关.要了解 XACML 中介器的问题,您能否分享您与 API 一起使用的中介扩展(突触)配置?
Based on the log you have shared, it looks like there are 2 separate errors in your setup. First one is related to XACML mediator configuration and the second one is related to JMS transport configuration. To understand the problem with the XACML mediator, can you share the mediation extension (synapse) configuration you have used with the API?
对于第二个错误,请共享 APIM_HOME/repository/conf/axis2/axis2.xml 文件和axis2_blocking_client.xml 文件.
For the second error, please share the APIM_HOME/repository/conf/axis2/axis2.xml file and axis2_blocking_client.xml files.
不查看这些配置文件,无法为您提供答案.
Without looking at these configuration files, it is not possible to provide you with an answer.
这篇关于无法从 wso2am-2.5.0 访问 wso2is-5.6.0 中的 XACML 策略出现错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!