Error after set org.kie.server.bypass.auth.user to true

Latest response

After set the property , when trying to start process i am getting the following error
http://localhost:8080/kie-server/services/rest/server/containers/testCon/tasks/10/states/started'! Error code: 500, message: Unexpected error during processing: id to load is required for loading.

Below are code how i start the process:

String serverUrl = "http://localhost:8080/kie-server/services/rest/server";
String user = "Administrator";
String password = "test";
KieServicesConfiguration configuration = KieServicesFactory.newRestConfiguration(serverUrl, user, password);
KieServicesClient client = KieServicesFactory.newKieServicesClient(configuration);

UserTaskServicesClient taskClient = client.getServicesClient(UserTaskServicesClient.class);
taskClient.startTask("testCon", 10L, "test");

Anyone know why the error is happening.

Pie Apple's picture


The error is happening because the user you send with the "startClient" method is not added to the REST QueryParam (i.e. "?user=test") if you haven't set the "org.kie.server.bypass.auth.user" System Property to "true" in your client. To fix this, add a SystemProperty "org.kie.server.bypass.auth.user=true" to your client. For example using a "-D" command line param in Java, or using "System.setProperty(KieServerConstants.CFG_BYPASS_AUTH_USER, "true");" in your client code.

Was this helpful?

We appreciate your feedback. Leave a comment if you would like to provide more detail.
It looks like we have some work to do. Leave a comment to let us know how we could improve.

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.