[SWS-848] Logging on DEBUG breaks DefaultMessageListenerContainer on WebSphere MQ Created: 11/Sep/13 Updated: 20/Mar/14 Resolved: 27/Jan/14
|Project:||Spring Web Services|
|Reporter:||Jan-Kees van Andel||Assignee:||Arjen Poutsma|
|Remaining Estimate:||Not Specified|
|Time Spent:||Not Specified|
|Original Estimate:||Not Specified|
WebSphere 7 FP 27on Red Hat Linux, IBM J9VM - 20121024_126067
When I set the logging in the package org.springframework.ws.transport.support (or org.springframework FWIW), I get a strange exception. See below:
When digging down into the issue, I found that the root cause was in the org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport#logUri() method. This method calls a method: org.springframework.ws.transport.jms.JmsReceiverConnection#getUri() which crashes because requestMessage.getJMSDestination() resolves to null.
However, the exception is not caught, so it bubbles up. And since it's outside of the try block, the rest of the code is not executed and the connection is not freed. In my local environment I fixed the issue by adding a catch clause to the logURI method, like this:
This way, the logging statement doesn't have (a visible at least) side effect.
Expanding the try block in handleConnection was also something I tried, but that had as a result that the connection is properly closed, but the rest of the code (my service endpoint) was still not executed. So that solution also had side effects
|Comment by Arjen Poutsma [ 27/Jan/14 ]|
Fixed. When the destination is null, the URI is null as well.