Solutions
ForgeRock Identity Platform
Does not apply to Identity Cloud

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

Last updated Jan 12, 2023

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:

  • IDM 7 and later: $ curl -X GET -H "X-OpenIDM-Username: openidm-admin" -H "X-OpenIDM-Password: openidm-admin" -H "Accept-API-Version: resource=1.0" -H "Content-Type: application/json" http://localhost:8080/openidm/config?_queryFilter=true
  • Pre-IDM 7: $ 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?

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 the configuration. 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 an existing repository to prevent this issue occurring. See Upgrade an 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 repository. You can do this as follows:

  1. Back up IDM by archiving the /path/to/idm directory and the contents of your repository.
  2. Shut down the IDM instance. $ cd /path/to/idm $ ./shutdown.sh
  3. Clear the existing configuration so it can be reloaded. The way this is done depends on the type of repository you are using:
    • JDBC repository: empty all configobjects related tables in your database. For example, you would run the following commands in MySQL™: DELETE FROM openidm.configobjects; DELETE FROM openidm.configobjectproperties;The configobjectproperties table is not included in the PostgreSQL database schema as of IDM 6.5 so you only need to empty the configobjects table if you are using PostgreSQL in later releases. See Removal of Property Tables in PostgreSQL for further information on this change.
    • DS repository: remove the content under the ou=config,dc=openidm,dc=forgerock,dc=com baseDN.
  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)


Copyright and Trademarks Copyright © 2023 ForgeRock, all rights reserved.