MalformedResponseException when using @Deployment (Spring Boot + Zeebe): Expected problem body but got DeploymentResult with nulls

Hi all,

I’m running into a startup failure after adding the @Deployment annotation to auto-deploy BPMN/DMN/Form resources.

Repo (minimal sample):
< GitHub - Mkknowledge/order-zeebe-client >

@SpringBootApplication
@Deployment(resources = {"classpath*:*.bpmn", "classpath*:*.dmn", "classpath*:*.form"})
public class OrderZeebeClientApplication {

	public static void main(String[] args) {
		SpringApplication.run(OrderZeebeClientApplication.class, args);
	}

}

Error:

org.springframework.context.ApplicationContextException: Failed to start bean ‘camundaLifecycleEventProducer’
at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:423) ~[spring-context-7.0.2.jar:7.0.2]
at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:409) ~[spring-context-7.0.2.jar:7.0.2]
at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:613) ~[spring-context-7.0.2.jar:7.0.2]
at java.base/java.lang.Iterable.forEach(Iterable.java:75) ~[na:na]
at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:379) ~[spring-context-7.0.2.jar:7.0.2]
at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:306) ~[spring-context-7.0.2.jar:7.0.2]
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:1012) ~[spring-context-7.0.2.jar:7.0.2]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:623) ~[spring-context-7.0.2.jar:7.0.2]
at org.springframework.boot.web.server.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143) ~[spring-boot-web-server-4.0.1.jar:4.0.1]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:756) ~[spring-boot-4.0.1.jar:4.0.1]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:445) ~[spring-boot-4.0.1.jar:4.0.1]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:321) ~[spring-boot-4.0.1.jar:4.0.1]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1365) ~[spring-boot-4.0.1.jar:4.0.1]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354) ~[spring-boot-4.0.1.jar:4.0.1]
at com.mkknowledge.order.OrderZeebeClientApplication.main(OrderZeebeClientApplication.java:13) ~[classes/:na]
Caused by: io.camunda.client.api.command.MalformedResponseException: Expected to receive a problem body, but got an actual response: class DeploymentResult {
tenantId: null
deploymentKey: null
deployments:
}

Question:

What changes do I need to make in my Spring Boot + Camunda Zeebe application to resolve the MalformedResponseException when using the @Deployment annotation?

Thanks!
Any guidance, best practices, are much appreciated.

Hi @Mkknowledge,

This MalformedResponseException you’re encountering is a known issue related to REST vs gRPC client compatibility, particularly documented in the Camunda 8.8 release notes.

Root Cause

The error occurs when the Zeebe Java client is configured to use REST over gRPC but there’s a version mismatch that causes the client to incorrectly parse successful responses as error responses. The client expects a “problem body” (error response) but receives a normal DeploymentResult success response, leading to the parsing failure.

Solution

Based on the official documentation, here are the steps to resolve this:

1. Update Your Client Version

If you’re using:

  • Zeebe Java Client ≤ 8.7.15, or
  • Spring Zeebe SDK ≤ 8.7.15

Update to at least version 8.7.16 to fix the REST client compatibility issues.

2. Disable REST-over-gRPC (Temporary Fix)

If you can’t immediately update, disable the REST preference in your configuration:

# In application.properties
camunda.client.prefer-rest-over-grpc=false

Or if using YAML:

camunda:
  client:
    prefer-rest-over-grpc: false

This forces the client to use pure gRPC, which should avoid the parsing issue.

3. Verify Tenant Configuration

After fixing the client issue, ensure your tenant configuration is correct:

# If multi-tenancy is disabled, leave blank or use <default>
camunda.client.tenant-id=

# If multi-tenancy is enabled, provide a valid tenant ID
# camunda.client.tenant-id=your-tenant-id

The @Deployment annotation uses the configured camunda.client.tenant-id for resource deployment as documented here.

Additional Notes

  • The null values for tenantId and deploymentKey in your error are likely just artifacts of the failed response parsing, not the root cause
  • This is specifically a client-side parsing issue, not a problem with your BPMN/DMN/Form resources
  • The issue is most commonly seen when connecting to Camunda 8.8+ clusters with older client versions

Try updating your Spring Zeebe dependency first, and if that’s not immediately possible, disable the REST preference as a workaround.

Let me know if you need help identifying your current client version or if the issue persists after these changes!

Updating c8run to the same version resolved the issue. Once both components were aligned, everything started working correctly.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.