From 338a4a581e919834362dff2a94f831f3df4b419b Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Sat, 10 Sep 2016 12:37:55 +0200 Subject: [PATCH] MappingJackson2MessageConverter adds message id and destination to type resolution exception Issue: SPR-14672 (cherry picked from commit ae2bbe7) --- .../support/converter/MappingJackson2MessageConverter.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/spring-jms/src/main/java/org/springframework/jms/support/converter/MappingJackson2MessageConverter.java b/spring-jms/src/main/java/org/springframework/jms/support/converter/MappingJackson2MessageConverter.java index b64abf2fce1..59c5b1472aa 100644 --- a/spring-jms/src/main/java/org/springframework/jms/support/converter/MappingJackson2MessageConverter.java +++ b/spring-jms/src/main/java/org/springframework/jms/support/converter/MappingJackson2MessageConverter.java @@ -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 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) {