Chapter 13. Troubleshooting

Table of Contents
13.1. Object not found in heap
13.2. Could not find local configuration file
13.3. Unexpected character (x) at position 1103
13.4. The values in the flat file are incorrect
13.5. Problem accessing URL
13.6. StaticResponseHandler results in a blank page
13.7. OpenIG is not logging users in

This chapter covers common problems and their solutions.

13.1. Object not found in heap

HTTP ERROR 500
org.forgerock.openig.model.NodeException:
 ['file:/Users/george/.ForgeRock/OpenIG/config.json'].heap.objects[2]
  .config.filterObjects[0]: object not found in heap
at org.forgerock.openig.heaplet.HeapUtil.getRequiredObject(HeapUtil.java:54)
at org.forgerock.openig.filter.Chain$Heaplet.create(Chain.java:49)

You have a filter specified in the filterObjects list in the Chain object that is not in config.json. Make sure you have added an entry for the Filter and have correctly spelled its name in the filterObjects list.

13.2. Could not find local configuration file

HTTP ERROR 500
Problem accessing /. Reason:

 could not find local configuration file at
 /var/root/.ForgeRock/OpenIG/config.json or bootstrap file at
 /var/root/.ForgeRock/OpenIG/_private_var_folders_...webinf.json

OpenIG could not find its configuration file in the home directory of the user running the container where OpenIG is deployed, in this case /var/root/.ForgeRock/OpenIG/config.json. As you can see from the error message, OpenIG looks in a secondary location determined at runtime by the container. The secondary location is only necessary if you are running more than one OpenIG on a single host and your instances do not share a single configuration.

13.3. Unexpected character (x) at position 1103

HTTP ERROR 500
Problem accessing /. Reason:

Unexpected character (x) at position 1103

This error usually means a missing double quote or a missing bracket in the configuration file. Use a JSON editor or JSON validation tool such as JSONLint to make sure your JSON is valid.

13.4. The values in the flat file are incorrect

Ensure the flat file is readable by the user running the container for OpenIG. Values are all characters, including space and tabs, between the separator, so make sure the values are not padded with spaces.

13.5. Problem accessing URL

HTTP ERROR 500

Problem accessing /myURL . Reason:

java.lang.String cannot be cast to java.util.List
Caused by:
java.lang.ClassCastException: java.lang.String cannot be cast to java.util.List
at org.forgerock.openig.filter.LoggingFilter.writeHeaders(LoggingFilter.java:132
at org.forgerock.openig.filter.LoggingFilter.logResponse(LoggingFilter.java:119)
at org.forgerock.openig.filter.LoggingFilter.filter(LoggingFilter.java:86)
at org.forgerock.openig.filter.Chain.handle(Chain.java:54)

This error is typically encountered when using the AssignmentFilter and setting a string value for one of the Headers. All headers are stored in Lists so the header must be addressed with a subscript. For example, if you try to set exchange.request.headers['Location'] for a redirect in the response object, you should instead set exchange.request.headers['Location'][0]. A header without a subscript leads to the error above.

13.6. StaticResponseHandler results in a blank page

You must define an entity for the response. For example:

{
    "name": "AccessDeniedHandler",
    "type": "org.forgerock.openig.handler.StaticResponseHandler",
    "config": {
        "status": 403,
        "reason": "Forbidden",
        "entity": "<html><h2>User does not have permission<h2>html>"
    }
}

13.7. OpenIG is not logging users in

If you are proxying to more than one application in multiple DNS domains, you must make sure your container is enabled for domain cookies. See the chapter on Configuring Deployment Containers for details on your specific container.