Uploaded image for project: 'OpenAM'
  1. OpenAM
  2. OPENAM-10831

NPE when using empty payload for /tokens endpoint

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 14.0.0
    • Fix Version/s: None
    • Component/s: API descriptor
    • Labels:
    • Rank:
      1|hzt267:

      Description

      If empty payload is used for /tokens endpoint to create a token the UI is "stuck" with the processing indicator while NullPointerException is observed in the logs.

      ==> CoreSystem <==
      amThreadManager:03/07/2017 10:16:08:873 AM GMT: Thread[amThreadManager-2,5,main]: TransactionId[cb8119d1-9e24-4e75-85b0-a6f085a41736-0]
      ERROR: ThreadMonitor: Thread WatchDog detected error, restarting
      java.util.concurrent.ExecutionException: java.lang.NullPointerException
      	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
      	at java.util.concurrent.FutureTask.get(FutureTask.java:192)
      	at org.forgerock.openam.shared.concurrency.ThreadMonitor$WatchDog.run(ThreadMonitor.java:290)
      	at org.forgerock.openam.audit.context.AuditRequestContextPropagatingRunnable.run(AuditRequestContextPropagatingRunnable.java:42)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.NullPointerException
      	at org.forgerock.util.Reject.checkNotNull(Reject.java:90)
      	at org.forgerock.util.Reject.checkNotNull(Reject.java:71)
      	at org.forgerock.opendj.ldap.Ava.<init>(Ava.java:490)
      	at org.forgerock.opendj.ldap.Rdn.<init>(Rdn.java:251)
      	at org.forgerock.opendj.ldap.Dn.child(Dn.java:440)
      	at org.forgerock.openam.cts.utils.LdapTokenAttributeConversion.generateTokenDN(LdapTokenAttributeConversion.java:295)
      	at org.forgerock.openam.cts.utils.LdapTokenAttributeConversion.generateTokenDN(LdapTokenAttributeConversion.java:286)
      	at org.forgerock.openam.cts.utils.LdapTokenAttributeConversion.getEntry(LdapTokenAttributeConversion.java:76)
      	at org.forgerock.openam.cts.impl.LdapAdapter.create(LdapAdapter.java:113)
      	at org.forgerock.openam.sm.datalayer.impl.tasks.CreateTask.performTask(CreateTask.java:56)
      	at org.forgerock.openam.sm.datalayer.api.AbstractTask.execute(AbstractTask.java:49)
      	at org.forgerock.openam.sm.datalayer.impl.SeriesTaskExecutor$AuditRequestContextPropagatingTask.execute(SeriesTaskExecutor.java:217)
      	at org.forgerock.openam.sm.datalayer.impl.SimpleTaskExecutor.execute(SimpleTaskExecutor.java:67)
      	at org.forgerock.openam.sm.datalayer.impl.SeriesTaskExecutorThread.run(SeriesTaskExecutorThread.java:93)
      	... 6 more
      

      To reproduce:

      1. Log in to OpenAM as amadmin
      2. go to: /openam/XUI/#api/explorer/tokens
      3. expand any endpoint which requires payload
      4. as payload use: {}
      5. Click on Try it out!
      6. observe the described behaviour

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              n4al Nemanja Lukic
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated: