Re: Allow SCIM user update if phoneNumbers is null


Paul Bakare
 

Filip,

Further deep trace shows that a SCIM object containing phoneNumbers: null
triggers the error, while phoneNumber: [] works

Below is the full trace:

{"message":"Unexpected
error","error":"scim","trace":"org.cloudfoundry.identity.uaa.scim.exception.ScimException:
Unexpected error\n\tat
org.cloudfoundry.identity.uaa.scim.endpoints.ScimUserEndpoints.handleException(ScimUserEndpoints.java:331)\n\tat
org.cloudfoundry.identity.uaa.scim.endpoints.ScimUserEndpoints$$FastClassBySpringCGLIB$$d564cbce.invoke(<generated>)\n\tat
org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)\n\tat
org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:708)\n\tat
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)\n\tat
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)\n\tat
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)\n\tat
org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:644)\n\tat
org.cloudfoundry.identity.uaa.scim.endpoints.ScimUserEndpoints$$EnhancerBySpringCGLIB$$b124460e.handleException(<generated>)\n\tat
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\n\tat
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat
java.lang.reflect.Method.invoke(Method.java:606)\n\tat
org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)\n\tat
org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)\n\tat
org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)\n\tat
org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver.doResolveHandlerMethodException(ExceptionHandlerExceptionResolver.java:339)\n\tat
org.springframework.web.servlet.handler.AbstractHandlerMethodExceptionResolver.doResolveException(AbstractHandlerMethodExceptionResolver.java:60)\n\tat
org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver.resolveException(AbstractHandlerExceptionResolver.java:138)\n\tat
org.springframework.web.servlet.DispatcherServlet.processHandlerException(DispatcherServlet.java:1161)\n\tat
org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:998)\n\tat
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:952)\n\tat
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)\n\tat
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)\n\tat
org.springframework.web.servlet.FrameworkServlet.doPut(FrameworkServlet.java:874)\n\tat
javax.servlet.http.HttpServlet.service(HttpServlet.java:649)\n\tat
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)\n\tat
javax.servlet.http.HttpServlet.service(HttpServlet.java:727)\n\tat
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)\n\tat
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)\n\tat
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)\n\tat
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)\n\tat
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)\n\tat
org.cloudfoundry.identity.uaa.login.XFrameOptionsFilter.doFilterInternal(XFrameOptionsFilter.java:16)\n\tat
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\n\tat
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)\n\tat
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)\n\tat
org.cloudfoundry.identity.uaa.oauth.BackwardsCompatibleScopeParsingFilter.doFilter(BackwardsCompatibleScopeParsingFilter.java:40)\n\tat
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)\n\tat
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)\n\tat
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)\n\tat
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)\n\tat
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)\n\tat
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)\n\tat
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)\n\tat
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)\n\tat
org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)\n\tat
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)\n\tat
org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154)\n\tat
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)\n\tat
org.springframework.security.oauth2.provider.authentication.OAuth2AuthenticationProcessingFilter.doFilter(OAuth2AuthenticationProcessingFilter.java:140)\n\tat
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)\n\tat
org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50)\n\tat
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\n\tat
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)\n\tat
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)\n\tat
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)\n\tat
org.cloudfoundry.identity.uaa.security.web.SecurityFilterChainPostProcessor$UaaLoggingFilter.doFilter(SecurityFilterChainPostProcessor.java:233)\n\tat
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)\n\tat
org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)\n\tat
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)\n\tat
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)\n\tat
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)\n\tat
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)\n\tat
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)\n\tat
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)\n\tat
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)\n\tat
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)\n\tat
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)\n\tat
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)\n\tat
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)\n\tat
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)\n\tat
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)\n\tat
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)\n\tat
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)\n\tat
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)\n\tat
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)\n\tat
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\n\tat
java.lang.Thread.run(Thread.java:744)\nCaused by:
java.lang.NullPointerException\n\tat
java.util.Arrays$ArrayList.<init>(Arrays.java:2842)\n\tat
java.util.Arrays.asList(Arrays.java:2828)\n\tat
org.cloudfoundry.identity.uaa.scim.ScimUserJsonDeserializer.deserialize(ScimUserJsonDeserializer.java:58)\n\tat
org.cloudfoundry.identity.uaa.scim.ScimUserJsonDeserializer.deserialize(ScimUserJsonDeserializer.java:28)\n\tat
org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2732)\n\tat
org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1923)\n\tat
org.springframework.http.converter.json.MappingJacksonHttpMessageConverter.readJavaType(MappingJacksonHttpMessageConverter.java:184)\n\tat
org.springframework.http.converter.json.MappingJacksonHttpMessageConverter.read(MappingJacksonHttpMessageConverter.java:179)\n\tat
org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodArgumentResolver.readWithMessageConverters(AbstractMessageConverterMethodArgumentResolver.java:138)\n\tat
org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.readWithMessageConverters(RequestResponseBodyMethodProcessor.java:178)\n\tat
org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.resolveArgument(RequestResponseBodyMethodProcessor.java:98)\n\tat
org.springframework.web.method.support.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:77)\n\tat
org.springframework.web.method.support.InvocableHandlerMethod.getMethodArgumentValues(InvocableHandlerMethod.java:157)\n\tat
org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:124)\n\tat
org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)\n\tat
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:749)\n\tat
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:689)\n\tat
org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83)\n\tat
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:938)\n\t...
57 more\n"}

On Fri, Mar 4, 2016 at 5:04 PM, Filip Hanik <fhanik(a)pivotal.io> wrote:

hi Kayode, can you paste the full exception, this email is missing the
root cause that will be in the bottom of your stack trace.
we can then open an issue and fix it
Filip

On Fri, Mar 4, 2016 at 8:01 AM, Kayode Odeyemi <dreyemi(a)gmail.com> wrote:

On SCIM update, if phoneNumbers is null, UAA breaks with this error
message, {"message":"Unexpected error","error":"scim"}

Here's the full stack trace:
{"message":"Unexpected
error","error":"scim","trace":"org.cloudfoundry.identity.uaa.scim.exception.ScimException:
Unexpected error\n\tat
org.cloudfoundry.identity.uaa.scim.endpoints.ScimUserEndpoints.handleException(ScimUserEndpoints.java:331)\n\tat
org.cloudfoundry.identity.uaa.scim.endpoints.ScimUserEndpoints$$FastClassBySpringCGLIB$$d564cbce.invoke(
<generated>)\n\tat
org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)\n\tat
org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib
AopProxy.java:708)\n\tat
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)\n\tat
org.springframework.aop.interceptor.ExposeInvocation
Interceptor.invoke(ExposeInvocationInterceptor.java:92)\n\tat
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)\n\tat
org.springframe
work.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:644)\n\tat
org.cloudfoundry.identity.uaa.scim.endpoints.ScimUserEndpoints$$EnhancerBySpringCGLIB$$b124460e.handleException(<generated>)\n\tat
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

Join cf-dev@lists.cloudfoundry.org to automatically receive all group messages.