Solutions

Failure to query configurations error when accessing Admin UI in IDM (All versions)

Last updated Jan 17, 2020

The purpose of this article is to provide assistance if you receive a "Failure to query configurations" error when accessing the Admin UI in IDM. This error is caused by "org.forgerock.json.JsonValueException: /: Expecting a Map or List".


1 reader recommends this article

Symptoms

An "Internal server error" is shown when trying to access the Managed Objects page in the Admin UI. This can also happen when accessing other configuration pages or using REST to retrieve the configuration with a queryfilter. For example, using a REST call such as the following:

$ curl -X GET -H "X-OpenIDM-Username: openidm-admin" -H "X-OpenIDM-Password: openidm-admin" -H "Content-Type: application/json" http://localhost:8080/openidm/config?_queryFilter=true

If you examine network traffic using your browser's Developer Tools or capture a HAR file, you will see the full response:

{ "code": 500, "reason": "Internal Server Error", "message": "Failure to query configurations." }

You can capture a HAR file as described in: How do I create a HAR file for troubleshooting IDM/OpenIDM (All versions)?

One of the following errors is shown in the openidm0.log when this happens:​​​​​

  • Failure to query configurations:
    Dec 30, 2019 11:28:06 AM org.forgerock.openidm.config.manage.ConfigObjectService handleQuery
    WARNING: Failure to query configurations.
    org.forgerock.json.JsonValueException: /: Expecting a Map or List
       at org.forgerock.json.JsonValue.put(JsonValue.java:1131)
       at org.forgerock.openidm.config.manage.ConfigObjectService.handleQuery(ConfigObjectService.java:678)
       at org.forgerock.json.resource.Router.handleQuery(Router.java:316)
       at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:95)
       at org.forgerock.json.resource.Filters$ConditionalFilter.filterQuery(Filters.java:84)
       at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:93)
       at org.forgerock.json.resource.Filters$ConditionalFilter.filterQuery(Filters.java:84)
       at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:93)
    ...
    Caused by: org.forgerock.json.JsonValueException: /: Expecting a Map or List
       at org.forgerock.json.JsonValue.put(JsonValue.java:1131)
       at org.forgerock.openidm.config.manage.ConfigObjectService.handleQuery(ConfigObjectService.java:678)
       ... 105 more
    
    
  • Resource exception: 500 Internal Server Error: "Failure to query configurations.":
    Dec 30, 2019 11:29:06 AM org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3 lambda$handleRequestWithLogging$8
    WARNING: Resource exception: 500 Internal Server Error: "Failure to query configurations."
    org.forgerock.json.resource.InternalServerErrorException: Failure to query configurations.
       at org.forgerock.openidm.config.manage.ConfigObjectService.handleQuery(ConfigObjectService.java:729)
       at org.forgerock.json.resource.Router.handleQuery(Router.java:316)
       at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:95)
       at org.forgerock.json.resource.Filters$ConditionalFilter.filterQuery(Filters.java:84)
       at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:93)
       at org.forgerock.json.resource.Filters$ConditionalFilter.filterQuery(Filters.java:84)
       at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:93)
    ...
    Caused by: org.forgerock.json.JsonValueException: /: Expecting a Map or List
       at org.forgerock.json.JsonValue.put(JsonValue.java:1132)
       at org.forgerock.openidm.config.manage.ConfigObjectService.handleQuery(ConfigObjectService.java:665)
       ... 100 more

Recent Changes

Upgraded IDM.

Made configuration changes.

Causes

An incomplete or corrupted entry (or entries) exists in one of the configobjects tables. This can occur after upgrading IDM or making configuration changes.

As of IDM 6.5, there is a required step in the documentation to clear all configobjects related tables when upgrading your existing repository to prevent this issue occurring. See Installation Guide › Upgrade Your Existing Repository for further information.

Solution

This issue can be resolved by reloading the configuration from your files to refresh the configuration stored in the database. You can do this as follows:

  1. Back up IDM by archiving the /path/to/idm directory and the contents of your repository.
  2. Shutdown the IDM instance.
    $ cd /path/to/idm
    $ ./shutdown.sh
  3. Empty the configobjects and configobjectproperties tables in your database. For example, you would run the following commands in MySQL™:
    DELETE FROM openidm.configobjects;
    DELETE FROM openidm.configobjectproperties;
  4. Start the IDM server:
    $ cd /path/to/idm
    $ ./startup.sh

See Also

N/A

Related Training

N/A

Related Issue Tracker IDs

OPENIDM-12062 (Upgrade procedure: JDBC repo IDM 6.0 to 6.5)

OPENIDM-8577 (IllegalStateException thrown if checkbox-slider clicked 3 successive times)

OPENIDM-8456 (Disabling a social provider causes Server Error to occur)



Copyright and TrademarksCopyright © 2020 ForgeRock, all rights reserved.
Loading...