Subclass of Camel DefaultContext in version 3.22.3 throws NPE as HeadersMapFactory is not initialized

5 days ago 5
ARTICLE AD BOX

Migrated existing Camel libraries version 2.25.4 in JBoss EAP 7.4 applications to Camel version 3.22.3. These applications use a subclass of DefaultCamelContext, which work fine in Camel 2.x, but throw a NPE in Camel 3.22.3 as HeadersMapFactory member is null. Explicitly adding setHeadersMapFactory(new DefaultHeadersMapFactory()) fixes the issue.

Would like to know why this step is needed?

Read Entire Article