Bootstraping Group gets failed (Node already exists) on server restart which is success on first time

cancel
Showing results for 
Search instead for 
Did you mean: 
brahmaiah926
Active Member II

Bootstraping Group gets failed (Node already exists) on server restart which is success on first time

I am bootstraping the custom group as below metioned code and It is able to bootstrap group on first time successfully but second on server restart It is getting failed saying that node is already exists.

Please suggest, am I doing any wrong here.

I am using alfresco-5.2.4.

<?xml version="1.0" encoding="UTF-8"?>
<view:view xmlns:view="http://www.alfresco.org/view/repository/1.0"
xmlns:cm="http://www.alfresco.org/model/content/1.0"
xmlns:sys="http://www.alfresco.org/model/system/1.0">

<view:reference viewSmiley Tongueathref="${system.authorities_container.childname}">
<view:associations>
<sys:children>
<cm:authorityContainer view:childName="cm:GROUP_SITE_CREATORS">
<view:aspects>
<sys:referenceable />
</view:aspects>
<viewSmiley Tongueroperties>
<sys:node-uuid>1b48452f-cef9-43ec-bdbe-90b3dd5c9875</sys:node-uuid>
<cm:name>GROUP_SITE_CREATORS</cm:name>
<cm:authorityDisplayName>DONG_SITE_CREATORS</cm:authorityDisplayName>
<cm:authorityName>GROUP_SITE_CREATORS</cm:authorityName>
</viewSmiley Tongueroperties>
</cm:authorityContainer>
</sys:children>
</view:associations>
</view:reference>

<!-- Each group is also part of the AUTH.ALF and APP.DEFAULT zones -->
<view:reference viewSmiley Tongueathref="${system.zones_container.childname}/cm:AUTH.ALF">
<view:associations>
<cm:inZone>
<view:reference viewSmiley Tongueathref="${system.authorities_container.childname}/cm:GROUP_SITE_CREATORS"
view:childName="GROUP_SITE_CREATORS" />
</cm:inZone>
</view:associations>
</view:reference>
<view:reference viewSmiley Tongueathref="${system.zones_container.childname}/cm:APP.DEFAULT">
<view:associations>
<cm:inZone>
<view:reference viewSmiley Tongueathref="${system.authorities_container.childname}/cm:GROUP_SITE_CREATORS"
view:childName="GROUP_SITE_CREATORS" />
</cm:inZone>
</view:associations>
</view:reference>
</view:view>

Error logs 

