# S03040 {#s03040}

## Error Code {#error_code .section}

S03040

## Error Message {#error_message .section}

`Failed to deserialize events due to incompatible event schema. Expected: <xxx>. Actual: <xxx>. RefId: S03040`

## Probable Causes {#probable_causes .section}

The CEP engine deserializes byte streams based on a defined `eventSchema`. This error occurs when the `eventSchema` used in serialization does not match the `eventSchema` defined in the CEP engine.

## Solutions {#solutions .section}

Ensure the event type used matches the `eventSchema` defined in the CEP engine.

**Parent topic:**[Error Code Reference](../../Troubleshooting/ErrorCode.md)

