Pete
Pete

Reputation: 13

WSO2 AS 5.2.1. Servlet Exception while making the decision : java.lang.NullPointerException

i was actual trying this tutorial: http://wso2.com/library/tutorials/2012/12/providing-xacml-fine-grained-authorization-webapps/

on the authentication with admin:admin on localhost:9763/Entitlement_Sample_WebApp/protected.jsp i encountered an error:


exception

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


My WSO2 IS PDP receives the request and responds also correctly with a XACML Response : Permit so where could be the problem ??

thank you

Upvotes: 1

Views: 218

Answers (2)

user4498405
user4498405

Reputation: 26

The problem caused by an error of EntitlementFilter, so I could solve this by correcting the source file EntitlementFilter.java (line 191) like below:

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

rewrite it:

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();

It ommitted namespace in QName method

The detail is here (https://nparkstar.wordpress.com/2015/01/27/wso2-as-sample-authorization-%EC%98%A4%EB%A5%98-%EC%88%98%EC%A0%95/). Sorry, it is written in Korean, but I wish it could helpful.

Upvotes: 1

Budhh
Budhh

Reputation: 153

It could be anywhere starting from this line : pepProxy.getDecision(userName, resource, action, env)

It could be in your pepProxy code, where they are getting back the result, or might be in the other lines after this call in that try catch.

One thing is sure PDP is not at all culprit.

Please paste your full exception here if you want to know precise problem + Solution.

:)

Upvotes: 0

Related Questions