Solace JmsListener Message conversion Exception

akg17 Member Posts: 76

The original message is Text Message only, it was working previously recently ran into this issue.

org.springframework.jms.listener.adapter.ListenerExecutionFailedException: Listener method could not be invoked with incoming message
2022-01-04T12:16:54.220+05:30 [APP/PROC/WEB/0] [OUT] Endpoint handler details:
2022-01-04T12:16:54.220+05:30 [APP/PROC/WEB/0] [OUT] Method [public void com.test.gateway.Listener.receiveMessage(javax.jms.TextMessage)]

Caused by: org.springframework.messaging.converter.MessageConversionException: Cannot convert from [[B] to [javax.jms.TextMessage] for org.springframework.jms.listener.adapter.AbstractAdaptableMessageListener$MessagingMessageConverterAdapter$LazyResolutionMessage@13a254b3

@JmsListener(destination = "TestQueue")
void receiveMessage(TextMessage textMessage ){ }

The project also uses spring cloud stream but this is separate microservice and none of the queue are related to SCS. all the listener consumes message from solace queue using jmsListener.


  • Aaron
    Aaron Member, Administrator, Moderator, Employee Posts: 541 admin

    Without looking too deeply into this, one thought is to check your connection factory settings, and see if the (default) option of "send TextMessage using XML payload" is set to true. This might be causing your issue?

    # show jndi connection-factory cf1 detail
    Connection Factory : cf1
    Message VPN : default
      messaging-properties : 6
        default-delivery-mode        : persistent
        text-msg-xml-payload         : true             <----
        default-dmq-eligible         : false
        default-eliding-eligible     : false
        xa                           : false
        jmsx-user-id-enabled         : false

    Are you using the most recent version of the Solace binder? I thought there might have been a fix for this recently..?