cancel
Showing results for 
Search instead for 
Did you mean: 

Changing password

juanc82
Champ in-the-making
Champ in-the-making
Hi everyone

I've been using the library and it functions well but I tried to change the password from a user and it gave me the following error:


Fatal error: Uncaught exception 'Exception' with message 'An unidentified exception has occured.' in C:\Archivos de programa\xampp\htdocs\integracio\develop\lib\integracio\alfresco\alfresco\BaseService.php:59 Stack trace: #0 C:\Archivos de programa\xampp\htdocs\integracio\develop\lib\integracio\alfresco\alfresco\AdministrationService.php(128): BaseService->checkForError(Object(SOAP_Fault)) #1 C:\Archivos de programa\xampp\htdocs\integracio\develop\lib\integracio\alfresco\alfresco_webservice.php(136): AdministrationService->changePassword('test', 'test', 'testing') #2 C:\Archivos de programa\xampp\htdocs\integracio\develop\lib\integracio\alfresco\testing.php(71): alfresco_webservice->change_password('test', 'test', 'testing') #3 {main} thrown in C:\Archivos de programa\xampp\htdocs\integracio\develop\lib\integracio\alfresco\alfresco\BaseService.php on line 59

I know that the changePassword feature is not "directly"available in AdministrationService.php but it is in AdministrationWebService.php. I've simply made a new function in the former to call the one in the latter but it does not fuction.
 function changePassword($username, $oldPassword, $newPassword)
   {
      $this->addSecurityHeader();
      $result = $this->web_service->changePassword($userName, $oldPassword, $newPassword);
      $this->checkForError($result);
   }

eventhough I've done the same with deleteUsers and this one functions.
My environment is winxp-home, xampp v1.4.16, php v5.0.5 and alfresco 1.2

Any hints?



Thanks in advance for your help
1 REPLY 1

juanc82
Champ in-the-making
Champ in-the-making
Hi,

Yesterday I forgot to write the  debug information for this error.

Here it is:

11:17:08,609 DEBUG [org.alfresco.repo.webservice.authentication.AuthenticationWebService] Issued ticket 'TICKET_1de5afcb-ca05-11da-b2d1-df4d128aa6fe' for 'test'
11:17:08,625 DEBUG [org.alfresco.repo.webservice.axis.TicketCallbackHandler] Verifying ticket for: test
11:17:08,640 DEBUG [org.alfresco.repo.webservice.axis.TicketCallbackHandler] Ticket: TICKET_1de5afcb-ca05-11da-b2d1-df4d128aa6fe
11:17:08,921 DEBUG [org.alfresco.repo.webservice.axis.TicketCallbackHandler] Ticket validated successfully
11:17:08,921 DEBUG [org.alfresco.repo.webservice.axis.QueryConfigHandler] QueryHeader was not found for call to changePassword
11:17:08,921 ERROR [org.alfresco.repo.webservice.administration.AdministrationWebService] Unexpected error occurred
org.alfresco.repo.search.SearcherException: Failed to parse query: @usr\:username:
   at org.alfresco.repo.search.impl.lucene.LuceneSearcherImpl.query(LuceneSearcherImpl.java:263)
   at org.alfresco.repo.search.SearcherComponent.query(SearcherComponent.java:77)
   at org.alfresco.repo.security.authentication.RepositoryAuthenticationDao.getUserOrNull(RepositoryAuthenticationDao.java:142)
   at org.alfresco.repo.security.authentication.RepositoryAuthenticationDao.updateUser(RepositoryAuthenticationDao.java:227)
   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:335)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
   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 $Proxy9.updateUser(Unknown Source)
   at org.alfresco.repo.security.authentication.AuthenticationServiceImpl.updateAuthentication(AuthenticationServiceImpl.java:57)
   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: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:37)
   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 $Proxy22.updateAuthentication(Unknown Source)
   at org.alfresco.repo.webservice.administration.AdministrationWebService.changePasswordImpl(AdministrationWebService.java:473)
   at org.alfresco.repo.webservice.administration.AdministrationWebService.access$500(AdministrationWebService.java:52)
   at org.alfresco.repo.webservice.administration.AdministrationWebService$6.doWork(AdministrationWebService.java:447)
   at org.alfresco.repo.transaction.TransactionUtil.executeInTransaction(TransactionUtil.java:168)
   at org.alfresco.repo.transaction.TransactionUtil.executeInUserTransaction(TransactionUtil.java:74)
   at org.alfresco.repo.webservice.administration.AdministrationWebService.changePassword(AdministrationWebService.java:443)
   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.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
   at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
   at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
   at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
   at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
   at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
   at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453)
   at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
   at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
   at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
   at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
   at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
   at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
   at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
   at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
   at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
   at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
   at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
   at java.lang.Thread.run(Thread.java:595)
Caused by: org.alfresco.repo.search.impl.lucene.ParseException: Encountered "<EOF>" at line 1, column 15.
Was expecting one of:
    "(" …
    <QUOTED> …
    <TERM> …
    <PREFIXTERM> …
    <WILDTERM> …
    "[" …
    "{" …
    <NUMBER> …
   
   at org.alfresco.repo.search.impl.lucene.QueryParser.generateParseException(QueryParser.java:1164)
   at org.alfresco.repo.search.impl.lucene.QueryParser.jj_consume_token(QueryParser.java:1047)
   at org.alfresco.repo.search.impl.lucene.QueryParser.Clause(QueryParser.java:694)
   at org.alfresco.repo.search.impl.lucene.QueryParser.Query(QueryParser.java:619)
   at org.alfresco.repo.search.impl.lucene.QueryParser.parse(QueryParser.java:121)
   at org.alfresco.repo.search.impl.lucene.LuceneQueryParser.parse(LuceneQueryParser.java:76)
   at org.alfresco.repo.search.impl.lucene.LuceneSearcherImpl.query(LuceneSearcherImpl.java:219)
   … 78 more