Uploaded image for project: 'OpenOLAT'
  1. OpenOLAT
  2. OO-4690

RS: import new users with same user name but different data

    XMLWordPrintable

    Details

      Description

      • Import new users
      • In the list have twice the same user name
      • The users with the same user names must not have the same email addresses
      Exception: SQL Error: 0, SQLState: 235052020-05-14 12:53:59.777 [ajp-nio2-8082-exec-9] ERROR SqlExceptionHelper
      I333146-J60306 ^%^ org.hibernate.engine.jdbc.spi.SqlExceptionHelper
      Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
      ERROR: duplicate key value violates unique constraint "o_bs_identity_name_key" Detail: Key (name)=(xyz) already exists. Detail: Key (name)=(xyz) already exists.
      Exception: javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute statement
       at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:154)
       at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:181)
       at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:188)
       at org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:795)
       at org.hibernate.internal.SessionImpl.persist(SessionImpl.java:773)
       at org.olat.basesecurity.manager.AuthenticationHistoryDAO.createHistory(AuthenticationHistoryDAO.java:55)
       at org.olat.basesecurity.BaseSecurityManager.updateAuthenticationHistory(BaseSecurityManager.java:850)
       at org.olat.basesecurity.BaseSecurityManager.createAndPersistAuthenticationIntern(BaseSecurityManager.java:835)
       at org.olat.basesecurity.BaseSecurityManager.createAndPersistIdentityAndUser(BaseSecurityManager.java:368)
       at org.olat.basesecurity.BaseSecurityManager.createAndPersistIdentityAndUserWithDefaultProviderAndUserGroup(BaseSecurityManager.java:395)
       at org.olat.admin.user.imp.UserImportController.doCreateAndPersistIdentity(UserImportController.java:200)
       at org.olat.admin.user.imp.UserImportController.lambda$doOpenImportWizard$0(UserImportController.java:287)
       at org.olat.core.gui.control.generic.wizard.StepsMainRunController.finishWizard(StepsMainRunController.java:383)
       at org.olat.core.gui.control.generic.wizard.StepsMainRunController.event(StepsMainRunController.java:366)
       at org.olat.core.gui.control.DefaultController$1.run(DefaultController.java:250)
       at org.olat.core.logging.activity.ThreadLocalUserActivityLoggerInstaller.runWithUserActivityLogger(ThreadLocalUserActivityLoggerInstaller.java:108)
       at org.olat.core.gui.control.DefaultController.dispatchEvent(DefaultController.java:247)
       at org.olat.core.gui.control.DefaultController.fireEvent(DefaultController.java:194)
       at org.olat.admin.user.imp.SendMailConfirmationController.formOK(SendMailConfirmationController.java:79)
       at org.olat.core.gui.components.form.flexible.impl.FormBasicController.formFinish(FormBasicController.java:325)
       at org.olat.core.gui.control.generic.wizard.StepFormBasicController.event(StepFormBasicController.java:124)
       at org.olat.core.gui.control.DefaultController.dispatchEvent(DefaultController.java:206)
       at org.olat.core.gui.components.AbstractComponent$1.run(AbstractComponent.java:240)
       at org.olat.core.logging.activity.ThreadLocalUserActivityLoggerInstaller.runWithUserActivityLogger(ThreadLocalUserActivityLoggerInstaller.java:108)
       at org.olat.core.gui.components.AbstractComponent.fireEvent(AbstractComponent.java:238)
       at org.olat.core.gui.components.form.flexible.impl.FormWrapperContainer.fireValidation(FormWrapperContainer.java:119)
       at org.olat.core.gui.components.form.flexible.impl.Form.submit(Form.java:441)
       at org.olat.core.gui.components.form.flexible.impl.Form.submitAndFinish(Form.java:436)
       at org.olat.core.gui.control.generic.wizard.StepsMainRunController.formInnerEvent(StepsMainRunController.java:215)
       at org.olat.core.gui.components.form.flexible.impl.FormBasicController.event(FormBasicController.java:430)
       at org.olat.core.gui.control.DefaultController.dispatchEvent(DefaultController.java:206)
       at org.olat.core.gui.components.AbstractComponent$1.run(AbstractComponent.java:240)
       at org.olat.core.logging.activity.ThreadLocalUserActivityLoggerInstaller.runWithUserActivityLogger(ThreadLocalUserActivityLoggerInstaller.java:108)
       at org.olat.core.gui.components.AbstractComponent.fireEvent(AbstractComponent.java:238)
       at org.olat.core.gui.components.form.flexible.impl.FormWrapperContainer.fireFormEvent(FormWrapperContainer.java:131)
       at org.olat.core.gui.components.form.flexible.impl.Form.fireFormEvent(Form.java:717)
       at org.olat.core.gui.components.form.flexible.impl.elements.FormLinkImpl.dispatchFormRequest(FormLinkImpl.java:239)
       at org.olat.core.gui.components.form.flexible.impl.FormItemImpl.doDispatchFormRequest(FormItemImpl.java:561)
       at org.olat.core.gui.components.form.flexible.impl.Form.evalFormRequest(Form.java:296)
       at org.olat.core.gui.components.form.flexible.impl.FormWrapperContainer.doDispatchRequest(FormWrapperContainer.java:100)
       at org.olat.core.gui.components.AbstractComponent.dispatchRequest(AbstractComponent.java:193)
       at org.olat.core.gui.components.Window.doDispatchToComponent(Window.java:1201)
       at org.olat.core.gui.components.Window.dispatchRequest(Window.java:398)
       at org.olat.core.gui.components.Window.doDispatchRequest(Window.java:282)
       at org.olat.core.gui.components.AbstractComponent.dispatchRequest(AbstractComponent.java:193)
       at org.olat.dispatcher.AuthenticatedDispatcher.processValidDispatchURI(AuthenticatedDispatcher.java:263)
       at org.olat.dispatcher.AuthenticatedDispatcher.execute(AuthenticatedDispatcher.java:184)
       at org.olat.core.servlets.OpenOLATServlet.executeUserRequest(OpenOLATServlet.java:269)
       at org.olat.core.servlets.OpenOLATServlet.doPost(OpenOLATServlet.java:216)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
       at org.olat.core.servlets.OpenOLATServlet.service(OpenOLATServlet.java:160)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
       at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
       at org.olat.core.servlets.HeadersFilter.doFilter(HeadersFilter.java:95)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
       at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:479)
       at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
       at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:800)
       at org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1699)
       at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
       at org.apache.tomcat.util.net.AbstractEndpoint.processSocket(AbstractEndpoint.java:1050)
       at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$4.completed(Nio2Endpoint.java:630)
       at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$4.completed(Nio2Endpoint.java:608)
       at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126)
       at sun.nio.ch.Invoker$2.run(Invoker.java:218)
       at sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
       at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
       at java.lang.Thread.run(Thread.java:748)
      Caused by: org.hibernate.exception.ConstraintViolationException: could not execute statement
       at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:109)
       at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)
       at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:113)
       at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:99)
       at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:178)
       at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3214)
       at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3728)
       at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:91)
       at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:604)
       at org.hibernate.engine.spi.ActionQueue.executeInserts(ActionQueue.java:461)
       at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:258)
       at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:317)
       at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:335)
       at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:292)
       at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:198)
       at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:128)
       at org.hibernate.event.internal.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:192)
       at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:135)
       at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:62)
       at org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:788)
      ... 78 more Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "o_bs_identity_name_key" Detail: Key (name)=(91234_0320sim) already exists.
       at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440)
       at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183)
       at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308)
       at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)
       at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)
       at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:150)
       at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:127)
       at org.apache.tomcat.dbcp.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:87)
       at org.apache.tomcat.dbcp.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:87)
       at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:175)
      ... 93 more
      

        Attachments

          Activity

            People

            Assignee:
            srosse Stéphane Rossé
            Reporter:
            srosse Stéphane Rossé
            Tester:
            Mandy Menzel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: