I am trying to connect to self managed camunda(helm chart 10.2.0) tasklist from a spring boot application. But it is throwing below exception on startup
Caused by: io.camunda.identity.sdk.impl.rest.exception.RestException: request failed with status code '404' and body '{"error":"Unable to find matching target resource method"}'
at io.camunda.identity.sdk.impl.rest.RestClient.send(RestClient.java:123) ~[identity-sdk-8.5.2.jar:8.5.2]
at io.camunda.identity.sdk.impl.rest.RestClient.request(RestClient.java:105) ~[identity-sdk-8.5.2.jar:8.5.2]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'camundaTaskListClient' defined in class path resource [com/example/camunda8sample/config/TaskListConfig.class]: Failed to instantiate [io.camunda.tasklist.CamundaTaskListClient]: Factory method 'camundaTaskListClient' threw exception with message: request failed with status code '404' and body '{"error":"Unable to find matching target resource method"}'
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:648) ~[spring-beans-6.1.12.jar:6.1.12]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:485) ~[spring-beans-6.1.12.jar:6.1.12]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1355) ~[spring-beans-6.1.12.jar:6.1.12]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1185) ~[spring-beans-6.1.12.jar:6.1.12]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:562) ~[spring-beans-6.1.12.jar:6.1.12]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522) ~[spring-beans-6.1.12.jar:6.1.12]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:337) ~[spring-beans-6.1.12.jar:6.1.12]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.1.12.jar:6.1.12]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:335) ~[spring-beans-6.1.12.jar:6.1.12]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[spring-beans-6.1.12.jar:6.1.12]
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254) ~[spring-beans-6.1.12.jar:6.1.12]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1443) ~[spring-beans-6.1.12.jar:6.1.12]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1353) ~[spring-beans-6.1.12.jar:6.1.12]
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:904) ~[spring-beans-6.1.12.jar:6.1.12]
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:782) ~[spring-beans-6.1.12.jar:6.1.12]
... 33 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [io.camunda.tasklist.CamundaTaskListClient]: Factory method 'camundaTaskListClient' threw exception with message: request failed with status code '404' and body '{"error":"Unable to find matching target resource method"}'
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:178) ~[spring-beans-6.1.12.jar:6.1.12]
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:644) ~[spring-beans-6.1.12.jar:6.1.12]
... 47 common frames omitted
Caused by: io.camunda.identity.sdk.impl.rest.exception.RestException: request failed with status code '404' and body '{"error":"Unable to find matching target resource method"}'
at io.camunda.identity.sdk.impl.rest.RestClient.send(RestClient.java:123) ~[identity-sdk-8.5.1.jar:8.5.1]
at io.camunda.identity.sdk.impl.rest.RestClient.request(RestClient.java:105) ~[identity-sdk-8.5.1.jar:8.5.1]
at io.camunda.identity.sdk.impl.keycloak.KeycloakAuthentication.requestFreshToken(KeycloakAuthentication.java:91) ~[identity-sdk-8.5.1.jar:8.5.1]
at io.camunda.identity.sdk.authentication.AbstractAuthentication.requestToken(AbstractAuthentication.java:91) ~[identity-sdk-8.5.1.jar:8.5.1]
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[na:na]
at io.camunda.identity.sdk.annotation.AnnotationProcessor.lambda$apply$0(AnnotationProcessor.java:33) ~[identity-sdk-8.5.1.jar:8.5.1]
at jdk.proxy2/jdk.proxy2.$Proxy90.requestToken(Unknown Source) ~[na:na]
at io.camunda.common.auth.SelfManagedAuthentication.getIdentityToken(SelfManagedAuthentication.java:31) ~[java-common-8.5.3.jar:8.5.3]
at io.camunda.common.auth.SelfManagedAuthentication.generateToken(SelfManagedAuthentication.java:23) ~[java-common-8.5.3.jar:8.5.3]
at io.camunda.common.auth.JwtAuthentication.getTokenHeader(JwtAuthentication.java:30) ~[java-common-8.5.3.jar:8.5.3]
at io.camunda.tasklist.CamundaTaskListClient.authenticate(CamundaTaskListClient.java:532) ~[camunda-tasklist-client-java-8.5.3.6.jar:na]
at io.camunda.tasklist.CamundaTaskListClient.<init>(CamundaTaskListClient.java:65) ~[camunda-tasklist-client-java-8.5.3.6.jar:na]
at io.camunda.tasklist.CamundaTaskListClientBuilder.build(CamundaTaskListClientBuilder.java:76) ~[camunda-tasklist-client-java-8.5.3.6.jar:na]
at com.example.camunda8sample.config.TaskListConfig.camundaTaskListClient(TaskListConfig.java:66) ~[main/:na]
at com.example.camunda8sample.config.TaskListConfig$$SpringCGLIB$$0.CGLIB$camundaTaskListClient$0(<generated>) ~[main/:na]
at com.example.camunda8sample.config.TaskListConfig$$SpringCGLIB$$FastClass$$1.invoke(<generated>) ~[main/:na]
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:258) ~[spring-core-6.1.12.jar:6.1.12]
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:348) ~[spring-context-6.1.12.jar:6.1.12]
at com.example.camunda8sample.config.TaskListConfig$$SpringCGLIB$$0.camundaTaskListClient(<generated>) ~[main/:na]
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[na:na]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:146) ~[spring-beans-6.1.12.jar:6.1.12]
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [io.camunda.tasklist.CamundaTaskListClient]: Factory method 'camundaTaskListClient' threw exception with message: request failed with status code '404' and body '{"error":"Unable to find matching target resource method"}'
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:178) ~[spring-beans-6.1.12.jar:6.1.12]
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:644) ~[spring-beans-6.1.12.jar:6.1.12]
... 47 common frames omitted
Caused by: io.camunda.identity.sdk.impl.rest.exception.RestException: request failed with status code '404' and body '{"error":"Unable to find matching target resource method"}'
at io.camunda.identity.sdk.impl.rest.RestClient.send(RestClient.java:123) ~[identity-sdk-8.5.1.jar:8.5.1]
at io.camunda.identity.sdk.impl.rest.RestClient.request(RestClient.java:105) ~[identity-sdk-8.5.1.jar:8.5.1]
at io.camunda.identity.sdk.impl.keycloak.KeycloakAuthentication.requestFreshToken(KeycloakAuthentication.java:91) ~[identity-sdk-8.5.1.jar:8.5.1]
at io.camunda.identity.sdk.authentication.AbstractAuthentication.requestToken(AbstractAuthentication.java:91) ~[identity-sdk-8.5.1.jar:8.5.1]
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[na:na]
at io.camunda.identity.sdk.annotation.AnnotationProcessor.lambda$apply$0(AnnotationProcessor.java:33) ~[identity-sdk-8.5.1.jar:8.5.1]
at jdk.proxy2/jdk.proxy2.$Proxy90.requestToken(Unknown Source) ~[na:na]
at io.camunda.common.auth.SelfManagedAuthentication.getIdentityToken(SelfManagedAuthentication.java:31) ~[java-common-8.5.3.jar:8.5.3]
at io.camunda.common.auth.SelfManagedAuthentication.generateToken(SelfManagedAuthentication.java:23) ~[java-common-8.5.3.jar:8.5.3]
at io.camunda.common.auth.JwtAuthentication.getTokenHeader(JwtAuthentication.java:30) ~[java-common-8.5.3.jar:8.5.3]
at io.camunda.tasklist.CamundaTaskListClient.authenticate(CamundaTaskListClient.java:532) ~[camunda-tasklist-client-java-8.5.3.6.jar:na]
at io.camunda.tasklist.CamundaTaskListClient.<init>(CamundaTaskListClient.java:65) ~[camunda-tasklist-client-java-8.5.3.6.jar:na]
at io.camunda.tasklist.CamundaTaskListClientBuilder.build(CamundaTaskListClientBuilder.java:76) ~[camunda-tasklist-client-java-8.5.3.6.jar:na]
at com.example.camunda8sample.config.TaskListConfig.camundaTaskListClient(TaskListConfig.java:66) ~[main/:na]
at com.example.camunda8sample.config.TaskListConfig$$SpringCGLIB$$0.CGLIB$camundaTaskListClient$0(<generated>) ~[main/:na]
at com.example.camunda8sample.config.TaskListConfig$$SpringCGLIB$$FastClass$$1.invoke(<generated>) ~[main/:na]
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:258) ~[spring-core-6.1.12.jar:6.1.12]
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:348) ~[spring-context-6.1.12.jar:6.1.12]
at com.example.camunda8sample.config.TaskListConfig$$SpringCGLIB$$0.camundaTaskListClient(<generated>) ~[main/:na]
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[na:na]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:146) ~[spring-beans-6.1.12.jar:6.1.12]
... 48 common frames omitted
Even when i am trying to do the same from keycloak API to generate token for tasklist-api client which is already there token is generated but with that same token i am not able to access tasklist api from v1 swagger.
It seems that the keycloak url that you configure in the client is not correct, make sure to put the full realm url like http://{keycloak_host}/auth/realms/camunda-platform
Even when i am trying to do the same from keycloak API to generate token for tasklist-api client which is already there token is generated but with that same token i am not able to access tasklist api from v1 swagger.
Make sure that your client api (application) has access to tasklist api like it is explained in Incorporate applications | Camunda 8 Docs
You can also add the audience when you generate the token --data-urlencode 'audience=tasklist-api'
io.grpc.StatusRuntimeException: UNAUTHENTICATED: Expected bearer token at header with key [authorization], but found nothing
at io.grpc.Status.asRuntimeException(Status.java:533) ~[grpc-api-1.65.1.jar:1.65.1]
at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:481) ~[grpc-stub-1.65.1.jar:1.65.1]
at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:564) ~[grpc-core-1.65.1.jar:1.65.1]
at io.grpc.internal.ClientCallImpl.access$100(ClientCallImpl.java:72) ~[grpc-core-1.65.1.jar:1.65.1]
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:729) ~[grpc-core-1.65.1.jar:1.65.1]
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:710) ~[grpc-core-1.65.1.jar:1.65.1]
at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) ~[grpc-core-1.65.1.jar:1.65.1]
at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133) ~[grpc-core-1.65.1.jar:1.65.1]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[na:na]
at java.base/java.lang.Thread.run(Thread.java:1583) ~[na:na]
you should set these environment variables to your zeebe client
ZEEBE_CLIENT_ID
ZEEBE_CLIENT_SECRET
ZEEBE_TOKEN_AUDIENCE=zeebe-api
ZEEBE_AUTHORIZATION_SERVER_URL=keycloakBaseUrl + /auth/realms/camunda-platform/protocol/openid-connect/token
one more question i have, If we have integrated tasklist client in our service, the main purpose of integrating that is to handle and automate user tasks where we actually require some input from an external service, since tasklist has non production usage for free self managed camunda 8, will we able to automate the tasks in production with free plan, if not is there any other alternative for user task automation where we can wait in process to get inputs from an external service which calls a REST API in out service and resumes the camunda process ?