net.sf.acegisecurity.providers.ProviderNotFoundException: No authentication provider for net.sf.acegisecurity.providers.UsernamePasswordAuthenticationToken
at net.sf.acegisecurity.providers.ProviderManager.doAuthentication(ProviderManager.java:169)
at net.sf.acegisecurity.AbstractAuthenticationManager.authenticate(AbstractAuthenticationManager.java:49)
at net.sf.acegisecurity.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:376)
at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:77)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:46)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:159)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
…
import java.util.HashMap;
import java.util.Map;
import org.alfresco.repo.model.Repository;
import org.alfresco.service.ServiceRegistry;
import org.springframework.extensions.webscripts.Cache;
import org.springframework.extensions.webscripts.DeclarativeWebScript;
import org.springframework.extensions.webscripts.Status;
import org.springframework.extensions.webscripts.WebScriptRequest;
public class StockageTestV8_test extends DeclarativeWebScript
{
private boolean debug = true;
// injection spring
private Repository repository;
private ServiceRegistry serviceRegistry;
private String folderPathOut="";
private String parentFolderPathOut="";
/*
* les setters - getters
*/
public void setRepository(Repository repository)
{
this.repository=repository;
}
public void setServiceRegistry(ServiceRegistry serviceRegistry)
{
this.serviceRegistry=serviceRegistry;
}
public void setFolderPathOut(String folderPathOut)
{
this.folderPathOut=folderPathOut;
}
public void setParentFolderPathOut(String parentFolderPathOut)
{
this.parentFolderPathOut=parentFolderPathOut;
}
public Repository getRepository()
{
return this.repository;
}
public ServiceRegistry getServiceRegistry()
{
return this.serviceRegistry;
}
/*
* corps de la classe
*/
protected Map<String, Object> executeImpl(WebScriptRequest req,
Status status, Cache cache)
{
BaseParam_test baseParam=new BaseParam_test(req, debug,
repository,
serviceRegistry,
folderPathOut,
parentFolderPathOut
);
baseParam.traitParam(req);
Map<String, Object> model = new HashMap<String, Object>();
model.put("mess", "slt old boy");
if (debug) System.out.println("———– MainProc - fin ———– ");
return model;
}
}
import java.util.Map;
import org.alfresco.service.cmr.model.FileInfo;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.model.Repository;
import org.alfresco.service.ServiceRegistry;
import org.alfresco.service.cmr.repository.NodeRef;
import org.springframework.extensions.webscripts.WebScriptRequest;
public class BaseParam_test {
private Repository repository;
private ServiceRegistry serviceRegistry;
private String folderPathOut="";
private String parentFolderPathOut="";
private String verboseArg = null;
private Map<String, String> templateArgs = null;
private NodeRef node=null;
private String path = "";
/*
* les getters - setters
*/
public Repository getRepository()
{
return this.repository;
}
public ServiceRegistry getServiceRegistry()
{
return this.serviceRegistry;
}
/*
* Constructor
*/
public BaseParam_test(WebScriptRequest req, boolean debug,
Repository repository,
ServiceRegistry serviceRegistry,
String folderPathOut,
String parentFolderPathOut
) {
this.repository=repository;
this.serviceRegistry=serviceRegistry;
this.folderPathOut=folderPathOut;
this.parentFolderPathOut=parentFolderPathOut;
}
public boolean traitParam(WebScriptRequest req)
{
verboseArg = req.getParameter("verbose");
templateArgs = req.getServiceMatch().getTemplateVars();
NodeRef parentNode=null;
try {
parentNode = getRepository().findNodeRef("path",
("workspace/SpacesStore/" + parentFolderPathOut).split("/"));
} catch(Exception e) {
System.out.println("create folder - erreur parent inexistant " + parentFolderPathOut );
return true;
}
if (parentNode!=null)
{
FileInfo fi=null;
try {
fi = getServiceRegistry().getFileFolderService().create(parentNode,folderPathOut,ContentModel.TYPE_FOLDER);
} catch (Exception e) {
System.out.println("create folder - erreur sur create folder - " + folderPathOut);
return true;
}
System.out.println("create folder faite - nodeParent=" + parentNode
+ " - nodePath=" + folderPathOut + "___"
+ "\n name=" + fi.getName() + " - nodeRef=" +fi.getNodeRef() + " - properties=" +fi.getProperties()
);
}
return false;
}
}
Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.