com.atlassian.crowd.exception.InvalidUserException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • h3. Problem Definition Currently, when a Service Desk project is open for Public sign-up, new users need to provide the following for user creation: * Email * Password * Full name Only for Email, user can't enter whitespace before or after the email address. The following error will be thrown: {noformat} 2016-08-04 09:27:46,861 http-nio-8719-exec-1 ERROR anonymous 567x2077x1 1qbg1i5 10.60.2.54 /servicedesk/customer/portal/1/user/signup [c.a.s.internal.user.ServiceDeskUserManagerScala] Could not create user: mogavenasan@asd.com com.atlassian.crowd.exception.InvalidUserException: User name may not contain leading or trailing whitespace at com.atlassian.crowd.manager.directory.DirectoryManagerGeneric.addUser(DirectoryManagerGeneric.java:314) 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 com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26) at com.sun.proxy.$Proxy275.addUser(Unknown Source) ... 3 filtered at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56) at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70) at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) at com.sun.proxy.$Proxy2668.addUser(Unknown Source) at com.atlassian.servicedesk.internal.user.ServiceDeskUserManagerScala$$anonfun$createServiceDeskRequestorScala$2.apply(ServiceDeskUserManagerScala.scala:239) at com.atlassian.servicedesk.internal.user.ServiceDeskUserManagerScala$$anonfun$createServiceDeskRequestorScala$2.apply(ServiceDeskUserManagerScala.scala:227) at scala.Option.fold(Option.scala:158) at com.atlassian.servicedesk.internal.user.ServiceDeskUserManagerScala.createServiceDeskRequestorScala(ServiceDeskUserManagerScala.scala:227) at com.atlassian.servicedesk.internal.feature.customer.user.signup.SignUpManager.com$atlassian$servicedesk$internal$feature$customer$user$signup$SignUpManager$$createSignUpCustomerInRole(SignUpManager.scala:115) at com.atlassian.servicedesk.internal.feature.customer.user.signup.SignUpManager$$anonfun$signUpCustomer$2$$anonfun$apply$1.apply(SignUpManager.scala:59) at com.atlassian.servicedesk.internal.feature.customer.user.signup.SignUpManager$$anonfun$signUpCustomer$2$$anonfun$apply$1.apply(SignUpManager.scala:58) at scalaz.$bslash$div.flatMap(Either.scala:134) at com.atlassian.servicedesk.internal.feature.customer.user.signup.SignUpManager$$anonfun$signUpCustomer$2.apply(SignUpManager.scala:58) at com.atlassian.servicedesk.internal.feature.customer.user.signup.SignUpManager$$anonfun$signUpCustomer$2.apply(SignUpManager.scala:57) at scalaz.$bslash$div.flatMap(Either.scala:134) at com.atlassian.servicedesk.internal.feature.customer.user.signup.SignUpManager.signUpCustomer(SignUpManager.scala:57) at com.atlassian.servicedesk.internal.rest.CustomerWeb$$anonfun$8$$anonfun$apply$6$$anonfun$apply$7$$anonfun$apply$9.apply(CustomerWeb.scala:428) at com.atlassian.servicedesk.internal.rest.CustomerWeb$$anonfun$8$$anonfun$apply$6$$anonfun$apply$7$$anonfun$apply$9.apply(CustomerWeb.scala:427) at scalaz.$bslash$div.flatMap(Either.scala:134) at com.atlassian.servicedesk.internal.rest.CustomerWeb$$anonfun$8$$anonfun$apply$6$$anonfun$apply$7.apply(CustomerWeb.scala:427) at com.atlassian.servicedesk.internal.rest.CustomerWeb$$anonfun$8$$anonfun$apply$6$$anonfun$apply$7.apply(CustomerWeb.scala:426) at scalaz.$bslash$div.flatMap(Either.scala:134) at com.atlassian.servicedesk.internal.rest.CustomerWeb$$anonfun$8$$anonfun$apply$6.apply(CustomerWeb.scala:426) at com.atlassian.servicedesk.internal.rest.CustomerWeb$$anonfun$8$$anonfun$apply$6.apply(CustomerWeb.scala:425) at scalaz.$bslash$div.flatMap(Either.scala:134) at com.atlassian.servicedesk.internal.rest.CustomerWeb$$anonfun$8.apply(CustomerWeb.scala:425) at com.atlassian.servicedesk.internal.rest.CustomerWeb$$anonfun$8.apply(CustomerWeb.scala:424) at scalaz.$bslash$div.flatMap(Either.scala:134) at com.atlassian.servicedesk.internal.rest.CustomerWeb.doSignUp(CustomerWeb.scala:424) ... 3 filtered at java.lang.reflect.Method.invoke(Method.java:498) ... 19 filtered at com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:154) ... 1 filtered at com.atlassian.plugins.rest.module.RestDelegatingServletFilter.doFilter(RestDelegatingServletFilter.java:68) ... 37 filtered at com.atlassian.servicedesk.internal.web.PopulateEyeballForRestFilter.doFilter(PopulateEyeballForRestFilter.java:27) ... 41 filtered at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:70) ... 22 filtered at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.doFilter(CustomerContextSettingFilter.java:107) ... 48 filtered at com.atlassian.servicedesk.project.internal.web.filters.NormaliseUrlFilter.doFilter(NormaliseUrlFilter.java:25) ... 16 filtered at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:70) ... 31 filtered at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.lambda$invokeFilterChain$0(CustomerContextSettingFilter.java:169) at com.atlassian.servicedesk.internal.util.scala.ScalaJavaInterOp$1.apply(ScalaJavaInterOp.java:25) at com.atlassian.servicedesk.internal.utils.context.CustomerContextUtil$.inCustomerContext(CustomerContextUtil.scala:24) at com.atlassian.servicedesk.internal.utils.context.CustomerContextUtil.inCustomerContext(CustomerContextUtil.scala) at com.atlassian.servicedesk.internal.utils.context.CustomerContextServiceImpl.inCustomerContext(CustomerContextServiceImpl.java:19) at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.inCustomerContext(CustomerContextSettingFilter.java:160) at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.doFilterImpl(CustomerContextSettingFilter.java:118) at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.doFilter(CustomerContextSettingFilter.java:112) ... 54 filtered 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) {noformat} h3. Suggested Solution Automatically trim the leading or trailing whitespace in the email address during Public sign-up.
    via by Mogavenasan Muthusamy [Atlassian],
    • com.atlassian.crowd.exception.InvalidUserException: User name may not contain leading or trailing whitespace at com.atlassian.crowd.manager.directory.DirectoryManagerGeneric.addUser(DirectoryManagerGeneric.java:314) 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 com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26) at com.sun.proxy.$Proxy275.addUser(Unknown Source)
    No Bugmate found.