Uploaded image for project: 'OpenIDM'
  1. OpenIDM
  2. OPENIDM-4083

ReconciliationService unable to query audit data from remote SQL server

    Details

      Description

      There appears to be a bug in the ReconciliationService which prevents it from returning Recon Summary entries from audit data on a remote SQL server:

      Specifically, the following is incorrect within the current code:

                                  Requests.newQueryRequest(AUDIT_RECON).setQueryFilter(
                                          and(
                                                  equalTo(new JsonPointer(ReconAuditEventBuilder.RECON_ID), localId),
                                                  equalTo(new JsonPointer(ReconAuditEventBuilder.RECON_ID), SUMMARY)
                                          )
                                  ),
                                  queryResult);
      

      Note that the second equalTo condition should be ENTRY_TYPE == SUMMARY:

      equalTo(new JsonPointer(ReconAuditEventBuilder.ENTRY_TYPE), SUMMARY)
      

      After making the above change the correct query is executed, however it fails with the following:

      Caused by: org.forgerock.script.exception.ScriptThrownException: Wrapped org.forgerock.json.resource.InternalServerErrorException: /messageDetail: Expecting a java.util.Map (/Users/cgdrake/Projects/stash/openidm/openidm-zip/target/openidm/bin/defaults/script/ui/mappingDetails.js#46) in /Users/cgdrake/Projects/stash/openidm/openidm-zip/target/openidm/bin/defaults/script/ui/mappingDetails.js at line number 46 at column number 0 {code=500, reason=Internal Server Error, message=/messageDetail: Expecting a java.util.Map}
      	at org.forgerock.script.javascript.RhinoScript.eval(RhinoScript.java:318)
      	at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at org.forgerock.script.registry.ScriptRegistryImpl$LibraryRecord.invoke(ScriptRegistryImpl.java:505)
      	at com.sun.proxy.$Proxy10.eval(Unknown Source)
      	at org.forgerock.script.registry.ScriptRegistryImpl$ScriptImpl.eval(ScriptRegistryImpl.java:741)
      	at org.forgerock.script.registry.ScriptRegistryImpl$ScriptImpl.eval(ScriptRegistryImpl.java:752)
      	at org.forgerock.openidm.script.ScriptedRequestHandler.evaluate(ScriptedRequestHandler.java:425)
      	at org.forgerock.openidm.script.ScriptedRequestHandler.handleRead(ScriptedRequestHandler.java:369)
      	... 83 more
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cgdrake Chris Drake
                Reporter:
                cgdrake Chris Drake
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: