OpenIdentityPlatform / OpenIDM

OpenIDM is an open standards based Identity Management, Provisioning and Compliance solution. Experience shows that the most important features of an identity management product are: high flexibility in Business Process handling and compliance with open standards and interfaces. A highly flexible user interface combined with a very robust workflow engine make OpenIDM ready for any Identity Management project.
https://www.openidentityplatform.org/openidm
Other
69 stars 30 forks source link

OpenIDM can't create managed user: "openidm" (object) is not defined (e.g. openidm.create(...) ) #14

Closed jimmydevenportdxc closed 4 months ago

jimmydevenportdxc commented 4 years ago

Describe the bug Upon trying to create a new managed user with the "out of the box" OpenIDM 5.5.0, the openidm0.log.0 shows this error: Jul 23, 2020 11:16:13 PM org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3 handleException WARNING: Resource exception: 500 Internal Server Error: "onCreate script encountered exception" org.forgerock.json.resource.InternalServerErrorException: onCreate script encountered exception ... Caused by: javax.script.ScriptException: ReferenceError: "openidm" is not defined. (file:/abs/openidm/bin/defaults/script/roles/relationshipHelper.js#80) in file:/abs/openidm/bin/defaults/script/roles/relationshipHelper.js at line number 80 at column number 0 at org.forgerock.script.javascript.RhinoScript.eval(RhinoScript.java:342) at sun.reflect.GeneratedMethodAccessor69.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.forgerock.script.registry.ScriptRegistryImpl$LibraryRecord.invoke(ScriptRegistryImpl.java:505) at com.sun.proxy.$Proxy26.eval(Unknown Source) at org.forgerock.script.registry.ScriptRegistryImpl$ScriptImpl.eval(ScriptRegistryImpl.java:741) at org.forgerock.script.registry.ScriptRegistryImpl$ScriptImpl.eval(ScriptRegistryImpl.java:752) at org.forgerock.openidm.managed.ManagedObjectSet.execScript(ManagedObjectSet.java:349)

To Reproduce Steps to reproduce the behavior:

  1. Unzip the latest openidm-5.5.0.zip
  2. /path/to/openidm/startup.sh
  3. open browser to localhost:8080/admin and authenticate as openidm-admin/openidm-admin
  4. Select Manage->User from menu
  5. Click the "+ New User" button
  6. Fill out required fields on Details tab and Password tab, and click Save button
  7. Browser gets 500 error, go to /path/to/openidm/logs and look at openidm0.log.0 file
  8. Error shows in file, user not created

Expected behavior Should be able to create a user with no errors. Should also be able to use "openidm" object in custom endpoints, e.g. openidm.create, openidm.read, openidm.query, openidm.update, openidm.delete, openidm.action, etc.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context I tried with default orientdb as the repo and with MySQL as the repo, same issue. /path/to/openidm/bundle folder shows openidm*.jar and "scr list" on console shows they are active, but it appears that Rhino doesn't load them?