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

post /tokens#1.1_create_post throws Internal Server error when used with the example

    Details

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

      Description

      When post /tokens#1.1_create_post is used with the example JSON the following exception is observed:

      frRest:03/07/2017 10:06:00:897 AM GMT: Thread[http-nio-8080-exec-8,5,main]: TransactionId[cb8119d1-9e24-4e75-85b0-a6f085a41736-350]
      ERROR: A runtime exception occurred during the CREST request handling
      java.lang.IllegalStateException: Exception from invocation expected to be handled by promise
      	at org.forgerock.json.resource.AnnotatedMethod.invoke(AnnotatedMethod.java:103)
      	at org.forgerock.json.resource.AnnotatedMethod.invoke(AnnotatedMethod.java:64)
      	at org.forgerock.json.resource.AnnotatedCollectionHandler.handleCreate(AnnotatedCollectionHandler.java:60)
      	at org.forgerock.json.resource.Router.handleCreate(Router.java:272)
      	at org.forgerock.json.resource.Router.handleCreate(Router.java:272)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleCreate(FilterChain.java:73)
      	at org.forgerock.authz.filter.crest.AuthorizationFilters$AuthorizationFilter$2.apply(AuthorizationFilters.java:265)
      	at org.forgerock.authz.filter.crest.AuthorizationFilters$AuthorizationFilter$2.apply(AuthorizationFilters.java:261)
      	at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:255)
      	at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:244)
      	at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:223)
      	at org.forgerock.authz.filter.crest.AuthorizationFilters$AuthorizationFilter.filterCreate(AuthorizationFilters.java:260)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleCreate(FilterChain.java:71)
      	at org.forgerock.json.resource.FilterChain.handleCreate(FilterChain.java:236)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleCreate(FilterChain.java:73)
      	at org.forgerock.openam.rest.fluent.AuditFilter.filterCreate(AuditFilter.java:110)
      	at org.forgerock.openam.rest.fluent.AuditFilterWrapper.filterCreate(AuditFilterWrapper.java:66)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleCreate(FilterChain.java:71)
      	at org.forgerock.openam.rest.fluent.CrestLoggingFilter.filterCreate(CrestLoggingFilter.java:92)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleCreate(FilterChain.java:71)
      	at org.forgerock.openam.rest.ContextFilter.filterCreate(ContextFilter.java:63)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleCreate(FilterChain.java:71)
      	at org.forgerock.openam.rest.AuthenticationEnforcer.filterCreate(AuthenticationEnforcer.java:146)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleCreate(FilterChain.java:71)
      	at org.forgerock.json.resource.FilterChain.handleCreate(FilterChain.java:236)
      	at org.forgerock.json.resource.Router.handleCreate(Router.java:272)
      	at org.forgerock.json.resource.InternalConnection.createAsync(InternalConnection.java:48)
      	at org.forgerock.json.resource.http.RequestRunner.visitCreateRequest(RequestRunner.java:183)
      	at org.forgerock.json.resource.http.RequestRunner.visitCreateRequest(RequestRunner.java:95)
      	at org.forgerock.json.resource.Requests$CreateRequestImpl.accept(Requests.java:258)
      	at org.forgerock.json.resource.http.RequestRunner.handleResult(RequestRunner.java:141)
      	at org.forgerock.json.resource.http.HttpAdapter$1.apply(HttpAdapter.java:725)
      	at org.forgerock.json.resource.http.HttpAdapter$1.apply(HttpAdapter.java:722)
      	at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:255)
      	at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:244)
      	at org.forgerock.json.resource.http.HttpAdapter.doRequest(HttpAdapter.java:721)
      	at org.forgerock.json.resource.http.HttpAdapter.doCreate(HttpAdapter.java:554)
      	at org.forgerock.json.resource.http.HttpAdapter.handle(HttpAdapter.java:281)
      	at org.forgerock.http.handler.Handlers$HandlerDescribableAsDescribableHandler.handle(Handlers.java:154)
      	at org.forgerock.http.filter.OptionsFilter.filter(OptionsFilter.java:77)
      	at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:61)
      	at org.forgerock.http.routing.Router.handle(Router.java:108)
      	at org.forgerock.http.routing.Router.handle(Router.java:108)
      	at org.forgerock.http.routing.ResourceApiVersionRoutingFilter.filter(ResourceApiVersionRoutingFilter.java:64)
      	at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:61)
      	at org.forgerock.caf.authentication.framework.AuthenticationFramework.grantAccess(AuthenticationFramework.java:201)
      	at org.forgerock.caf.authentication.framework.AuthenticationFramework.access$200(AuthenticationFramework.java:64)
      	at org.forgerock.caf.authentication.framework.AuthenticationFramework$2.apply(AuthenticationFramework.java:193)
      	at org.forgerock.caf.authentication.framework.AuthenticationFramework$2.apply(AuthenticationFramework.java:186)
      	at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:255)
      	at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:244)
      	at org.forgerock.caf.authentication.framework.AuthenticationFramework.validateRequest(AuthenticationFramework.java:149)
      	at org.forgerock.caf.authentication.framework.AuthenticationFramework.processMessage(AuthenticationFramework.java:141)
      	at org.forgerock.caf.authentication.framework.AuthenticationFilter.filter(AuthenticationFilter.java:92)
      	at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:61)
      	at org.forgerock.openam.http.GuiceHandler.handle(GuiceHandler.java:59)
      	at org.forgerock.openam.http.HttpRoute$6.handle(HttpRoute.java:214)
      	at org.forgerock.http.routing.Router.handle(Router.java:108)
      	at org.forgerock.http.swagger.OpenApiRequestFilter.filter(OpenApiRequestFilter.java:70)
      	at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:61)
      	at org.forgerock.openam.http.ApiDescriptorFilter.filter(ApiDescriptorFilter.java:147)
      	at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:61)
      	at org.forgerock.openam.http.OpenAMHttpApplication$1.filter(OpenAMHttpApplication.java:78)
      	at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:61)
      	at org.forgerock.http.filter.TransactionIdInboundFilter.filter(TransactionIdInboundFilter.java:60)
      	at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:61)
      	at org.forgerock.http.servlet.HttpFrameworkServlet.service(HttpFrameworkServlet.java:236)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at org.forgerock.openam.rest.ProtocolVersionFilter.doFilter(ProtocolVersionFilter.java:65)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at org.forgerock.openam.validation.ResponseValidationFilter.doFilter(ResponseValidationFilter.java:44)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at org.forgerock.openam.headers.SetHeadersFilter.doFilter(SetHeadersFilter.java:88)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at com.sun.identity.setup.AMSetupFilter.doFilter(AMSetupFilter.java:111)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at org.forgerock.openam.audit.context.AuditContextFilter.doFilter(AuditContextFilter.java:51)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
      	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
      	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:521)
      	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1096)
      	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:674)
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.reflect.InvocationTargetException
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.forgerock.json.resource.AnnotatedMethod.invoke(AnnotatedMethod.java:99)
      	... 103 more
      Caused by: java.lang.IllegalStateException: Failed to deserailise Token
      	at org.forgerock.openam.cts.utils.JSONSerialisation.deserialise(JSONSerialisation.java:92)
      	at org.forgerock.openam.core.rest.cts.CoreTokenResource.createInstance(CoreTokenResource.java:146)
      	... 108 more
      Caused by: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "blob" (class org.forgerock.openam.cts.api.tokens.Token), not marked as ignorable (one known property: "attributes"])
       at [Source: { "blob": [ 0 ], "userId": "string", "tokenId": "string", "expiryTimestamp": "2017-03-07T10:05:52.210Z", "attributeNames": [ "string" ], "type": "string" }; line: 1, column: 12] (through reference chain: org.forgerock.openam.cts.api.tokens.Token["blob"])
      	at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:62)
      	at com.fasterxml.jackson.databind.DeserializationContext.handleUnknownProperty(DeserializationContext.java:834)
      	at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:1094)
      	at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1470)
      	at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(BeanDeserializerBase.java:1448)
      	at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:282)
      	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:140)
      	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3798)
      	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2842)
      	at org.forgerock.openam.cts.utils.JSONSerialisation.deserialise(JSONSerialisation.java:89)
      	... 109 more
      
      
      ==> org.forgerock.http.servlet.HttpFrameworkServlet <==
      org.forgerock.http.servlet.HttpFrameworkServlet:03/07/2017 10:06:00:901 AM GMT: Thread[http-nio-8080-exec-8,5,main]: TransactionId[cb8119d1-9e24-4e75-85b0-a6f085a41736-350]
      ERROR: RuntimeException caught
      java.lang.IllegalStateException: Exception from invocation expected to be handled by promise
      	at org.forgerock.json.resource.AnnotatedMethod.invoke(AnnotatedMethod.java:103)
      	at org.forgerock.json.resource.AnnotatedMethod.invoke(AnnotatedMethod.java:64)
      	at org.forgerock.json.resource.AnnotatedCollectionHandler.handleCreate(AnnotatedCollectionHandler.java:60)
      	at org.forgerock.json.resource.Router.handleCreate(Router.java:272)
      	at org.forgerock.json.resource.Router.handleCreate(Router.java:272)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleCreate(FilterChain.java:73)
      	at org.forgerock.authz.filter.crest.AuthorizationFilters$AuthorizationFilter$2.apply(AuthorizationFilters.java:265)
      	at org.forgerock.authz.filter.crest.AuthorizationFilters$AuthorizationFilter$2.apply(AuthorizationFilters.java:261)
      	at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:255)
      	at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:244)
      	at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:223)
      	at org.forgerock.authz.filter.crest.AuthorizationFilters$AuthorizationFilter.filterCreate(AuthorizationFilters.java:260)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleCreate(FilterChain.java:71)
      	at org.forgerock.json.resource.FilterChain.handleCreate(FilterChain.java:236)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleCreate(FilterChain.java:73)
      	at org.forgerock.openam.rest.fluent.AuditFilter.filterCreate(AuditFilter.java:110)
      	at org.forgerock.openam.rest.fluent.AuditFilterWrapper.filterCreate(AuditFilterWrapper.java:66)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleCreate(FilterChain.java:71)
      	at org.forgerock.openam.rest.fluent.CrestLoggingFilter.filterCreate(CrestLoggingFilter.java:92)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleCreate(FilterChain.java:71)
      	at org.forgerock.openam.rest.ContextFilter.filterCreate(ContextFilter.java:63)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleCreate(FilterChain.java:71)
      	at org.forgerock.openam.rest.AuthenticationEnforcer.filterCreate(AuthenticationEnforcer.java:146)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleCreate(FilterChain.java:71)
      	at org.forgerock.json.resource.FilterChain.handleCreate(FilterChain.java:236)
      	at org.forgerock.json.resource.Router.handleCreate(Router.java:272)
      	at org.forgerock.json.resource.InternalConnection.createAsync(InternalConnection.java:48)
      	at org.forgerock.json.resource.http.RequestRunner.visitCreateRequest(RequestRunner.java:183)
      	at org.forgerock.json.resource.http.RequestRunner.visitCreateRequest(RequestRunner.java:95)
      	at org.forgerock.json.resource.Requests$CreateRequestImpl.accept(Requests.java:258)
      	at org.forgerock.json.resource.http.RequestRunner.handleResult(RequestRunner.java:141)
      	at org.forgerock.json.resource.http.HttpAdapter$1.apply(HttpAdapter.java:725)
      	at org.forgerock.json.resource.http.HttpAdapter$1.apply(HttpAdapter.java:722)
      	at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:255)
      	at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:244)
      	at org.forgerock.json.resource.http.HttpAdapter.doRequest(HttpAdapter.java:721)
      	at org.forgerock.json.resource.http.HttpAdapter.doCreate(HttpAdapter.java:554)
      	at org.forgerock.json.resource.http.HttpAdapter.handle(HttpAdapter.java:281)
      	at org.forgerock.http.handler.Handlers$HandlerDescribableAsDescribableHandler.handle(Handlers.java:154)
      	at org.forgerock.http.filter.OptionsFilter.filter(OptionsFilter.java:77)
      	at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:61)
      	at org.forgerock.http.routing.Router.handle(Router.java:108)
      	at org.forgerock.http.routing.Router.handle(Router.java:108)
      	at org.forgerock.http.routing.ResourceApiVersionRoutingFilter.filter(ResourceApiVersionRoutingFilter.java:64)
      	at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:61)
      	at org.forgerock.caf.authentication.framework.AuthenticationFramework.grantAccess(AuthenticationFramework.java:201)
      	at org.forgerock.caf.authentication.framework.AuthenticationFramework.access$200(AuthenticationFramework.java:64)
      	at org.forgerock.caf.authentication.framework.AuthenticationFramework$2.apply(AuthenticationFramework.java:193)
      	at org.forgerock.caf.authentication.framework.AuthenticationFramework$2.apply(AuthenticationFramework.java:186)
      	at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:255)
      	at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:244)
      	at org.forgerock.caf.authentication.framework.AuthenticationFramework.validateRequest(AuthenticationFramework.java:149)
      	at org.forgerock.caf.authentication.framework.AuthenticationFramework.processMessage(AuthenticationFramework.java:141)
      	at org.forgerock.caf.authentication.framework.AuthenticationFilter.filter(AuthenticationFilter.java:92)
      	at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:61)
      	at org.forgerock.openam.http.GuiceHandler.handle(GuiceHandler.java:59)
      	at org.forgerock.openam.http.HttpRoute$6.handle(HttpRoute.java:214)
      	at org.forgerock.http.routing.Router.handle(Router.java:108)
      	at org.forgerock.http.swagger.OpenApiRequestFilter.filter(OpenApiRequestFilter.java:70)
      	at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:61)
      	at org.forgerock.openam.http.ApiDescriptorFilter.filter(ApiDescriptorFilter.java:147)
      	at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:61)
      	at org.forgerock.openam.http.OpenAMHttpApplication$1.filter(OpenAMHttpApplication.java:78)
      	at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:61)
      	at org.forgerock.http.filter.TransactionIdInboundFilter.filter(TransactionIdInboundFilter.java:60)
      	at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:61)
      	at org.forgerock.http.servlet.HttpFrameworkServlet.service(HttpFrameworkServlet.java:236)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at org.forgerock.openam.rest.ProtocolVersionFilter.doFilter(ProtocolVersionFilter.java:65)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at org.forgerock.openam.validation.ResponseValidationFilter.doFilter(ResponseValidationFilter.java:44)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at org.forgerock.openam.headers.SetHeadersFilter.doFilter(SetHeadersFilter.java:88)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at com.sun.identity.setup.AMSetupFilter.doFilter(AMSetupFilter.java:111)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at org.forgerock.openam.audit.context.AuditContextFilter.doFilter(AuditContextFilter.java:51)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
      	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
      	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:521)
      	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1096)
      	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:674)
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.reflect.InvocationTargetException
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.forgerock.json.resource.AnnotatedMethod.invoke(AnnotatedMethod.java:99)
      	... 103 more
      Caused by: java.lang.IllegalStateException: Failed to deserailise Token
      	at org.forgerock.openam.cts.utils.JSONSerialisation.deserialise(JSONSerialisation.java:92)
      	at org.forgerock.openam.core.rest.cts.CoreTokenResource.createInstance(CoreTokenResource.java:146)
      	... 108 more
      Caused by: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "blob" (class org.forgerock.openam.cts.api.tokens.Token), not marked as ignorable (one known property: "attributes"])
       at [Source: { "blob": [ 0 ], "userId": "string", "tokenId": "string", "expiryTimestamp": "2017-03-07T10:05:52.210Z", "attributeNames": [ "string" ], "type": "string" }; line: 1, column: 12] (through reference chain: org.forgerock.openam.cts.api.tokens.Token["blob"])
      	at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:62)
      	at com.fasterxml.jackson.databind.DeserializationContext.handleUnknownProperty(DeserializationContext.java:834)
      	at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:1094)
      	at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1470)
      	at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(BeanDeserializerBase.java:1448)
      	at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:282)
      	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:140)
      	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3798)
      	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2842)
      	at org.forgerock.openam.cts.utils.JSONSerialisation.deserialise(JSONSerialisation.java:89)
      	... 109 more
      
      

      To reproduce:

      1. Log in as amadmin
      2. go to: /openam/XUI/#api/explorer/tokens
      3. expand {{post /tokens#1.1_create_post }}
      4. scroll down to requestPayload field and click on the Example Value field on the right
      5. click Try it out!
      6. observe the exception in the log

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated: