RESTUser has not been set up
Hello,
I got this error
Exception in thread "main" java.lang.IllegalStateException: RESTUser has not been set up using setUser(String user)!Problem may be:
- you did not inform the REST user in the jass file (e.g. adding de option: restUser="restuser")
at org.ow2.bonita.identity.auth.RESTUserOwner.getUser(RESTUserOwner.java:49)
at org.ow2.bonita.facade.interceptor.ClientRemoteAPIInterceptor.invoke(ClientRemoteAPIInterceptor.java:69)
at com.sun.proxy.$Proxy21.deleteAllProcesses(Unknown Source)
at tn.simac.common.utils.bonita5.Client.main(Client.java:110)
- you did not inform the REST user in the jass file (e.g. adding de option: restUser="restuser")
at org.ow2.bonita.identity.auth.RESTUserOwner.getUser(RESTUserOwner.java:49)
at org.ow2.bonita.facade.interceptor.ClientRemoteAPIInterceptor.invoke(ClientRemoteAPIInterceptor.java:69)
at com.sun.proxy.$Proxy21.deleteAllProcesses(Unknown Source)
at tn.simac.common.utils.bonita5.Client.main(Client.java:110)
when trying to try this tutorial http://community.bonitasoft.com/blog/how-use-bonita-http-api
can any one help me ?
2 answers
Hello,
your JAAS file is not well configured at client side. Note that you have:
BonitaStore {
org.ow2.bonita.identity.auth.LocalStorageLoginModule required;
};
org.ow2.bonita.identity.auth.LocalStorageLoginModule required;
};
instead of:
BonitaStore {
org.ow2.bonita.identity.auth.BonitaRESTLoginModule required restUser="restuser" restPassword="restbpm";
};
org.ow2.bonita.identity.auth.BonitaRESTLoginModule required restUser="restuser" restPassword="restbpm";
};
Regards, Elias
Comments
Have you correctly specified the username in your jaas configuration on the server and on the client side?
For the client side it is ok this is my jaas configuration
org.ow2.bonita.identity.auth.BonitaIdentityLoginModule required;
};
BonitaStore {
org.ow2.bonita.identity.auth.LocalStorageLoginModule required;
};
BonitaAuth-default {
org.ow2.bonita.identity.auth.BonitaIdentityLoginModule required domain="default";
org.ow2.bonita.identity.auth.LocalStorageLoginModule required domain="default";
};
BonitaStore-default {
org.ow2.bonita.identity.auth.LocalStorageLoginModule required domain="default";
};
/**
* Used by the REST server
*/
BonitaRESTServer {
org.ow2.bonita.identity.auth.BonitaRESTServerLoginModule required logins="restuser" passwords="restbpm" roles="restuser";
};
But for the server side, tomcat here, how can I configure jaas ?
Server side configuration is described in the article, as well. Bonita RESTServer should be configured on the server side.