[OPENAM-10591] Generate more debug details about the JSON that is failing when JsonPolicyParser throws a UNABLE_TO_SERIALIZE_OBJECT exception Created: 09/Feb/17  Updated: 10/Nov/17  Resolved: 02/Nov/17

Status: Resolved
Project: OpenAM
Component/s: policy editor, rest
Affects Version/s: 12.0.0, 12.0.1, 12.0.2, 12.0.3, 12.0.4, 13.0.0, 13.5.0
Fix Version/s: 13.5.2, 6.0.0, 5.5.2

Type: Bug Priority: Minor
Reporter: Mark de Reeper Assignee: Mark de Reeper
Resolution: Fixed Votes: 0
Labels: EDISON
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Target Version/s:
Sprint: AM Sustaining Sprint 36, AM Sustaining Sprint 37, AM Sustaining Sprint 38, AM Sustaining Sprint 39, AM Sustaining Sprint 40, AM Sustaining Sprint 41, AM Sustaining Sprint 42, AM Sustaining Sprint 43, AM Sustaining Sprint 44
Story Points: 2
Needs backport:
Yes
Support Ticket IDs:
Needs QA verification:
No
Functional tests:
No
Are the reproduction steps defined?:
Yes and I used the same an in the description

 Description   

Having the JSON included when this exception is thrown would help with diagnosing the problem.

amPolicy:12/14/2016 10:43:52:511 AM UTC: Thread[http-bio-8080-exec-10,5,main]: TransactionId[206c3314-2206-4566-b5b9-fe4cdec43f3d-484] 
ERROR: PolicyResource :: QUERY : Error querying policy collection. 
com.sun.identity.entitlement.EntitlementException: Unable to serialize object. 
at org.forgerock.openam.entitlement.rest.JsonPolicyParser.printPolicy(JsonPolicyParser.java:95) 
at org.forgerock.openam.entitlement.rest.PolicyResource.policyResource(PolicyResource.java:276) 
at org.forgerock.openam.entitlement.rest.PolicyResource.queryCollection(PolicyResource.java:223) 
at org.forgerock.openam.rest.resource.DecoratedCollectionResourceProvider.queryCollection(DecoratedCollectionResourceProvider.java:83) 
at org.forgerock.json.resource.InterfaceCollectionHandler.handleQuery(InterfaceCollectionHandler.java:62) 
at org.forgerock.json.resource.Router.handleQuery(Router.java:310) 
at org.forgerock.json.resource.Router.handleQuery(Router.java:310) 
at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:99) 
at org.forgerock.authz.filter.crest.AuthorizationFilters$AuthorizationFilter$5.apply(AuthorizationFilters.java:350) 
at org.forgerock.authz.filter.crest.AuthorizationFilters$AuthorizationFilter$5.apply(AuthorizationFilters.java:346) 
at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:255) 
at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:244) 
at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:223) 
at org.forgerock.authz.filter.crest.AuthorizationFilters$AuthorizationFilter.filterQuery(AuthorizationFilters.java:345) 
at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:97) 
at org.forgerock.json.resource.FilterChain.handleQuery(FilterChain.java:231) 
at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:99) 
at org.forgerock.openam.rest.fluent.AuditFilter.filterQuery(AuditFilter.java:174) 
at org.forgerock.openam.rest.fluent.AuditFilterWrapper.filterQuery(AuditFilterWrapper.java:84)
at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:97) 
at org.forgerock.openam.rest.fluent.CrestLoggingFilter.filterQuery(CrestLoggingFilter.java:147)
at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:97) 
at org.forgerock.openam.rest.ContextFilter.filterQuery(ContextFilter.java:81) 
at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:97) 
at org.forgerock.openam.rest.AuthenticationEnforcer.filterQuery(AuthenticationEnforcer.java:173) 
at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:97) 
at org.forgerock.json.resource.FilterChain.handleQuery(FilterChain.java:231) 

Generated at Wed Nov 25 04:45:52 UTC 2020 using Jira 7.13.12#713012-sha1:6e07c38070d5191bbf7353952ed38f111754533a.