WSO2 作为 5.2.1.Servlet Exception 在做决定时:java.lang.NullPointerE



我实际上是在尝试本教程:http://wso2.com/library/tutorials/2012/12/providing-xacml-fine-grained-authorization-webapps/

在本地主机:9763/Entitlement_Sample_WebApp/受保护的管理员:管理员身份验证时.jsp我遇到了一个错误:


例外

org.wso2.carbon.identity.entitlement.filter.exception.EntitlementFilterException: Exception while make the decision: java.lang.NullPointerException org.wso2.carbon.identity.entitlement.filter.EntitlementFilter.doFilter(EntitlementFilter.java:191)


我的 WSO2 IS PDP 收到请求,并使用 XACML 响应正确响应:允许那么问题可能在哪里?

谢谢

EntitlementFilter 错误引起的问题,所以我可以通过更正源文件EntitlementFilter.java来解决此问题(第 191 行)如下所示:

simpleDecision = decisionElement.getFirstChildWithName(new QName("Result")).getFirstChildWithName(new QName("Decision")).getText();

重写它:

simpleDecision = decisionElement.getFirstChildWithName(new QName(“urn:oasis:names:tc:xacml:3.0:core:schema:wd-17″,”Result”)).
getFirstChildWithName(new QName(“urn:oasis:names:tc:xacml:3.0:core:schema:wd-17″,”Decision”)).getText();

它在QName方法中省略了命名空间

详细信息在这里(https://nparkstar.wordpress.com/2015/01/27/wso2-as-sample-authorization-%EC%98%A4%EB%A5%98-%EC%88%98%EC%A0%95/)。对不起,它是用韩语写的,但我希望它能有所帮助。

它可以是从这一行开始的任何地方: pepProxy.getDecision(userName, resource, action, env)

它可能在您的 pepProxy 代码中,他们正在获取结果,或者可能在此调用后的其他行中尝试捕获。

有一件事可以肯定的是,PDP根本不是罪魁祸首。

如果您想了解确切的问题+解决方案,请在此处粘贴您的完整例外。

:)

最新更新