Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better Exception Message for JMS Jackson Converter Error [SPR-14672] #19236

spring-projects-issues opened this issue Sep 6, 2016 · 1 comment


Copy link

@spring-projects-issues spring-projects-issues commented Sep 6, 2016

Michael Böckling opened SPR-14672 and commented

In, an exception is thrown if a message lacks the property that has been configured as the typeIdPropertyName, and thus Jackson has no idea to which Java type to map the message to.

The error message is "Could not find type id property [" + this.typeIdPropertyName + "]", which lacks sufficient diagnostic context to really track down the issue once it appears in a logfile. It would be very useful to have the name of the JMS queue, so I can make a guess which application forgot to set that ID.
The Message ID might also be useful for some cases.


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 + "] on message " + message.getJMSMessageID() + " from destination " + message.getJMSDestination().toString());

Affects: 4.2.6

Backported to: 4.2.8

Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Sep 9, 2016

Juergen Hoeller commented

Good catch! I've extended the message to refer to the message id and to the message's original destination as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants