Uploaded image for project: 'OpenIDM'
  1. OpenIDM
  2. OPENIDM-12236

OpenIDM 6.0.0.4 - multiple-passwords sample doesn't work.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 6.0.0.4
    • Fix Version/s: None
    • Component/s: _Samples
    • Environment:
      OpenIDM version "6.0.0.4-M1" (build: 20181120213130, revision: 9e09055) jenkins-openidm-release-sustaining%2F6.0.x-34

      Description

      It looks like this issue is caused be OPENIDM-10987

      Steps to reproduce:

      1. Start OpenIDM with sample - multiple-passwords
      2. send a request to info/ping (or create user)

      Actual result: Internal Server Error is observed.

      Expected result: info/ping works as expected 

       

      REST API:

       

      curl --header "X-OpenIDM-Username: openidm-admin" --header "X-OpenIDM-Password: openidm-admin" --request GET "http://localhost:8080/openidm/info/ping"

       

      Stacktrace:

       

      [920] Dec 04, 2018 3:10:53.324 PM org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3 lambda$handleRequestWithLogging$8
      WARNING: Resource exception: 500 Internal Server Error: "ReferenceError: "exports" is not defined."
      org.forgerock.json.resource.InternalServerErrorException: ReferenceError: "exports" is not defined.
      at org.forgerock.json.resource.ResourceException.newResourceException(ResourceException.java:231)
      at org.forgerock.openidm.filter.ScriptedFilter.adapt(ScriptedFilter.java:294)
      at org.forgerock.openidm.filter.ScriptedFilter.evalScript(ScriptedFilter.java:266)
      at org.forgerock.openidm.filter.ScriptedFilter.evaluateOnRequest(ScriptedFilter.java:171)
      at org.forgerock.openidm.filter.ScriptedFilter.filterRequest(ScriptedFilter.java:143)
      at org.forgerock.openidm.filter.ScriptedFilter.filterRead(ScriptedFilter.java:107)
      at org.forgerock.json.resource.Filters$ConditionalFilter.filterRead(Filters.java:92)
      at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:103)
      at org.forgerock.openidm.audit.filter.AuditFilter.lambda$filterRead$5(AuditFilter.java:143)
      at org.forgerock.openidm.audit.filter.AuditFilter.logAuditAccessEntry(AuditFilter.java:169)
      at org.forgerock.openidm.audit.filter.AuditFilter.filterRead(AuditFilter.java:143)
      at org.forgerock.openidm.filter.MutableFilterDecorator.filterRead(MutableFilterDecorator.java:96)
      at org.forgerock.json.resource.Filters$ConditionalFilter.filterRead(Filters.java:92)
      at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:103)
      at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3.lambda$filterRead$5(ServletConnectionFactory.java:419)
      at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3.handleRequestWithLogging(ServletConnectionFactory.java:446)
      at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3.filterRead(ServletConnectionFactory.java:419)
      at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:103)
      at org.forgerock.openidm.filter.PassthroughFilter.filterRead(PassthroughFilter.java:72)
      at org.forgerock.openidm.filter.MutableFilterDecorator.filterRead(MutableFilterDecorator.java:96)
      at org.forgerock.openidm.filter.MutableFilterDecorator.filterRead(MutableFilterDecorator.java:96)
      at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:103)
      at org.forgerock.openidm.filter.PassthroughFilter.filterRead(PassthroughFilter.java:72)
      at org.forgerock.openidm.filter.MutableFilterDecorator.filterRead(MutableFilterDecorator.java:96)
      at org.forgerock.json.resource.Filters$ConditionalFilter.filterRead(Filters.java:92)
      at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:103)
      at org.forgerock.json.resource.FilterChain.handleRead(FilterChain.java:252)
      at org.forgerock.json.resource.InternalConnection.readAsync(InternalConnection.java:81)
      at org.forgerock.json.resource.AbstractConnectionWrapper.readAsync(AbstractConnectionWrapper.java:203)
      at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$InternalConnectionWrapper.readAsync(ServletConnectionFactory.java:298)
      at org.forgerock.json.resource.http.RequestRunner.visitReadRequest(RequestRunner.java:279)
      at org.forgerock.json.resource.http.RequestRunner.visitReadRequest(RequestRunner.java:82)
      at org.forgerock.json.resource.Requests$ReadRequestImpl.accept(Requests.java:583)
      at org.forgerock.json.resource.http.RequestRunner.handleResult(RequestRunner.java:128)
      at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:252)
      at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:241)
      at org.forgerock.json.resource.http.HttpAdapter.doRequest(HttpAdapter.java:711)
      at org.forgerock.json.resource.http.HttpAdapter.doRead(HttpAdapter.java:368)
      at org.forgerock.json.resource.http.HttpAdapter.handle(HttpAdapter.java:273)
      at org.forgerock.http.handler.Handlers$HandlerDescribableAsDescribableHandler.handle(Handlers.java:146)
      at org.forgerock.http.filter.OptionsFilter.filter(OptionsFilter.java:69)
      at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:53)
      at org.forgerock.http.routing.Router.handle(Router.java:100)
      at org.forgerock.http.swagger.OpenApiRequestFilter.filter(OpenApiRequestFilter.java:63)
      at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:53)
      at org.forgerock.openidm.auth.ProfileEnhancementCheckFilter.filter(ProfileEnhancementCheckFilter.java:138)
      at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:53)
      at org.forgerock.openidm.auth.LoginCountFilter.filter(LoginCountFilter.java:63)
      at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:53)
      at org.forgerock.caf.authentication.framework.AuthenticationFramework.grantAccess(AuthenticationFramework.java:188)
      at org.forgerock.caf.authentication.framework.AuthenticationFramework.lambda$onValidateRequestSuccess$1(AuthenticationFramework.java:181)
      at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:252)
      at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:241)
      at org.forgerock.caf.authentication.framework.AuthenticationFramework.validateRequest(AuthenticationFramework.java:144)
      at org.forgerock.caf.authentication.framework.AuthenticationFramework.processMessage(AuthenticationFramework.java:134)
      at org.forgerock.caf.authentication.framework.AuthenticationFilter.filter(AuthenticationFilter.java:84)
      at org.forgerock.openidm.auth.AuthFilterWrapper.filter(AuthFilterWrapper.java:87)
      at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:53)
      at org.forgerock.http.filter.TransactionIdInboundFilter.filter(TransactionIdInboundFilter.java:75)
      at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:53)
      at org.forgerock.http.servlet.HttpFrameworkServlet.service(HttpFrameworkServlet.java:254)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
      at org.eclipse.jetty.servlets.CrossOriginFilter.handle(CrossOriginFilter.java:257)
      at org.eclipse.jetty.servlets.CrossOriginFilter.doFilter(CrossOriginFilter.java:220)
      at sun.reflect.GeneratedMethodAccessor90.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.forgerock.openidm.servletregistration.impl.ServletRegistrationSingleton$FilterProxy.invoke(ServletRegistrationSingleton.java:296)
      at com.sun.proxy.$Proxy62.doFilter(Unknown Source)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83)
      at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:365)
      at sun.reflect.GeneratedMethodAccessor90.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.forgerock.openidm.servletregistration.impl.ServletRegistrationSingleton$FilterProxy.invoke(ServletRegistrationSingleton.java:296)
      at com.sun.proxy.$Proxy62.doFilter(Unknown Source)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
      at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
      at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:276)
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
      at org.eclipse.jetty.server.Server.handle(Server.java:499)
      at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
      at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
      at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
      at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
      at java.lang.Thread.run(Thread.java:748)
      Caused by: javax.script.ScriptException: ReferenceError: "exports" is not defined.
      at org.forgerock.openidm.script.javascript.RhinoScriptEngine$3.newScriptException(RhinoScriptEngine.java:496)
      at org.forgerock.openidm.script.javascript.RhinoScript.eval(RhinoScript.java:261)
      at sun.reflect.GeneratedMethodAccessor89.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.forgerock.openidm.script.registry.ScriptRegistryImpl$LibraryRecord.invoke(ScriptRegistryImpl.java:539)
      at com.sun.proxy.$Proxy44.eval(Unknown Source)
      at org.forgerock.openidm.script.registry.ScriptRegistryImpl$ScriptImpl.eval(ScriptRegistryImpl.java:814)
      at org.forgerock.openidm.script.registry.ScriptRegistryImpl$ScriptImpl.eval(ScriptRegistryImpl.java:825)
      at org.forgerock.openidm.filter.ScriptedFilter.evalScript(ScriptedFilter.java:263)
      ... 97 more
      Caused by: org.mozilla.javascript.EcmaError: ReferenceError: "exports" is not defined. (/home/jakub/Documents/6004/openidm/bin/defaults/script/router-authz.js#538)
      at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3687)
      at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3665)
      at org.mozilla.javascript.ScriptRuntime.notFoundError(ScriptRuntime.java:3750)
      at org.mozilla.javascript.ScriptRuntime.nameOrFunction(ScriptRuntime.java:1794)
      at org.mozilla.javascript.ScriptRuntime.name(ScriptRuntime.java:1733)
      at org.mozilla.javascript.gen._home_jakub_Documents_6004_openidm_bin_defaults_script_router_authz_js_16._c_anonymous_43(/home/jakub/Documents/6004/openidm/bin/defaults/script/router-authz.js:538)
      at org.mozilla.javascript.gen._home_jakub_Documents_6004_openidm_bin_defaults_script_router_authz_js_16.call(/home/jakub/Documents/6004/openidm/bin/defaults/script/router-authz.js)
      at org.mozilla.javascript.optimizer.OptRuntime.call0(OptRuntime.java:23)
      at org.mozilla.javascript.gen._home_jakub_Documents_6004_openidm_bin_defaults_script_router_authz_js_16._c_script_0(/home/jakub/Documents/6004/openidm/bin/defaults/script/router-authz.js:537)
      at org.mozilla.javascript.gen._home_jakub_Documents_6004_openidm_bin_defaults_script_router_authz_js_16.call(/home/jakub/Documents/6004/openidm/bin/defaults/script/router-authz.js)
      at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
      at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)
      at org.mozilla.javascript.gen._home_jakub_Documents_6004_openidm_bin_defaults_script_router_authz_js_16.call(/home/jakub/Documents/6004/openidm/bin/defaults/script/router-authz.js)
      at org.mozilla.javascript.gen._home_jakub_Documents_6004_openidm_bin_defaults_script_router_authz_js_16.exec(/home/jakub/Documents/6004/openidm/bin/defaults/script/router-authz.js)
      at org.forgerock.openidm.script.javascript.RhinoScript.eval(RhinoScript.java:231)
      ... 105 more
      

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mark.offutt Mark Offutt
                Reporter:
                jakub.janoska Jakub Janoska [X] (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: