Browse Source

MappingJackson2MessageConverter adds message id and destination to type resolution exception

Issue: SPR-14672
(cherry picked from commit ae2bbe7)
pull/1195/head
Juergen Hoeller 10 years ago
parent
commit
338a4a581e
  1. 6
      spring-jms/src/main/java/org/springframework/jms/support/converter/MappingJackson2MessageConverter.java

6
spring-jms/src/main/java/org/springframework/jms/support/converter/MappingJackson2MessageConverter.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -376,7 +376,9 @@ public class MappingJackson2MessageConverter implements MessageConverter, BeanCl @@ -376,7 +376,9 @@ public class MappingJackson2MessageConverter implements MessageConverter, BeanCl
protected JavaType getJavaTypeForMessage(Message message) throws JMSException {
String typeId = message.getStringProperty(this.typeIdPropertyName);
if (typeId == null) {
throw new MessageConversionException("Could not find type id property [" + this.typeIdPropertyName + "]");
throw new MessageConversionException(
"Could not find type id property [" + this.typeIdPropertyName + "] on message [" +
message.getJMSMessageID() + "] from destination [" + message.getJMSDestination() + "]");
}
Class<?> mappedClass = this.idClassMappings.get(typeId);
if (mappedClass != null) {

Loading…
Cancel
Save