Caused by: org.alfresco.service.cmr.view.ImporterException: Failed to import package at line 19; column 41 due to error: 11280098 Node already exists: (584, workspace://SpacesStore/1b48452f-cef9-43ec-bdbe-90b3dd5c9875)
at org.alfresco.repo.importer.view.ViewParser.parse(ViewParser.java:201)
at org.alfresco.repo.importer.ImporterComponent.parserImport(ImporterComponent.java:430)
at org.alfresco.repo.importer.ImporterComponent.importView(ImporterComponent.java:268)
at org.alfresco.repo.importer.ImporterBootstrap.doImport(ImporterBootstrap.java:481)
at org.alfresco.repo.importer.ImporterBootstrap.access$0(ImporterBootstrap.java:374)
at org.alfresco.repo.importer.ImporterBootstrap$1$1.execute(ImporterBootstrap.java:356)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:464)
at org.alfresco.repo.importer.ImporterBootstrap$1.doWork(ImporterBootstrap.java:360)
at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:555)
at org.alfresco.repo.importer.ImporterBootstrap.bootstrap(ImporterBootstrap.java:363)
... 53 more
Caused by: org.alfresco.repo.domain.node.NodeExistsException: 11280098 Node already exists: (584, workspace://SpacesStore/1b48452f-cef9-43ec-bdbe-90b3dd5c9875)
at org.alfresco.repo.domain.node.AbstractNodeDAOImpl.newNodeImplInsert(AbstractNodeDAOImpl.java:1463)
at org.alfresco.repo.domain.node.AbstractNodeDAOImpl.newNodeImpl(AbstractNodeDAOImpl.java:1400)
at org.alfresco.repo.domain.node.AbstractNodeDAOImpl.newNode(AbstractNodeDAOImpl.java:1302)
at org.alfresco.repo.node.db.DbNodeServiceImpl.createNode_aroundBody24(DbNodeServiceImpl.java:409)
at org.alfresco.repo.node.db.DbNodeServiceImpl$AjcClosure25.run(DbNodeServiceImpl.java:1)
at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)
at org.alfresco.traitextender.RouteExtensions.intercept(RouteExtensions.java:100)
at org.alfresco.repo.node.db.DbNodeServiceImpl.createNode(DbNodeServiceImpl.java:359)
at sun.reflect.GeneratedMethodAccessor313.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
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:244)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy50.createNode(Unknown Source)
at sun.reflect.GeneratedMethodAccessor313.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
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:111)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy50.createNode(Unknown Source)
at sun.reflect.GeneratedMethodAccessor313.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.alfresco.repo.service.StoreRedirectorProxyFactory$RedirectorInvocationHandler.invoke(StoreRedirectorProxyFactory.java:231)
at com.sun.proxy.$Proxy72.createNode(Unknown Source)
at org.alfresco.repo.node.MLPropertyInterceptor.invoke(MLPropertyInterceptor.java:284)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.alfresco.enterprise.repo.sync.SyncPropertyInterceptor.invoke(SyncPropertyInterceptor.java:262)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.alfresco.repo.node.NodeRefPropertyMethodInterceptor.invoke(NodeRefPropertyMethodInterceptor.java:190)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy50.createNode(Unknown Source)
at sun.reflect.GeneratedMethodAccessor313.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
at com.sun.proxy.$Proxy50.createNode(Unknown Source)
at sun.reflect.GeneratedMethodAccessor313.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
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:120)
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:53)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:166)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.alfresco.repo.transaction.RetryingTransactionInterceptor$1.execute(RetryingTransactionInterceptor.java:86)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:464)
at org.alfresco.repo.transaction.RetryingTransactionInterceptor.invoke(RetryingTransactionInterceptor.java:76)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy50.createNode(Unknown Source)
at org.alfresco.repo.importer.ImporterComponent$NodeImporter$CreateNewNodeImporterStrategy.importNode(ImporterComponent.java:1438)
at org.alfresco.repo.importer.ImporterComponent$NodeImporter.importNode(ImporterComponent.java:633)
at org.alfresco.repo.importer.view.ViewParser.importNode(ViewParser.java:925)
at org.alfresco.repo.importer.view.ViewParser.processEndType(ViewParser.java:888)
at org.alfresco.repo.importer.view.ViewParser.processEndElement(ViewParser.java:868)
at org.alfresco.repo.importer.view.ViewParser.parse(ViewParser.java:189)
... 62 more
Caused by: org.springframework.dao.DuplicateKeyException:

4 Replies
brahmaiah926
Active Member II

Re: Bootstraping Group gets failed (Node already exists) on server restart which is success on first time

Hi Everyone,

does anybody got same error, got resolved it ,

Please share your ideas for this solution.

deniz
Member II

Re: Bootstraping Group gets failed (Node already exists) on server restart which is success on first

@brahmaiah926 

Could you explain your solution. I have the same problem by the restart of content service.

cristinamr
Advanced

Re: Bootstraping Group gets failed (Node already exists) on server restart which is success on first

Hi @deniz, please share with us your custom code and logs.

Cheers!

--
VenziaIT: helping companies since 2005! Our ECM products: AQuA & Seidoc
sanjaybandhniya
Intermediate

Re: Bootstraping Group gets failed (Node already exists) on server restart which is success on first

Its get failed because UUID already exist.

Check this. https://docs.alfresco.com/content-services/5.2/develop/repo-ext-points/bootstrap-content/

Global for the entire bean:


  
    <bean id="myModule.bootstrap" 
      class="org.alfresco.repo.module.ImporterModuleComponent" 
      parent="module.baseComponent">
      <property name="uuidBinding">
        <value>REPLACE_EXISTING</value>
      </property>
      ...