Hi,
I’m using below code in springboot application to authenticate zeebe and tasklist.
//zeebe authentication
return new ZeebeClientCloudBuilderImpl()
.withClusterId(credentials.getClusterId())
.withClientId(credentials.getClientId())
.withClientSecret(credentials.getClientSecret())
.withRegion(credentials.getRegion())
.build();
//tasklist authentication
JwtConfig jwtConfig = new JwtConfig();
jwtConfig.addProduct(Product.TASKLIST, new JwtCredential(credentials.getClientId(), credentials.getClientSecret(), "tasklist.camunda.io", "https://login.cloud.camunda.io/oauth/token"));
Authentication auth = SaaSAuthentication.builder()
.withJwtConfig(jwtConfig).build();
return CamundaTaskListClient.builder().shouldReturnVariables()
.taskListUrl(
"https://" + credentials.getRegion() + ".tasklist.camunda.io/" + credentials.getClusterId())
.authentication(auth).build();
Zeebe authentication is working fine and I’m able to start the process as well.
But when I’m using tasklist I’m getting this error
“Authenticating for TASKLIST failed due to java.lang.NullPointerException: Cannot invoke “io.camunda.common.json.JsonMapper.toJson(Object)” because “this.jsonMapper” is null”
Below is the dependency I’m using.
```
<dependency>
<groupId>io.camunda</groupId>
<artifactId>camunda-tasklist-client-java</artifactId>
<version>8.5.0</version>
</dependency>
<dependency>
<groupId>io.camunda</groupId>
<artifactId>zeebe-client-java</artifactId>
<version>8.5.0</version>
</dependency>
Thanks you for the help