flowable/flowable-engine · error · FlowableException

Could not get body information

Error message

Could not get body information

What it means

JmsMessageInboundEvent.convertEventToString() returns the text payload for TextMessage instances. A JMSException while calling getText() is wrapped in a FlowableException with this message (note: the cause is not attached). It means the JMS provider failed while reading the message body.

Solutions

  1. Check JMS connection/session health; reprocess the event from the broker with a fresh consumer.
  2. Ensure body extraction happens inside the message listener callback while the session is alive.
  3. Catch FlowableException around getBody() and fall back to message.toString() or a retry path.
  4. Investigate the JMS provider logs for the underlying connection failure.

Example fix

// before
String body = event.getBody();

// after
String body;
try {
    body = event.getBody();
} catch (FlowableException e) {
    body = null; // schedule redelivery from the queue
    retryQueue.offer(event);
}
Defensive patterns

Strategy: try-catch

Try / catch

try {
    String body = event.getBody();
} catch (FlowableException e) {
    // no cause attached; treat as JMS read failure and redeliver
    retryService.scheduleRedelivery(event);
}

Prevention

When it happens

Trigger: Calling getBody() on a JmsMessageInboundEvent wrapping a TextMessage whose getText() throws JMSException — typically due to a broken/closed JMS connection or an invalid message handle.

Common situations: Reading the body after session closure or connection failure; broker timeouts during message consumption; using messages outside their valid session context.

Related errors


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/c071a4c5a28cc467. Report an issue: GitHub.

Appendix: source

Thrown at modules/flowable-event-registry-spring/src/main/java/org/flowable/eventregistry/spring/jms/JmsMessageInboundEvent.java:78

            Enumeration<String> headerNames = message.getPropertyNames();
            while (headerNames.hasMoreElements()) {
                String headerName = headerNames.nextElement();
                headers.put(headerName, message.getObjectProperty(headerName));
            }

            return headers;

        } catch (JMSException e) {
            throw new FlowableException("Could not get header information", e);
        }
    }

    protected String convertEventToString() {
        if (message instanceof TextMessage) {
            try {
                return ((TextMessage) message).getText();
            } catch (JMSException e) {
                throw new FlowableException("Could not get body information");
            }
        } else {
            return message.toString();
        }
    }

    @Override
    public String toString() {
        return "JmsMessageInboundEvent{" +
                "message=" + message +
                ", headers=" + headers +
                '}';
    }
}

View on GitHub (pinned to d6d39ce1c6)