Skip to content

[Xsquash4Gitlab] [Attachement] synchronization failed if external image in an issue

Affected version : 7.0.4-release 7.1-release 8.0.-it2

Steps to reproduce

  • Have a ticket in a gitlab project whose description contains an image of an external tool
  • in Squash, create a synchronization on this ticket

Observed behaviour

Synchronization fails with the following trace

LOGS SYNC FAILED org.hibernate.AssertionFailure: null id in org.squashtest.tm.domain.attachment.Attachment entry (don't flush the Session after an exception occurs) at org.hibernate.event.internal.DefaultFlushEntityEventListener.checkId(DefaultFlushEntityEventListener.java:78) at org.hibernate.event.internal.DefaultFlushEntityEventListener.getValues(DefaultFlushEntityEventListener.java:207) at org.hibernate.event.internal.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:166) at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:107) at org.hibernate.event.internal.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:229) at org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:93) at org.hibernate.event.internal.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:50) at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:107) at org.hibernate.internal.SessionImpl.autoFlushIfRequired(SessionImpl.java:1372) at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1452) at org.hibernate.query.internal.AbstractProducedQuery.doList(AbstractProducedQuery.java:1649) at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1617) at org.hibernate.query.internal.AbstractProducedQuery.getSingleResult(AbstractProducedQuery.java:1665) at org.squashtest.tm.service.security.acls.domain.InheritableAclsObjectIdentityRetrievalStrategy.findAclHolder(InheritableAclsObjectIdentityRetrievalStrategy.java:154) at org.squashtest.tm.service.security.acls.domain.InheritableAclsObjectIdentityRetrievalStrategy.getObjectIdentity(InheritableAclsObjectIdentityRetrievalStrategy.java:130) at org.squashtest.tm.service.security.acls.domain.DatabaseBackedObjectIdentityGeneratorStrategy.createObjectIdentityFromHibernateEntity(DatabaseBackedObjectIdentityGeneratorStrategy.java:110) at org.squashtest.tm.service.security.acls.domain.DatabaseBackedObjectIdentityGeneratorStrategy.createObjectIdentity(DatabaseBackedObjectIdentityGeneratorStrategy.java:91) at org.springframework.security.acls.AclPermissionEvaluator.hasPermission(AclPermissionEvaluator.java:87) at org.squashtest.tm.service.internal.security.AffirmativeBasedCompositePermissionEvaluator.hasPermission(AffirmativeBasedCompositePermissionEvaluator.java:104) at org.springframework.security.access.expression.SecurityExpressionRoot.hasPermission(SecurityExpressionRoot.java:200) at jdk.internal.reflect.GeneratedMethodAccessor417.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.springframework.expression.spel.support.ReflectiveMethodExecutor.execute(ReflectiveMethodExecutor.java:139) at org.springframework.expression.spel.ast.MethodReference.getValueInternal(MethodReference.java:112) at org.springframework.expression.spel.ast.MethodReference.getValueInternal(MethodReference.java:95) at org.springframework.expression.spel.ast.SpelNodeImpl.getValue(SpelNodeImpl.java:212) at org.springframework.expression.spel.ast.OpOr.getBooleanValue(OpOr.java:56) at org.springframework.expression.spel.ast.OpOr.getValueInternal(OpOr.java:47) at org.springframework.expression.spel.ast.OpOr.getValueInternal(OpOr.java:37) at org.springframework.expression.spel.ast.SpelNodeImpl.getTypedValue(SpelNodeImpl.java:119) at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:309) at org.springframework.security.access.expression.ExpressionUtils.evaluateAsBoolean(ExpressionUtils.java:30) at org.springframework.security.access.expression.method.ExpressionBasedPreInvocationAdvice.before(ExpressionBasedPreInvocationAdvice.java:51) at org.springframework.security.access.prepost.PreInvocationAuthorizationAdviceVoter.vote(PreInvocationAuthorizationAdviceVoter.java:71) at org.springframework.security.access.prepost.PreInvocationAuthorizationAdviceVoter.vote(PreInvocationAuthorizationAdviceVoter.java:42) at org.springframework.security.access.vote.AffirmativeBased.decide(AffirmativeBased.java:60) at org.springframework.security.access.intercept.AbstractSecurityInterceptor.attemptAuthorization(AbstractSecurityInterceptor.java:239) at org.springframework.security.access.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:208) at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:58) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:241) at jdk.proxy3/jdk.proxy3.$Proxy406.changeStatus(Unknown Source) at org.squashtest.tm.service.internal.batchimport.RequirementFacility.changeRequirementVersionStatus(RequirementFacility.java:161) at org.squashtest.tm.service.internal.batchimport.RequirementFacility$CreateRequirementVersionPostProcessStrategy.doPostProcess(RequirementFacility.java:98) at org.squashtest.tm.service.internal.batchimport.RequirementFacility.postprocess(RequirementFacility.java:684) at org.squashtest.tm.service.internal.batchimport.FacilityImpl.postprocess(FacilityImpl.java:500) at org.squashtest.tm.plugin.xsquash4gitlab.service.RequirementImporter.importGitLabIssues(RequirementImporter.java:131) at org.squashtest.tm.plugin.xsquash4gitlab.service.RequirementImporter$$FastClassBySpringCGLIB$$eb76c29f.invoke() at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:792) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:762) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:762) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:707) at org.squashtest.tm.plugin.xsquash4gitlab.service.RequirementImporter$$EnhancerBySpringCGLIB$$33b3807f.importGitLabIssues() at org.squashtest.tm.plugin.xsquash4gitlab.service.SynchronisationService.lambda$1(SynchronisationService.java:287) at org.squashtest.tm.plugin.xsquash4gitlab.service.SynchronisationService.doInTransaction(SynchronisationService.java:477) at org.squashtest.tm.plugin.xsquash4gitlab.service.SynchronisationService.doSynchronisation(SynchronisationService.java:281) at org.squashtest.tm.plugin.xsquash4gitlab.service.SynchronisationService.performSynchronisation(SynchronisationService.java:244) at org.squashtest.tm.plugin.xsquash4gitlab.service.SynchronisationService.lambda$0(SynchronisationService.java:222) at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) at org.squashtest.tm.plugin.xsquash4gitlab.service.SynchronisationService.performSynchronisation(SynchronisationService.java:222) at org.squashtest.tm.plugin.xsquash4gitlab.service.SynchronisationService$$FastClassBySpringCGLIB$$3e0d6044.invoke() at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy.invokeMethod(CglibAopProxy.java:386) at org.springframework.aop.framework.CglibAopProxy.access$000(CglibAopProxy.java:85) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:703) at org.squashtest.tm.plugin.xsquash4gitlab.service.SynchronisationService$$EnhancerBySpringCGLIB$$7f40888e.performSynchronisation() at org.squashtest.tm.plugin.xsquash4gitlab.concurrency.SynchronisedSectionWrapper.lambda$0(SynchronisedSectionWrapper.java:38) at org.springframework.security.concurrent.DelegatingSecurityContextRunnable.run(DelegatingSecurityContextRunnable.java:82) at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:840)

Expected result
The synchronization should be successful and the image visible in the description of the synchronized requirement

Edited by Elise Lebouvier
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information