RESTUser has not been set up

1
0
-1

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)

when trying to try this tutorial http://community.bonitasoft.com/blog/how-use-bonita-http-api

can any one help me ?

Comments

Submitted by haris.subasic on Thu, 08/14/2014 - 17:36

Have you correctly specified the username in your jaas configuration on the server and on the client side?

Submitted by issam.saidi on Fri, 08/15/2014 - 09:34

For the client side it is ok this is my jaas configuration

BonitaAuth {
  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 ?

Submitted by haris.subasic on Mon, 08/18/2014 - 09:25

Server side configuration is described in the article, as well. Bonita RESTServer should be configured on the server side.

2 answers

1
0
-1

Thank you,

I fixed that problem since friday,

Now, I have this error when try to create and deploy a process from my java client

Exception in thread "main" org.jboss.resteasy.client.ClientResponseFailure: Error status 401 Unauthorized returned

I posted a question in this forum,

Have you any idea ?

1
0
-1

Hello,

your JAAS file is not well configured at client side. Note that you have:

BonitaStore {
org.ow2.bonita.identity.auth.LocalStorageLoginModule required;
};

instead of:

BonitaStore {
org.ow2.bonita.identity.auth.BonitaRESTLoginModule required restUser="restuser" restPassword="restbpm";
};

Regards, Elias

Notifications