[prev in list] [next in list] [prev in thread] [next in thread] 

List:       forgerock-openidm
Subject:    [OpenIDM] NPE in patch action
From:       andi.egloff () forgerock ! com (Andreas Egloff)
Date:       2012-11-23 18:17:37
Message-ID: CALto_tzCYLCBFVDOD5-qYa9aoSL=JnS-kLKKHWCVk1EuOfiCCA () mail ! gmail ! com
[Download RAW message or body]

Yes. r1570 and later should have that null check. Again if you continue to
observe this past that revision please let use know. However, that null
check  to some degree might cover up issues with the action call. If you're
not expecting to use policy that's probably okay.


On Thu, Nov 22, 2012 at 6:45 AM, Hollosi Gabor <hollosi.gabor at humanoit.hu>wrote:

> Hi Andi,
>
> thank you for your answer, but I think it isn't missing policy
> definition problem.
>
> The problem is in
>
>    result = getAccessor().action(id, parameters, value).asMap();
>
> because the return value of action() method can be null, but the asMap
> method tries to convert it without check.
>
> BG
> Gabor
>
>
>
> On 2012-11-21 16:37, Andreas Egloff wrote:
> > The root cause of this likely is a missing policy definition. However,
> > patch should now be more robust to missing policy definition with r1570
> > and later. Please let me know if you continue to observe the issue
> > HTH
> > Andi
> >
> > On Wed, Nov 21, 2012 at 9:01 AM, Hollosi Gabor
> > <hollosi.gabor at humanoit.hu <mailto:hollosi.gabor at humanoit.hu>> wrote:
> >
> >     Hi (again in new thread),
> >
> >     this is in rev 1306. There is a NullPointerException in
> >     JsonResourceObjectSet's action() method at this line
> >
> >           result = getAccessor().action(id, parameters, value).asMap();
> >
> >     when getAccessor().action() returns null. The null is coming from
> >     ManagedObjectSet's patchAction() method
> >
> >           return new JsonValue(null); // empty response (and lack of
> >     exception) indicates success
> >
> >     Everything is fine when we call patch through the REST API, beacuse
> >     JsonServerResource's toRepresentation() method takes care of the null
> >     value. But when we call patch from a script (a groovy script in a
> >     workflow process) then it throws an NPE.
> >
> >     Regards
> >     G?bor
> >
> >     --
> >     Holl?si G?bor
> >     rendszerm?rn?k
> >     Mobil: +36 30-821-2698 <tel:%2B36%2030-821-2698>
> >     E-mail: hollosi.gabor at humanoit.hu <mailto:hollosi.gabor at humanoit.hu>
> >     HumanoIT Kft. - IT Tuning
> >     Elk?lt?zt?nk! ?j c?m?nk:
> >     H-1138 Budapest, Madar?sz Viktor u. 47-49.
> >     Tel.: +36 1-299-0225 <tel:%2B36%20%201-299-0225>
> >     Fax: +36 1-299-0224 <tel:%2B36%20%201-299-0224>
> >     Informatika az ?zlet?rt!
> >     www.humanoit.hu <http://www.humanoit.hu>
> >
> >     _______________________________________________
> >     OpenIDM mailing list
> >     OpenIDM at forgerock.org <mailto:OpenIDM at forgerock.org>
> >     https://lists.forgerock.org/mailman/listinfo/openidm
> >
> >
> >
> >
> > _______________________________________________
> > OpenIDM mailing list
> > OpenIDM at forgerock.org
> > https://lists.forgerock.org/mailman/listinfo/openidm
> >
> _______________________________________________
> OpenIDM mailing list
> OpenIDM at forgerock.org
> https://lists.forgerock.org/mailman/listinfo/openidm
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.forgerock.org/pipermail/openidm/attachments/20121123/fb5d8a9a/attachment.html 

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic