AnsweredAssumed Answered

[résolu] Erreur AlfrescoRuntimeException: Not impl

Question asked by ptitmat on Jul 22, 2009
Latest reply on Jul 24, 2009 by ptitmat
Bonjour,

Voilà j'ai la fonction suivante.


public static String getFisrtName(String userName)
   {   
      NodeService nodeService = Repository.getServiceRegistry(FacesContext.getCurrentInstance()).getNodeService();
      PersonService personService = Repository.getServiceRegistry(FacesContext.getCurrentInstance()).getPersonService();
      
               String userFirst = null;

      try {
         System.out.println("affichage de userName " + userName);

         System.out.println("on plante ici");
         
                       NodeRef nodeRef = personService.getPerson(userName);
         
         userFirst = (String)nodeService.getProperty(nodeRef, ContentModel.PROP_FIRSTNAME);
         

      } catch (Exception e) {
         logger.error(e.getMessage());
      }

      return userFirst;
   }

Lorsque je rentre dans le try ma fonction plante au niveau de la création du nodeRef et plus précisémment lors de l'appel à personService.getPerson(userName)

Et j'obtiens l'erreur suivante.

org.alfresco.error.AlfrescoRuntimeException: Not implemented
        at org.alfresco.repo.security.authentication.ntlm.NullMutableAuthenticationDao.loadUserByUsername(NullMutableAuthenticationDao.java:316)
        at net.sf.acegisecurity.providers.dao.DaoAuthenticationProvider.getUserFromBackend(DaoAuthenticationProvider.java:390)
        at net.sf.acegisecurity.providers.dao.DaoAuthenticationProvider.authenticate(DaoAuthenticationProvider.java:225)
        at net.sf.acegisecurity.providers.ProviderManager.doAuthentication(ProviderManager.java:159)
        at net.sf.acegisecurity.AbstractAuthenticationManager.authenticate(AbstractAuthenticationManager.java:49)
        at net.sf.acegisecurity.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:372)
        at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:77)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
        at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
        at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:238)
        at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
        at $Proxy47.isMutable(Unknown Source)
        at org.alfresco.community.utility.document.UserUtil.getFisrtName(UserUtil.java:124)
        at org.alfresco.community.repo.workflow.jbpm.Notify.replaceVars(Notify.java:449)
        at org.alfresco.community.repo.workflow.jbpm.Notify.notifyUsers(Notify.java:403)
        at org.alfresco.community.repo.workflow.jbpm.Notify.execute(Notify.java:276)
        at org.jbpm.graph.def.Action.execute(Action.java:122)
        at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:247)
        at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:215)
        at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:185)
        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:585)
        at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:147)
        at org.jbpm.graph.node.TaskNode$$EnhancerByCGLIB$$78a2aa19.fireAndPropagateEvent(<generated>)
        at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:198)
        at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:169)
        at org.jbpm.taskmgmt.exe.TaskInstance.setActorId(TaskInstance.java:289)
        at org.jbpm.taskmgmt.exe.TaskInstance.setActorId(TaskInstance.java:263)
        at org.jbpm.taskmgmt.exe.TaskInstance.copySwimlaneInstanceAssignment(TaskInstance.java:239)
        at org.jbpm.taskmgmt.exe.TaskInstance.assign(TaskInstance.java:195)
        at org.jbpm.taskmgmt.exe.TaskMgmtInstance.createTaskInstance(TaskMgmtInstance.java:153)
        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:585)
        at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:147)
        at org.jbpm.taskmgmt.exe.TaskMgmtInstance$$EnhancerByCGLIB$$9431dd05.createTaskInstance(<generated>)
        at org.jbpm.graph.node.TaskNode.execute(TaskNode.java:168)
        at org.jbpm.graph.def.Node.enter(Node.java:318)
        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:585)
        at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:147)
        at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$3e5cb3cf.enter(<generated>)
        at org.jbpm.graph.def.Transition.take(Transition.java:151)
        at org.jbpm.graph.def.Node.leave(Node.java:393)
        at org.jbpm.graph.def.Node.leave(Node.java:357)
        at org.jbpm.graph.def.Node.execute(Node.java:349)
        at org.jbpm.graph.def.Node.enter(Node.java:318)
        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:585)
        at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:147)
        at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$3e5cb3cf.enter(<generated>)
        at org.jbpm.graph.def.Transition.take(Transition.java:151)
        at org.jbpm.graph.def.Node.leave(Node.java:393)
        at org.jbpm.graph.node.StartState.leave(StartState.java:70)
        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:585)
        at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:147)
        at org.jbpm.graph.node.StartState$$EnhancerByCGLIB$$855c5101.leave(<generated>)
        at org.jbpm.graph.exe.Token.signal(Token.java:194)
        at org.jbpm.graph.exe.Token.signal(Token.java:139)
        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:585)
        at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:147)
        at org.jbpm.graph.exe.Token$$EnhancerByCGLIB$$eaeb5a63.signal(<generated>)
        at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:475)
        at org.alfresco.repo.workflow.jbpm.WorkflowTaskInstance.end(WorkflowTaskInstance.java:126)
        at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:389)
        at org.alfresco.repo.workflow.jbpm.JBPMEngine$25.doInJbpm(JBPMEngine.java:1512)
        at org.springmodules.workflow.jbpm31.JbpmTemplate$1.doInHibernate(JbpmTemplate.java:87)
        at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:367)
        at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:333)
        at org.springmodules.workflow.jbpm31.JbpmTemplate.execute(JbpmTemplate.java:80)
        at org.alfresco.repo.workflow.jbpm.JBPMEngine.endTask(JBPMEngine.java:1489)
        at org.alfresco.repo.workflow.WorkflowServiceImpl.endTask(WorkflowServiceImpl.java:444)
        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:585)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
        at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:40)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
        at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
        at org.alfresco.repo.audit.AuditComponentImpl.auditImpl(AuditComponentImpl.java:256)
        at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:191)
        at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
        at $Proxy43.endTask(Unknown Source)
        at org.alfresco.community.web.bean.workflow.StartCustomWorkflowBean.start(StartCustomWorkflowBean.java:510)
        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:585)
        at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
        at javax.faces.component.UICommand.broadcast(UICommand.java:89)
        at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
        at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
        at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
        at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)

J'ai vu dans le wiki ces quelques lignes

Having reconfigured Alfresco v2.0 to use NTLM authentication, should login attempts fail, and an exception such as

Caused by: org.alfresco.error.AlfrescoRuntimeException: Not implemented
        at org.alfresco.repo.security.authentication.ntlm.NullMutableAuthenticationDao.loadUserByUsername(NullMutableAuthenticationDao.java:316)
        at net.sf.acegisecurity.providers.dao.DaoAuthenticationProvider.getUserFromBackend(DaoAuthenticationProvider.java:390)
        at net.sf.acegisecurity.providers.dao.DaoAuthenticationProvider.authenticate(DaoAuthenticationProvider.java:225)

…appear then change the bean id attribute from 'authenticationComponentImpl' to 'authenticationComponent'.


La page complète à l'adresse suivante : http://wiki.alfresco.com/wiki/Configuring_NTLM

Mes questions sont les suivantes :
    Est ce que quelqu'un à déjà rencontré ce problème
    Si je modifie l'attribut du bean pour mettre authenticationComponentImpl à la place de  authenticationComponent, quels sont les fichiers à modifier ( je pense à celui-ci ntlm-authentication-context.xml mais est ce qu'il y en  a d'autres ??? )
Ptitmat

pour information voici la description du bean
<bean id="authenticationComponent"
  class="org.alfresco.repo.security.authentication.ntlm.NTLMAuthenticationComponentImpl">

Outcomes