cancel
Showing results for 
Search instead for 
Did you mean: 

adding additional default alfresco group

pmverma
Champ in-the-making
Champ in-the-making
Hi everbody,I have a little problem.
As we know Alfresco comes up with two default Groups, ALFRESCO_ADMINISTRATORS and EMAIL_CONTRIBUTERS.
I would like to add myCustomGroup to that group to be a default Group.
so I add the following to my alfrescoAuthorityStore.xml
<cm:authorityContainer view:childName="cm:GROUP_MY_CUSTOM_GROUP">
               <view:aspects>
                  <sys:referenceable />
               </view:aspects>
               <view:properties>
                  <cm:name>GROUP_MY_CUSTOM_GROUP</cm:name>
                  <sys:node-uuid>GROUP_MY_CUSTOM_GROUP</sys:node-uuid>
                  <cm:authorityName>GROUP_MY_CUSTOM_GROUP</cm:authorityName>
               </view:properties>
            </cm:authorityContainer>

and add the following to alfrescoAuthorityStoreDefaultMembers.xml
.
.
.
</view:reference>
      <view:reference view:pathref="${system.authorities_container.childname}/cm:GROUP_MY_CUSTOM_GROUP">
      <view:associations>
         <cm:member>
            <view:reference view:pathref="${system.people_container.childname}/cm:${alfresco_user_store.mycustomusername}"
               view:childName="cm:${alfresco_user_store.mycustomusername}" />
         </cm:member>
      </view:associations>
   </view:reference>
<view:reference view:pathref="${system.zones_container.childname}/cm:AUTH.ALF">
      <view:associations>
        .
        .
        .
          <cm:inZone>
            <view:reference view:pathref="${system.people_container.childname}/cm:${alfresco_user_store.mycustomusername}"
               view:childName="cm:${alfresco_user_store.mycustomusername}" />
         </cm:inZone>
      </view:associations>
   </view:reference>
   <view:reference view:pathref="${system.zones_container.childname}/cm:APP.DEFAULT">
      <view:associations>
        .
………
………
            <view:reference view:pathref="${system.people_container.childname}/cm:${alfresco_user_store.mycustomusername}"
               view:childName="cm:${alfresco_user_store.mycustomusername}" />
         </cm:inZone>
      </view:associations>
   </view:reference>
and add to system.xml the followings

<cm:person view:childName="cm:${alfresco_user_store.mycustomusername}">
                        <view:acl>
                           <view:ace view:access="ALLOWED">
                              <view:authority>${alfresco_user_store.mycustomusername}</view:authority>
                              <view:permission>Read</view:permission>
                           </view:ace>
                        </view:acl>
                        <cm:userName>${alfresco_user_store.mycustomusername}</cm:userName>
                        <cm:firstName>My Custom User Name</cm:firstName>
                        <cm:lastName></cm:lastName>
                        <cm:email></cm:email>
                        <cm:organizationId></cm:organizationId>
                        <cm:homeFolder>/${spaces.company_home.childname}/${spaces.user_homes.childname}</cm:homeFolder>
                        <cm:homeFolderProvider>bootstrapHomeFolderProvider</cm:homeFolderProvider>
                        <cm:sizeCurrent>0</cm:sizeCurrent>
                    </cm:person>
after that I build and restart server but it does not show my added MY_CUSTOM_GROUP.

what am I missing?

I am developing code of community 4.0.0 c

thanks in advance!
7 REPLIES 7

afaust
Legendary Innovator
Legendary Innovator
Hello,

can you probide your bootstrap bean configuration? Is there any relevant output in the logs?

Regards
Axel

pmverma
Champ in-the-making
Champ in-the-making
Dear sir,
Honestly, I am beginner to Alfresco development.

I have modify only the above mentioned three files.

I have no much knowledge on bootstrap bean configuration.

could you please tell me where to configure.

As for log, It do not show any error or any thing in my console.

afaust
Legendary Innovator
Legendary Innovator
Ok, I didn't check the file names to see that they are actually the default files of Alfresco. In this case, you would not need a bootstrap bean. And this also explains why your group is not visible: These files are only evaluated / executed once on the very first time you boot your Alfresco server. If you change these afterwards, your changes will have no effect - only if you completely reset your system (e.g. clear the database and alf_data directory).

