Issue Details (XML | Word | Printable)

Key: SPR-6052
Type: Bug Bug
Status: Resolved Resolved
Resolution: Duplicate
Priority: Major Major
Assignee: Juergen Hoeller
Reporter: John Baker
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Spring Framework

NullPointerException can occur from JmsUtils.buildException

Created: 29/Aug/09 04:43 AM   Updated: 31/Aug/09 09:38 AM   Resolved: 31/Aug/09 09:38 AM
Component/s: SpringJMS
Affects Version/s: 2.5.6
Fix Version/s: 3.0 M1, 3.0 M2

Time Tracking:
Not Specified

Issue Links:
Duplicate
 

Virtual Machine: Sun JVM - 1.6
Platform: BEA WebLogic - 9.2


 Description  « Hide

The following exception has been noted when the WL JMS drivers failed to connect:

Exception in thread "jms.jobs.messageListenerContainer.SRUpdateFromSiebel-1" java.lang.NullPointerException
at java.lang.String.indexOf(String.java:1564)
at java.lang.String.indexOf(String.java:1546)
at org.springframework.jms.support.JmsUtils.buildExceptionMessage(JmsUtils.java:255)
at org.springframework.jms.listener.DefaultMessageListenerContainer.handleListenerSetupFailure(DefaultMessageListenerContainer.java:745)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:897)
at java.lang.Thread.run(Thread.java:595)

The problem is this line of code in JmsUtils.buildException:

if (linkedEx != null && message.indexOf(linkedEx.getMessage()) == -1) {

linkedEx may not be null, but the message can be null, so it simply need to be:

if (linkedEx != null && linkedEx.getMessage() != null && message.indexOf(linkedEx.getMessage()) == -1) {



There are no comments yet on this issue.