Using rest connector response not store in variable


I am trying to use the REST connector in Camunda Zeebe. I took an example of a REST template from Camunda’s website and tried to run it on my local machine, but it didn’t give me a response. I also tried to store the REST API data in a response and body, but it didn’t work. For demo purposes, I am using a simple monitor and I tried to use an HTTP worker, which works, but the REST template doesn’t work. Please help me to solve this.

Hi @sinugaud,
The REST connector is a specific component that needs to be deployed in addition to Camunda 8/Zeebe. Loading the element template is not enough. You can find more information about Camunda’s connectors in our documentation and on Github:

Have you installed the REST connector?

Yes, I added an element template in my modeler, and it is showing a REST connector within the section of the template.
If that anything i have to do?

Yes, in the self-managed setup you have to deploy the rest connector. Which deployment option are you using (Helm/Docker/manual)?

For Docker:

I just try to setup manualy i am unable to run this cammand can you help be out

" java -cp ‘spring-zeebe-connector-runtime-8.1.17.jar:connector-http-json-0.16.1.jar’ \io.camunda.connector.runtime.ConnectorRuntimeApplication"

i download these dependency from these link

  1. Maven Central: io.camunda.connector:connector-http-json:0.16.1
    2.Central Repository: io/camunda/spring-zeebe-connector-runtime/8.1.17

When i try to run cammand it showing me error like ClassNotFound

Can you provide more information? Which class is missing?

Hey I just found other jar with dependency so try with also
here is my exception

java -cp ‘spring-zeebe-connector-runtime-8.1.8-20221130.131540-3-with-dependencies.jar;connector-http-json-0.14.3-20230110.164311-36-with-dependencies.jar’ / io.camunda.connector.runtime.ConnectorRuntimeApplication

Error: Could not find or load main class io.camunda.connector.runtime.ConnectorRuntimeApplication
Caused by: java.lang.ClassNotFoundException: io.camunda.connector.runtime.ConnectorRuntimeApplication

Have you tried the following command:

java -cp 'spring-zeebe-connector-runtime-8.1.8-20221130.131540-3-with-dependencies.jar;connector-http-json-0.14.3-20230110.164311-36-with-dependencies.jar' -jar spring-zeebe-connector-runtime-8.1.8-20221130.131540-3-with-dependencies.jar

Is it working for you?

I’m running the following command, since I’m using the latest stable releases of the connectors and the connectors’ framework. This one works for me:

java -cp '.\connector-http-json-0.16.1.jar;.\spring-zeebe-connector-runtime-8.1.17-with-dependencies.jar' io.camunda.connector.runtime.ConnectorRuntimeApplication

I just try that command that also worked but they give me some error how i can fix this have you any idea

org.springframework.context.ApplicationContextException: Failed to start bean ‘zeebeClientLifecycle’; nested exception is java.util.ServiceConfigurationError: io.camunda.connector.api.outbound.OutboundConnectorFunction: io.camunda.connector.http.HttpJsonFunction Unable to get public no-arg constructor

Caused by: java.lang.NoClassDefFoundError: com/google/api/client/http/HttpRequestFactory

2023-03-04 14:49:56.781 WARN 7820 — [ault-executor-1] io.camunda.zeebe.client.job.poller : Failed to activate jobs for worker HTTPJSON and job type io.camunda:http-json:1

have you set up the environment variables for your zeebe cluster? The connectors run-time needs this information:

Thank you for your support.

I successfully ran the connectors on my machine. However, there were some SSL certificate issues in the jar file, so I built another jar file for the runtime connector, and it worked for me.

Thank you again.

1 Like