spring-bootjmsspring-integrationoutbound

CWSIA0112E: The property name Keep-Alive is not a valid Java identifier


I see tonnes of logs for all header properties that have hyphen -

[30-5-18 17:13:14:321 CEST] 00001622 SystemOut O WARN [integration.jms.DefaultJmsHeaderMapper] failed to map Message header 'Keep-Alive' to JMS property javax.jms.MessageFormatException: CWSIA0112E: The property name Keep-Alive is not a valid Java identifier.

[30-5-18 17:13:14:321 CEST] 00001622 SystemOut O WARN [integration.jms.DefaultJmsHeaderMapper] failed to map Message header 'Transfer-Encoding' to JMS property javax.jms.MessageFormatException: CWSIA0112E: The property name Transfer-Encoding is not a valid Java identifier.

How can I resolve all these errors and warnings Does a custom header mapper help, any example? Using Spring boot 1.4.3 and integration version 4.3.6. Application running on websphere default JMS provider 8.5.x

Thanks


Solution

  • I believe that the error means that you can't use dash in the property name.

    You need to re-map this Keep-Alive into something like KeepAlive using HeaderEnricher and then remove it using HeaderFilter.