{"record":{"id":"45c6ce6fc68e5294","repo":"flowable/flowable-engine","slug":"could-not-get-header-information","errorCode":null,"errorMessage":"Could not get header information","messagePattern":"Could not get header information","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-event-registry-spring/src/main/java/org/flowable/eventregistry/spring/jms/JmsMessageInboundEvent.java","lineNumber":69,"sourceCode":"            headers = retrieveHeaders();\n        }\n        return headers;\n    }\n\n    @SuppressWarnings(\"unchecked\")\n    protected Map<String, Object> retrieveHeaders() {\n        try {\n            Map<String, Object> headers = new HashMap<>();\n            Enumeration<String> headerNames = message.getPropertyNames();\n            while (headerNames.hasMoreElements()) {\n                String headerName = headerNames.nextElement();\n                headers.put(headerName, message.getObjectProperty(headerName));\n            }\n\n            return headers;\n\n        } catch (JMSException e) {\n            throw new FlowableException(\"Could not get header information\", e);\n        }\n    }\n\n    protected String convertEventToString() {\n        if (message instanceof TextMessage) {\n            try {\n                return ((TextMessage) message).getText();\n            } catch (JMSException e) {\n                throw new FlowableException(\"Could not get body information\");\n            }\n        } else {\n            return message.toString();\n        }\n    }\n\n    @Override\n    public String toString() {\n        return \"JmsMessageInboundEvent{\" +","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-event-registry-spring/src/main/java/org/flowable/eventregistry/spring/jms/JmsMessageInboundEvent.java#L51-L87","documentation":"JmsMessageInboundEvent.retrieveHeaders() iterates JMS message properties to build the event's header map. Any JMSException during property access is wrapped in a FlowableException with this message. It means the underlying JMS provider failed while reading the message's properties.","triggerScenarios":"Calling getHeaders() on a JmsMessageInboundEvent whose underlying javax.jms.Message throws JMSException in getObjectProperty — e.g. the message was consumed on a closed connection/session or the broker connection dropped mid-read.","commonSituations":"Broker connection lost before property retrieval; message read after session/transaction rollback; transient network issues with the JMS provider.","solutions":["Inspect the wrapped JMSException cause for the provider-level failure (connection, session, or message validity).","Reconnect/reacquire the message: reprocess the event from the source queue instead of reading from a stale message.","Ensure the message is processed within a live JMS session (do not cache messages across sessions).","Catch FlowableException around getHeaders() and route the event to an error/dead-letter path for retry."],"exampleFix":"// before\nMap<String, Object> headers = event.getHeaders();\n\n// after\ntry {\n    Map<String, Object> headers = event.getHeaders();\n} catch (FlowableException e) {\n    deadLetterChannel.send(event, e); // handle JMS failure, retry later\n}","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    Map<String, Object> headers = event.getHeaders();\n} catch (FlowableException e) {\n    // JMSException wrapped; re-read from a fresh consumer or dead-letter the event\n    errorHandler.handle(event, e.getCause());\n}","preventionTips":["Process events inside live JMS sessions only.","Monitor JMS connection health and reconnect promptly.","Route unreadable events to a dead-letter path for retry."],"tags":["jms","headers","exception-wrapping","event-registry"],"backgroundTag":"jms-read-failed","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}