Skip to content

Commit 338a4a5

Browse files
committed
MappingJackson2MessageConverter adds message id and destination to type resolution exception
Issue: SPR-14672 (cherry picked from commit ae2bbe7)
1 parent 1bde1ff commit 338a4a5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2014 the original author or authors.
2+
* Copyright 2002-2016 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -376,7 +376,9 @@ protected Object convertFromMessage(Message message, JavaType targetJavaType)
376376
protected JavaType getJavaTypeForMessage(Message message) throws JMSException {
377377
String typeId = message.getStringProperty(this.typeIdPropertyName);
378378
if (typeId == null) {
379-
throw new MessageConversionException("Could not find type id property [" + this.typeIdPropertyName + "]");
379+
throw new MessageConversionException(
380+
"Could not find type id property [" + this.typeIdPropertyName + "] on message [" +
381+
message.getJMSMessageID() + "] from destination [" + message.getJMSDestination() + "]");
380382
}
381383
Class<?> mappedClass = this.idClassMappings.get(typeId);
382384
if (mappedClass != null) {

0 commit comments

Comments
 (0)