Guice configuration errors when importing or exporting policies using ssoadm in AM 5, 5.1.x and OpenAM 13.5.1

Last updated Apr 12, 2021

The purpose of this article is to provide assistance if you receive an "Exception in thread "main" Guice configuration errors" response when using the export-policy or import-policy ssoadm commands in AM/OpenAM.

1 reader recommends this article

This article has been archived and is no longer maintained by ForgeRock.


Using the export-policy or import-policy ssoadm command fails with the following exception:

Exception in thread "main" Guice configuration errors: 1) Could not find a suitable constructor in org.forgerock.http.Client. Classes must have either one (and only one) constructor annotated with @Inject or a zero-argument constructor that is not private. at org.forgerock.http.Client.class(Unknown Source) while locating org.forgerock.http.Client for parameter 0 at org.forgerock.openam.cli.entitlement.PolicyExport.<init>(Unknown Source) while locating org.forgerock.openam.cli.entitlement.PolicyExport 1 error at at at at org.forgerock.guice.core.InjectorHolder.getInstance( at com.sun.identity.cli.SubCommand.execute( at com.sun.identity.cli.CLIRequest.process( at com.sun.identity.cli.CLIRequest.process( at com.sun.identity.cli.CommandManager.serviceRequestQueue( at com.sun.identity.cli.CommandManager.<init>( at com.sun.identity.cli.CommandManager.main(

This occurs when you use a command such as the following:

$ ./ssoadm policy-export -e / -u amadmin -f pwd.txt -s "" -J policy.json

Recent Changes

Upgraded to, or installed AM 5 or 5.1.x.

Upgraded to, or installed OpenAM 13.5.1.


Recent changes to resolve OPENAM-9749 (Resource leak in ssoadm's audit logging) have caused this issue with exporting and importing policies via ssoadm.


This issue can be resolved by upgrading to OpenAM 13.5.2, or AM 5.5 and later; you can download this from BackStage.


You can workaround this issue as follows depending on your version:

AM 5 and 5.1.x

You can use Amster or REST to export and import policies. For example, you would use the following command to export with Amster:

am> export-config --path /path/to/export --realm / --realmEntities 'Policies'

See Authorization Guide › Importing and Exporting XACML 3.0 for further information on using REST.

OpenAM 13.5.1

You can install and use the ssoadm tool from OpenAM 13.5 or you can use REST to export and import policies.

See Developer's Guide › Importing and Exporting XACML 3.0 for further information on using REST.

See Also

How do I export and import policies in AM (All versions)?

create-realm ssoadm command fails in AM 5 with Guice configuration errors

Amster User Guide > Exporting Configuration Data

Amster User Guide > Importing Configuration Data

Related Training


Related Issue Tracker IDs

OPENAM-11584 (Ssoadm policy-import throws Guice error)

OPENAM-9749 (Resource leak in ssoadm's audit logging)

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