I have create the issue in carbon Jira and uploaded the patch here
https://wso2.org/jira/browse/CARBON-13428. Now the function working fine.


On Wed, Jun 6, 2012 at 7:23 PM, Asela Pathberiya <as...@wso2.com> wrote:

>
>
> On Wed, Jun 6, 2012 at 6:54 PM, Tharindu Mathew <thari...@wso2.com> wrote:
>
>> Since you have investigated, it would be great if you fix it and provide
>> a patch?
>>
>
> +1
>
> I hope; this issue is in trunk build?  Please create a jira and attach the
> patch.  Thanks for pointing this.
>
> Thanks,
> Asela.
>
>
>>
>> On Wed, Jun 6, 2012 at 6:09 PM, Andun Gunawardena <an...@wso2.com> wrote:
>>
>>> Hi all,
>>>
>>> I am following 
>>> [1]<http://wso2.org/library/articles/2010/10/using-xacml-fine-grained-authorization-wso2-platform>article
>>>  to use XACML fine grained authorization with WSO2 product platform.
>>> I have successfully completed the article up to the point, "Setting up the
>>> Identity Server with XACML Policy". On that point they have given a 
>>> [2]<http://wso2.org/files/sample-xacml-policy_0.xml>sample policy file. I 
>>> have downloaded it and tried to import it to IS
>>> using, “Import New Entitlement Policy”. But when I do it following
>>> error occurs,
>>>
>>> ERROR
>>> {org.wso2.carbon.ui.transports.fileupload.AbstractFileUploadExecutor} -
>>>  Policy uploading failed. java.io.ByteArrayInputStream cannot be cast to
>>> java.lang.String
>>>
>>> I have check the source
>>> of 
>>> org.wso2.carbon.identity.entitlement.ui.client.EntitlementPolicyUploadExecutor.java
>>> file to see what is going on. In that file on the 77th line the exception
>>> raised on the following code part,
>>>
>>> String policyContent = (String) fileItem.getDataHandler().getContent();
>>>
>>> It return a java.io.ByteArrayInputStream which cant be cast to String.
>>>
>>> So please check this.
>>>
>>
>>> Thanks
>>> AndunSLG
>>>
>>>
>>> [1] -
>>> http://wso2.org/library/articles/2010/10/using-xacml-fine-grained-authorization-wso2-platform
>>> [2] - http://wso2.org/files/sample-xacml-policy_0.xml
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Regards,
>>
>> Tharindu
>>
>> blog: http://mackiemathew.com/
>> M: +94777759908
>>
>>
>> _______________________________________________
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to