Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jimmydevenportdxc opened this issue Jul 23, 2020 · 0 comments
Assignees

Comments

@jimmydevenportdxc
Copy link

jimmydevenportdxc commented Jul 23, 2020

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):

  • OS: Red Hat Enterprise Linux 8
  • Browser any

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?

@jimmydevenportdxc jimmydevenportdxc changed the title OpenIDM can't create managed user: "openidm" (object) is not defined (e.g. openidm.query(...) ) OpenIDM can't create managed user: "openidm" (object) is not defined (e.g. openidm.create(...) ) Jul 23, 2020
@vharseko vharseko self-assigned this Apr 24, 2024
vharseko added a commit to OpenIdentityPlatform/commons that referenced this issue Apr 25, 2024
vharseko added a commit to vharseko/OpenIDM that referenced this issue Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants