cancel
Showing results for 
Search instead for 
Did you mean: 

error while managing groups

lennaart_dewulf
Champ in-the-making
Champ in-the-making
Hi,

I'm running Alfresco 2.0 on Tomcat and have a problem when I want to manage some user groups.

I created 6 different groups and with some of them I have problems when I want to add users to that group or when I want to delete that group.
This is the error I receive when I want to add users to the group or when I want to delete it:

javax.faces.el.EvaluationException: Exception while invoking expression #{GroupsBean.setupGroupAction}
caused by:
org.alfresco.repo.security.authority.UnknownAuthorityException: An authority was not found for GROUP_finance

Hide Details

javax.faces.el.EvaluationException: Exception while invoking expression #{GroupsBean.setupGroupAction}
at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:153)
at javax.faces.component.UICommand.broadcast(UICommand.java:86)
at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:164)
at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:316)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:105)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.alfresco.web.app.servlet.AdminAuthenticationFilter.doFilter(AdminAuthenticationFilter.java:80)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:81)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)
Caused by: org.alfresco.repo.security.authority.UnknownAuthorityException: An authority was not found for GROUP_finance
at org.alfresco.repo.security.authority.AuthorityDAOImpl.getContainedAuthorities(AuthorityDAOImpl.java:213)
at org.alfresco.repo.security.authority.AuthorityServiceImpl.getContainedAuthorities(AuthorityServiceImpl.java:212)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:116)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
at org.alfresco.repo.audit.AuditComponentImpl.auditImpl(AuditComponentImpl.java:219)
at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:165)
at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
at $Proxy19.getContainedAuthorities(Unknown Source)
at org.alfresco.web.bean.GroupsBean.setActionGroup(GroupsBean.java:290)
at org.alfresco.web.bean.GroupsBean.setupGroupAction(GroupsBean.java:625)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:129)


The strange thing is that I don't receive this error on all the groups.
I tried to make new groups and on some of them I also receive this error while others work like they should.

Has anyone an idea what is causing this error and how I can solve this?

Thanks
12 REPLIES 12

askrates1
Champ in-the-making
Champ in-the-making
Just to confirm. I have the same error:

A system error happened during the operation: An authority was not found for GROUP_xxxxxxxxx

Anyone out there that can help? This is pretty basic functionality. :?:

blackout
Champ in-the-making
Champ in-the-making
I have the same error too!

andy
Champ on-the-rise
Champ on-the-rise
Hi

This has been rasied as a bug.

The issue is that group ids are being tokenised according to the locale when they are created, then when you search for them you may use a different locale and tokens do not match up. The group id should use fixed tokenisation. You could fix this up yourself by changing the tokenisation of

 
            …
            <property name="usr:authorityName">
               <type>d:text</type>
            </property>
             …

to


           ….
            <property name="usr:authorityName">
               <type>d:text</type>
               <index enabled="true">
                  <atomic>true</atomic>
                  <stored>false</stored>
                  <tokenised>false</tokenised>
               </index>
            </property>
            ….

in userModel.xml. You would have to copy this to extensions, fix this up, and change the hibernate configuration to load the fixed up version. Then you would need to delete and rebuild the user index in ALF_HOME\lucene-indexes\user\alfrescoUserStore.

Follow http://issues.alfresco.com/browse/AWC-1157 for the resolution.

There was a similar issue in the forums with the admin used not able to log in using German.

Cheers

Andy

miguel_gil_mart
Champ in-the-making
Champ in-the-making
I can not find usermodel.xml. Do I have to create it and copy and paste next code?. How do I change the hibernate configuration to load the fixed up version?
Thanks.


<property name="usr:authorityName">
<type>d:text</type>
<index enabled="true">
<atomic>true</atomic>
<stored>false</stored>
<tokenised>false</tokenised>
</index>
</property>

andy
Champ on-the-rise
Champ on-the-rise
Hi

I am looking at this at the moment. Unfortunately, it is not so simple as fixing the indexing settings as it will still be indexed as text (along with some locale information). I will test if converting this to type d:any as well as setting the  index properties sorts the problem.

For tomcat you can try fixing the version in the expanded WEB-INF dir.

..\apache-tomcat-5.5.16\webapps\alfresco\WEB-INF\classes\org\alfresco\repo\security\authentication\userModel.xml

from

projects\repository\source\java\org\alfresco\repo\security\authentication\userModel.xml


It would be better to change the hibernate config by over ridding the model defintion in core-service-context.xml



   <bean id="dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="resourceBundles">
        <property name="models">
            <list>
                <!– System models  –>
                <value>alfresco/model/dictionaryModel.xml</value>
                <value>alfresco/model/systemModel.xml</value>
                <value>org/alfresco/repo/security/authentication/userModel.xml</value>

                <!– Content models –>
                <value>alfresco/model/contentModel.xml</value>
                <value>alfresco/model/bpmModel.xml</value>
                <value>alfresco/model/wcmModel.xml</value>
                <value>alfresco/model/forumModel.xml</value>

                <!– Content models –>
                <value>alfresco/model/applicationModel.xml</value>
                <value>alfresco/model/wcmAppModel.xml</value>
               
                <!– Implementation models –>
                <value>org/alfresco/repo/action/actionModel.xml</value>
                <value>org/alfresco/repo/rule/ruleModel.xml</value>
                <value>org/alfresco/repo/version/version_model.xml</value>
               
                <!– Deprecated types –>
                <value>alfresco/model/deprecated/deprecated_contentModel.xml</value>
            </list>
        </property>
        <property name="labels">
            <list>
                <value>alfresco/model/dataTypeAnalyzers</value>
                <value>alfresco/messages/system-model</value>
                <value>alfresco/messages/dictionary-model</value>
                <value>alfresco/messages/content-model</value>
                <value>alfresco/messages/bpm-messages</value>
                <value>alfresco/messages/application-model</value>
                <value>alfresco/messages/forum-model</value>
            </list>
        </property>
    </bean>


Try changing the model to:




           ….
            <property name="usr:authorityName">
               <type>d:any</type>
               <index enabled="true">
                  <atomic>true</atomic>
                  <stored>false</stored>
                  <tokenised>false</tokenised>
               </index>
            </property>
            ….


Let us know how you get on.

Andy

miguel_gil_mart
Champ in-the-making
Champ in-the-making
It worked!!!!
I just rebuild indexes and all groups appeared
I put index.recovery.mode=FULL in repository.properties and restarted Alfresco.
In alfresco.log I can see:

15:40:02,172 INFO  [org.alfresco.repo.node.index.FullIndexRecoveryComponent] Index recovery started: 966 transactions.
15:42:43,681 INFO  [org.alfresco.repo.node.index.FullIndexRecoveryComponent]    10 % complete.
15:50:05,101 INFO  [org.alfresco.repo.node.index.FullIndexRecoveryComponent]    20 % complete.
15:52:11,702 INFO  [org.alfresco.repo.node.index.FullIndexRecoveryComponent]    30 % complete.
15:53:20,007 INFO  [org.alfresco.repo.node.index.FullIndexRecoveryComponent]    40 % complete.
15:54:02,016 INFO  [org.alfresco.repo.node.index.FullIndexRecoveryComponent]    50 % complete.
15:54:07,298 INFO  [org.alfresco.repo.node.index.FullIndexRecoveryComponent]    60 % complete.
15:54:11,035 INFO  [org.alfresco.repo.node.index.FullIndexRecoveryComponent]    70 % complete.
15:54:16,462 INFO  [org.alfresco.repo.node.index.FullIndexRecoveryComponent]    80 % complete.
15:55:32,464 INFO  [org.alfresco.repo.node.index.FullIndexRecoveryComponent]    90 % complete.
15:55:37,500 INFO  [org.alfresco.repo.node.index.FullIndexRecoveryComponent]    100 % complete.
15:55:37,502 INFO  [org.alfresco.repo.node.index.FullIndexRecoveryComponent] Index recovery completed.

Smiley Very Happy  Smiley Very Happy

Maybe rebuilding indexes often is a good idea to maintain Alfresco fast, clean and sharp.

andy
Champ on-the-rise
Champ on-the-rise
Hi

Thanks for reporting your success.

Apologies for making you the test monkey for my best guess.

There is normally no reason to rebuild indexes. In this case there was a bug in the tokenisation of group names that could be fixed by changing the model  and rebuilding the index.

In later versions this will be fixed (not by the model change so you can not break it …) and includes a patch to reindex only thoses items in the index that require it. 

Cheers

Andy

miguel_gil_mart
Champ in-the-making
Champ in-the-making
Hello again!!!
andreasg asked me for explain how to fix group problem. My instalation directory is /opt/Alfresco

1.- Stop Alfresco service
/opt/Alfresco/alf_stop.sh
2.- Delete /opt/Alfresco/alf_data/lucene-indexes directory and files within
rm -Rf /opt/Alfresco/alf_data/lucene-indexes
Perhaps you have configured Alfresco to store alf_data in other location. Then, search and delete lucene-indexes.
3.- Edit /opt/Alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/repository.properties
and set index.recovery.mode=FULL . You can use custom-repository.properties too, but I did not test it.
4.- Restart Alfresco.
5.- You can print alfresco.log to see progress.

Do not forget to reset index.recovery.mode=VALIDATE when everything works right.

useeliger
Champ in-the-making
Champ in-the-making
Hi,

I now have the same problem. But I have some questions:

- Do I have to create a userModel.xml? If yes where should it be?
- Where can I find the hibernate config file
- Do I have to change both?

Just rebuliding the index did not solved the problem.

Kind Regards
Uwe