Regards
Axel

pmverma
Champ in-the-making
Champ in-the-making
Thank you dear sir,
as you point, I clear my database  and alf_data.
and then restart server.

but it still do not show new group. Smiley Sad

pmverma
Champ in-the-making
Champ in-the-making
but instead, I overwrite the original files under bootstrap folder. not using extension folder.
when restart server it shows error for local name is null.
I am not sure where the value is set null
my error console as follow.
2012-08-15 11:51:54,359  INFO  [management.subsystems.ChildApplicationContextFactory] [main] Starting 'Search' subsystem, ID: [Search, managed, lucene]
2012-08-15 11:51:55,656  INFO  [management.subsystems.ChildApplicationContextFactory] [main] Startup of 'Search' subsystem, ID: [Search, managed, lucene] complete
2012-08-15 11:51:57,468  ERROR [web.context.ContextLoader] [main] Context initialization failed
org.alfresco.error.AlfrescoRuntimeException: 07150000 Bootstrap failed
   at org.alfresco.repo.importer.ImporterBootstrap.bootstrap(ImporterBootstrap.java:361)
   at org.alfresco.repo.importer.ImporterBootstrap.onBootstrap(ImporterBootstrap.java:718)
   at org.springframework.extensions.surf.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:56)
   at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEventInternal(SafeApplicationEventMulticaster.java:209)
   at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:180)
   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)
   at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:911)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:428)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
   at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:63)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
   at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:675)
   at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:601)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
   at org.apache.catalina.core.StandardService.start(StandardService.java:525)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: org.alfresco.service.cmr.view.ImporterException: Failed to import package at line 92; column 33 due to error: Local name cannot be null or empty.
   at org.alfresco.repo.importer.view.ViewParser.parse(ViewParser.java:194)
   at org.alfresco.repo.importer.ImporterComponent.parserImport(ImporterComponent.java:407)
   at org.alfresco.repo.importer.ImporterComponent.importView(ImporterComponent.java:245)
   at org.alfresco.repo.importer.ImporterBootstrap.doImport(ImporterBootstrap.java:475)
   at org.alfresco.repo.importer.ImporterBootstrap.access$000(ImporterBootstrap.java:70)
   at org.alfresco.repo.importer.ImporterBootstrap$1$1.execute(ImporterBootstrap.java:350)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:388)
   at org.alfresco.repo.importer.ImporterBootstrap$1.doWork(ImporterBootstrap.java:354)
   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:519)
   at org.alfresco.repo.importer.ImporterBootstrap.bootstrap(ImporterBootstrap.java:357)
   … 35 more
Caused by: java.lang.IllegalArgumentException: Local name cannot be null or empty.
   at org.alfresco.service.namespace.QName.createValidLocalName(QName.java:199)
   at org.alfresco.repo.importer.ImporterComponent$NodeImporter.getChildName(ImporterComponent.java:903)
   at org.alfresco.repo.importer.ImporterComponent$NodeImporter.access$2200(ImporterComponent.java:456)
   at org.alfresco.repo.importer.ImporterComponent$NodeImporter$CreateNewNodeImporterStrategy.importNode(ImporterComponent.java:1349)
   at org.alfresco.repo.importer.ImporterComponent$NodeImporter.importNode(ImporterComponent.java:601)
   at org.alfresco.repo.importer.view.ViewParser.importNode(ViewParser.java:919)
   at org.alfresco.repo.importer.view.ViewParser.processEndType(ViewParser.java:883)
   at org.alfresco.repo.importer.view.ViewParser.processEndElement(ViewParser.java:863)
   at org.alfresco.repo.importer.view.ViewParser.parse(ViewParser.java:182)
   … 44 more

afaust
Legendary Innovator
Legendary Innovator
Hello,

which element is in that line of your bootstrap view? It may be, that a one of your properties is not properly resolved. At least now your modifications seem to be evaluated, so it is a step forward.

Regards
Axel

pmverma
Champ in-the-making
Champ in-the-making
Thank you Mr.AFaust for your valuable times.

I have solved my problem, here is the link for any other who would like to add bootstrap usergroup (default user and groups)

https://issues.alfresco.com/jira/browse/ALF-4923

thanks you everybody,