Trying to redefine version 0.0 for path error when starting AM 7.x using ForgeOps
The purpose of this article is to provide assistance if you see an "org.forgerock.api.DuplicateDescriptionException: Trying to redefine version 0.0 for path" error when AM starts up or you access the API explorer. This issue is specific to AM deployed using the ForgeOps (ForgeRock DevOps) solution with file based configuration (FBC).
Symptoms
The following error is shown when AM starts up in a ForgeOps environment or you try to access the API explorer (which shows a blank page):org.forgerock.api.DuplicateDescriptionException: Trying to redefine version 0.0 for path at org.forgerock.api.models.Paths$Builder.merge(Paths.java:155) at org.forgerock.api.CrestApiProducer.merge(CrestApiProducer.java:118) at org.forgerock.api.CrestApiProducer.merge(CrestApiProducer.java:38) at org.forgerock.services.routing.AbstractRouter.buildApi(AbstractRouter.java:361) at org.forgerock.services.routing.AbstractRouter.notifyDescriptorChange(AbstractRouter.java:334)
This error may also be seen in the following format:{"timestamp":"2022-03-31T11:23:18.352Z","level":"ERROR","thread":"http-nio-8080-exec-3","logger":"org.forgerock.api.CrestApiProducer","message":"Trying to redefine version 0.0 for path ","context":"default","exception":"org.forgerock.api.DuplicateDescriptionException: Trying to redefine version 0.0 for path at org.forgerock.api.models.Paths$Builder.merge(Paths.java:155) at org.forgerock.api.CrestApiProducer.merge(CrestApiProducer.java:118) at org.forgerock.api.CrestApiProducer.merge(CrestApiProducer.java:38) at org.forgerock.services.routing.AbstractRouter.buildApi(AbstractRouter.java:361) at org.forgerock.services.routing.AbstractRouter.notifyDescriptorChange(AbstractRouter.java:334)
Improvements were made to logging as of AM 7.1.1 to include the affected API in the error, for example:{"timestamp":"2022-03-31T11:23:18.352Z","level":"ERROR","thread":"http-nio-8080-exec-3","logger":"org.forgerock.api.CrestApiProducer","message":"ApiDescription 'frapi:openam/realm-config:1.0//services/securid': Trying to redefine version 0.0 for path ","context":"default","exception":"org.forgerock.api.DuplicateDescriptionException: Trying to redefine version 0.0 for path at org.forgerock.api.models.Paths$Builder.merge(Paths.java:155) at org.forgerock.api.CrestApiProducer.merge(CrestApiProducer.java:118) at org.forgerock.api.CrestApiProducer.merge(CrestApiProducer.java:38) at org.forgerock.services.routing.AbstractRouter.buildApi(AbstractRouter.java:361) at org.forgerock.services.routing.AbstractRouter.notifyDescriptorChange(AbstractRouter.java:334)
This issue may cause deployments and/or builds to fail, but does not affect any functionality in AM.
Recent Changes
Enabled the API explorer.
Causes
This error is caused by an invalid configuration in the FBC and indicates that an API at path "" could not build all the routes needed at startup.
In particular, this error typically occurs in ForgeOps because of a missing authenticator: com.sun.identity.authentication.modules.securid.SecurID
. The RSA® SecurID library is not included in AM by default because ForgeRock is not licensed for redistribution, but it is listed as a default authenticator and therefore needs to be included in the configuration profile.
Solution
The SecurID specific issue can be resolved by updating the configuration profile to include the missing com.sun.identity.authentication.modules.securid.SecurID
authenticator:
AM 7.1 and later
- Shutdown ForgeOps.
- Create a new configuration profile as described in the documentation: Create a configuration profile.
- Edit the default.json file (located in the /path/to/forgeops/am/config-profiles/<my-profile>/config/services/realm/root/iplanetamauthservice/1.0/globalconfig directory) and include
com.sun.identity.authentication.modules.securid.SecurID
under authenticators.
For example:"authenticators" : [ "com.sun.identity.authentication.modules.securid.SecurID", "com.sun.identity.authentication.modules.ad.AD", "org.forgerock.openam.authentication.modules.saml2.SAML2", "org.forgerock.openam.authentication.modules.social.SocialAuthInstagram", "org.forgerock.openam.authentication.modules.oath.OATH", ...
- Build a new AM image that includes your changes and redeploy AM. Refer to steps 7 onwards in the documentation for detailed steps: am image.
AM 7
- Shutdown ForgeOps.
- Edit the default.json file (located in the /path/to/forgeops/config/7.x/<my-profile>/am/config/services/realm/root/iplanetamauthservice/1.0/globalconfig directory) and include
com.sun.identity.authentication.modules.securid.SecurID
under authenticators.
For example:"authenticators" : [ "com.sun.identity.authentication.modules.securid.SecurID", "com.sun.identity.authentication.modules.ad.AD", "org.forgerock.openam.authentication.modules.saml2.SAML2", "org.forgerock.openam.authentication.modules.social.SocialAuthInstagram", "org.forgerock.openam.authentication.modules.oath.OATH", ...
- Start ForgeOps.
If you continue to see these errors after adding the missing authenticator, you will need to find and resolve the invalid FBC configuration.
See Also
Welcome to ForgeOps (ForgeRock DevOps)
Related Training
N/A
Related Issue Tracker IDs
OPENAM-18140 (AM Error "Trying to redefine version 0.0 for path" thrown on AM startup with forgeops)