[ https://issues.apache.org/jira/browse/JAMES-1700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15179917#comment-15179917 ]
ASF GitHub Bot commented on JAMES-1700: --------------------------------------- GitHub user rouazana opened a pull request: https://github.com/apache/james-project/pull/37 JAMES-1700 Don't fail in account creation if user already exists Using thread-weaver to really test racing condition. Manual mock seems to be necessary as Mockito and thread-weaver seem to conflict. You can merge this pull request into a Git repository by running: $ git pull https://github.com/rouazana/james-project JAMES-1700 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/james-project/pull/37.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #37 ---- commit e5fce8814f0531d8d334f8c242acc4823f4181c5 Author: Raphael Ouazana <raphael.ouaz...@linagora.com> Date: 2016-03-04T13:59:56Z JAMES-1700 Don't fail in account creation if user already exists ---- > New user provisionning throwing on concurrent requests > ------------------------------------------------------ > > Key: JAMES-1700 > URL: https://issues.apache.org/jira/browse/JAMES-1700 > Project: James Server > Issue Type: Bug > Components: JMAP > Reporter: Antoine Duprat > > Such exception occured: > {code} > java.lang.RuntimeException: > org.apache.james.user.api.UsersRepositoryException: User with username > us...@open-paas.org already exist! > at com.google.common.base.Throwables.propagate(Throwables.java:160) > at > org.apache.james.jmap.FirstUserConnectionFilter.createAccountIfNeeded(FirstUserConnectionFilter.java:80) > at > org.apache.james.jmap.FirstUserConnectionFilter$$Lambda$96/446105096.accept(Unknown > Source) > at java.util.Optional.ifPresent(Optional.java:159) > at > org.apache.james.jmap.FirstUserConnectionFilter.doFilter(FirstUserConnectionFilter.java:69) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668) > at > org.apache.james.jmap.AuthenticationFilter.doFilter(AuthenticationFilter.java:78) > at > org.apache.james.jmap.BypassAuthOnRequestMethod.tryAuth(BypassAuthOnRequestMethod.java:115) > at > org.apache.james.jmap.BypassAuthOnRequestMethod.doFilter(BypassAuthOnRequestMethod.java:97) > at > org.apache.james.jmap.AllowAllCrossOriginRequests.doFilter(AllowAllCrossOriginRequests.java:46) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:513) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:119) > at org.eclipse.jetty.server.Server.handle(Server.java:517) > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:306) > at > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:242) > at > org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:261) > at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95) > at > org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:75) > at > org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:213) > at > org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:147) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572) > at java.lang.Thread.run(Thread.java:745) > Caused by: org.apache.james.user.api.UsersRepositoryException: User with > username us...@open-paas.org already exist! > at > org.apache.james.user.cassandra.CassandraUsersRepository.doAddUser(CassandraUsersRepository.java:163) > at > org.apache.james.user.cassandra.CassandraUsersRepository.addUser(CassandraUsersRepository.java:145) > at > org.apache.james.jmap.FirstUserConnectionFilter.createUser(FirstUserConnectionFilter.java:94) > at > org.apache.james.jmap.FirstUserConnectionFilter.createAccount(FirstUserConnectionFilter.java:89) > at > org.apache.james.jmap.FirstUserConnectionFilter.createAccountIfNeeded(FirstUserConnectionFilter.java:77) > ... 24 more > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org