Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-15888

The ImapServiceImplTest fails intermittently on MySQL and MariaDB

    Details

      Description

      An example of the error can be seen here, it happens in different tests inside the ImapServiceImplTest but on in every build:

      org.alfresco.service.cmr.view.ImporterException: Failed to import package at line 31; column 20 due to error: Duplicate child name not allowed: ___-___folder_a
      	at org.alfresco.repo.importer.view.ViewParser.parse(ViewParser.java:194)
      	at org.alfresco.repo.importer.ImporterComponent.parserImport(ImporterComponent.java:423)
      	at org.alfresco.repo.importer.ImporterComponent.importView(ImporterComponent.java:272)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      	at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:34)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:46)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:159)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
      	at com.sun.proxy.$Proxy90.importView(Unknown Source)
      	at org.alfresco.repo.imap.ImapServiceImplTest.importInternal(ImapServiceImplTest.java:232)
      	at org.alfresco.repo.imap.ImapServiceImplTest.setUp(ImapServiceImplTest.java:209)
      Caused by: org.alfresco.service.cmr.repository.DuplicateChildNodeNameException: Duplicate child name not allowed: ___-___folder_a
      	at org.alfresco.repo.domain.node.AbstractNodeDAOImpl$5.execute(AbstractNodeDAOImpl.java:3165)
      	at org.alfresco.repo.domain.node.AbstractNodeDAOImpl$5.execute(AbstractNodeDAOImpl.java:3135)
      	at org.alfresco.ibatis.RetryingCallbackHelper.doWithRetry(RetryingCallbackHelper.java:101)
      	at org.alfresco.repo.domain.node.AbstractNodeDAOImpl.newChildAssocImpl(AbstractNodeDAOImpl.java:3173)
      	at org.alfresco.repo.domain.node.AbstractNodeDAOImpl.newNode(AbstractNodeDAOImpl.java:1309)
      	at org.alfresco.repo.node.db.DbNodeServiceImpl.createNode(DbNodeServiceImpl.java:379)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      	at org.alfresco.repo.lock.mem.LockableAspectInterceptor.invoke(LockableAspectInterceptor.java:226)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
      	at com.sun.proxy.$Proxy13.createNode(Unknown Source)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      	at org.alfresco.repo.tenant.MultiTNodeServiceInterceptor.invoke(MultiTNodeServiceInterceptor.java:104)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
      	at com.sun.proxy.$Proxy13.createNode(Unknown Source)
      	at org.alfresco.repo.service.StoreRedirectorProxyFactory$RedirectorInvocationHandler.invoke(StoreRedirectorProxyFactory.java:224)
      	at com.sun.proxy.$Proxy45.createNode(Unknown Source)
      	at org.alfresco.repo.node.MLPropertyInterceptor.invoke(MLPropertyInterceptor.java:279)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at org.alfresco.enterprise.repo.sync.SyncPropertyInterceptor.invoke(SyncPropertyInterceptor.java:258)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at org.alfresco.repo.node.NodeRefPropertyMethodInterceptor.invoke(NodeRefPropertyMethodInterceptor.java:183)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
      	at com.sun.proxy.$Proxy13.createNode(Unknown Source)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:196)
      	at com.sun.proxy.$Proxy13.createNode(Unknown Source)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      	at org.alfresco.repo.audit.DisableAuditableBehaviourInterceptor.invoke(DisableAuditableBehaviourInterceptor.java:113)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:46)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:159)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at org.alfresco.repo.transaction.RetryingTransactionInterceptor$1.execute(RetryingTransactionInterceptor.java:79)
      	at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:457)
      	at org.alfresco.repo.transaction.RetryingTransactionInterceptor.invoke(RetryingTransactionInterceptor.java:69)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at org.alfresco.enterprise.repo.authorization.AuthorizationStatusInterceptor.invoke(AuthorizationStatusInterceptor.java:182)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
      	at com.sun.proxy.$Proxy13.createNode(Unknown Source)
      	at org.alfresco.repo.importer.ImporterComponent$NodeImporter$CreateNewNodeImporterStrategy.importNode(ImporterComponent.java:1424)
      	at org.alfresco.repo.importer.ImporterComponent$NodeImporter.importNode(ImporterComponent.java:617)
      	at org.alfresco.repo.importer.view.ViewParser.importNode(ViewParser.java:921)
      	at org.alfresco.repo.importer.view.ViewParser.processStartAssoc(ViewParser.java:836)
      	at org.alfresco.repo.importer.view.ViewParser.processStartElement(ViewParser.java:333)
      	at org.alfresco.repo.importer.view.ViewParser.parse(ViewParser.java:176)
      Caused by: org.springframework.dao.DuplicateKeyException: 
      ### Error updating database.  Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '14028-35-4268636471-___-___folder_a' for key 'parent_node_id'
      ### The error may involve alfresco.node.insert.insert_ChildAssoc-Inline
      ### The error occurred while setting parameters
      ### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '14028-35-4268636471-___-___folder_a' for key 'parent_node_id'
      ; SQL []; Duplicate entry '14028-35-4268636471-___-___folder_a' for key 'parent_node_id'; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '14028-35-4268636471-___-___folder_a' for key 'parent_node_id'
      	at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:241)
      	at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
      	at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:71)
      	at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:346)
      	at com.sun.proxy.$Proxy9.insert(Unknown Source)
      	at org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:231)
      	at org.alfresco.repo.domain.node.ibatis.NodeDAOImpl.insertChildAssoc(NodeDAOImpl.java:889)
      	at org.alfresco.repo.domain.node.AbstractNodeDAOImpl$5.execute(AbstractNodeDAOImpl.java:3141)
      Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '14028-35-4268636471-___-___folder_a' for key 'parent_node_id'
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
      	at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
      	at com.mysql.jdbc.Util.getInstance(Util.java:384)
      	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1041)
      	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3566)
      	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3498)
      	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959)
      	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2113)
      	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2568)
      	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2113)
      	at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1364)
      	at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
      	at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
      	at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
      	at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:22)
      	at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:51)
      	at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:29)
      	at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:87)
      	at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:46)
      	at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:118)
      	at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:107)
      	at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:338)
      

        Attachments

          Issue Links

            Structure

              Activity

                People

                • Assignee:
                  closedbugs Closed Bugs (Inactive)
                  Reporter:
                  amukha Alex Mukha
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 2 days, 4 hours, 29 minutes
                    2d 4h 29m

                      Structure Helper Panel