07-14-2008 03:31 PM
serviceRegistry.getPersonService().getPerson(userName); however, I fail with a BadCredentialsException every time.
net.sf.acegisecurity.providers.dao.DaoAuthenticationProvider.authenticate(DaoAuthenticationProvider.java:290)
net.sf.acegisecurity.providers.ProviderManager.doAuthentication(ProviderManager.java:159)
net.sf.acegisecurity.AbstractAuthenticationManager.authenticate(AbstractAuthenticationManager.java:49)
net.sf.acegisecurity.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:372)
net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:77)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:245)
org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
$Proxy46.getPerson(Unknown Source)
com.sample.person.UpdateUser.execute(UpdateUser.java:65)
org.alfresco.web.scripts.WebScriptRuntime.wrappedExecute(WebScriptRuntime.java:364)
org.alfresco.web.scripts.WebScriptRuntime$1.execute(WebScriptRuntime.java:330)
org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:241)
org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:171)
org.alfresco.web.scripts.WebScriptRuntime.transactionedExecute(WebScriptRuntime.java:341)
org.alfresco.web.scripts.WebScriptRuntime.authenticatedExecute(WebScriptRuntime.java:284)
org.alfresco.web.scripts.WebScriptRuntime.executeScript(WebScriptRuntime.java:150)
org.alfresco.web.scripts.WebScriptServlet.service(WebScriptServlet.java:109)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
java.lang.Thread.run(Thread.java:595)
07-14-2008 03:36 PM
07-14-2008 06:32 PM
11-25-2008 05:36 AM
private void traiter(String pRef) {
NodeRef srcNode = new NodeRef(pRef);
NodeRef destNode = mscSearchService
.getStaticNodeRef(MscSearchService.FOLDER_TRAITER_NAME);
try
{
fileFolderService.move(srcNode, destNode, null);
} catch (Exception e)
{
throw new IllegalArgumentException(
"Traiter action failed. Error moving file: " + pRef);
}
StoreRef lStoreRef = new StoreRef(StoreRef.PROTOCOL_WORKSPACE,
"SpacesStore");
// plus efficace :
// +PATH:"/sys:system/sys:people/*"
// +@cm\:userName:"fantoni"
authenticationService.authenticate("admin", "admin".toCharArray());
System.out.println("searchService: " + searchService);
ResultSet lResultSet = searchService.query(lStoreRef,
SearchService.LANGUAGE_LUCENE, "@cm\\:userName:\"ffournel\"");
NodeRef person = lResultSet.getNodeRef(0);
NodeRef homeFolder = (NodeRef) nodeService.getProperty(person,
org.alfresco.model.ContentModel.PROP_HOMEFOLDER);
lResultSet = searchService.query(lStoreRef,
SearchService.LANGUAGE_LUCENE, "PATH:\"/app:company_home\"");
NodeRef companyHome = lResultSet.getNodeRef(0);
Map<String, Object> map = scriptService.buildDefaultModel(person,
companyHome, homeFolder, null, null, null);
System.out.println("person: " + person);
System.out.println("companyHome: " + companyHome);
System.out.println("homeFolder: " + homeFolder);
System.out.println("map: " + map);
scriptService.executeScript(
"classpath:alfresco/extension/scripts/msc-actions.js", map);
}
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.