ProviderNotFoundException when calling Java WebScript

Showing results for 
Search instead for 
Did you mean: 
Established Member II

ProviderNotFoundException when calling Java WebScript

I want to get all the properties of the type cmSmiley Tongueerson and display it in the table. For this I have Java WebScript.

But when I call it I get an exception:

No authentication provider for net.sf.acegisecurity.providers.UsernamePasswordAuthenticationToken

In the web script I marked where the exception is thrown:

public class AssignmentsRetriever extends DeclarativeWebScript {
    Logger logger = Logger.getLogger(AssignmentsRetriever.class);

    private WorkflowService workflowService;
    private PersonService personService;
    private NodeService nodeService;

    protected Map<String, Object> executeImpl(WebScriptRequest req, Status status) {
        String taskId = req.getParameter("taskId");
        WorkflowTaskQuery tasksQuery = new WorkflowTaskQuery();
        WorkflowTask workflowTask = workflowService.getTaskById("activiti$"+taskId);
        List<WorkflowTask> allWfTasks =
               workflowService.queryTasks(tasksQuery, true);
          NodeRef personNodeRef;
          Map<QName, Serializable> personProperties;
          Iterator iterator;
        for (WorkflowTask task : allWfTasks) {
             logger.debug("processId == " +
             personNodeRef =
               // Here an exception is thrown
             logger.debug("cm:userName == " +
               // Here an exception is thrown
             personProperties = nodeService.getProperties(personNodeRef);                         
            iterator = personProperties.entrySet().iterator();
            while (iterator.hasNext()) {
                Map.Entry pairs = (Map.Entry);
                logger.debug(pairs.getKey() + " = " + pairs.getValue());

        return model;
    public WorkflowService getWorkflowService() {
        return workflowService;

    public void setWorkflowService(WorkflowService workflowService)
        this.workflowService = workflowService;
    public void setNodeService(NodeService nodeService) {
         this.nodeService = nodeService;
    public NodeService getNodeService() {
         return nodeService;
    public void setPersonService(PersonService personService) {
         this.personService = personService;
    public PersonService getPersonService() {
         return personService;

What could be the reason?

I would be very grateful for the information. Thanks to all.

3 Replies
Senior Member II

Re: ProviderNotFoundException when calling Java WebScript

Have you injected upper "NodeService" (rather than lower "nodeService") ?

Are you debugging in IntelliJ ?



Established Member II

Re: ProviderNotFoundException when calling Java WebScript

Thank you very much for your comment!.. I replaced all calls logger.debug(...) to System.out.println(...) and now everything works fine. But I do not understand why this exception is thrown when I add logging.

Here's my service-context.xml:

   <bean id="" class="com......scripts.AssignmentsRetriever" parent="webscript">
      <property name="workflowService">         
         <ref bean="WorkflowService" />    
      <property name="nodeService">         
         <ref bean="NodeService" />    
      <property name="personService">         
         <ref bean="PersonService" />    

No, I use Eclipse in my work, but I didn't debug in it.

Established Member

Re: ProviderNotFoundException when calling Java WebScript

Good point for Intellij in Debug mode. I put the breakpoints at another place in code and now the calls pass through...