Skip to content

Possible NPE in JmsUtils.buildExceptionMessage and JmsException.getMessage [SPR-5470] #10143

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

Closed
spring-projects-issues opened this issue Feb 10, 2009 · 6 comments
Assignees
Labels
in: messaging Issues in messaging modules (jms, messaging) type: bug A general bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Feb 10, 2009

Guillaume Nodet opened SPR-5470 and commented

If the JMS exception has no message, a NPE is thrown

Exception in thread "org.apache.servicemix.jbi.cluster.requestor.ActiveMQJmsRequestorPool#717dc9-3" 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)
        ...

Affects: 2.5.6

Issue Links:

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Feb 12, 2009

Juergen Hoeller commented

I'm reopening this issue for the linked exception problem that you pointed out at #9948.

Juergen

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

Should be fully fixed for M2 now, in both JmsException and JmsUtils.

Juergen

@spring-projects-issues
Copy link
Collaborator Author

Philippe Mouawad commented

Hello,
Is it possible to apply this correction on 2.5.X family ?

Thank you in advance.
Philippe
http://www.ubik-ingenierie.com

@spring-projects-issues
Copy link
Collaborator Author

Sven Borkert commented

Hello,

this error prevents "DefaultMessageListenerContainer" from recovering broken connections. I tested this with active MQ, when I shutdown the broker, NPEs appear:

Exception in thread "commandListener-3" java.lang.NullPointerException
at java.lang.String.indexOf(String.java:1733)
at java.lang.String.indexOf(String.java:1715)
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:637)

This causes the thread to die, and I think it stays unnoticed, so there is no recovery.

How can you not fix such bugs in the stable version, when Spring 3 is only available as RC and not stable?

Regards,

Sven

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Aug 31, 2010

Dennis Homann commented

I agree with Philippe: please backport this fix to 2.5.x.
See #12168.

@spring-projects-issues
Copy link
Collaborator Author

Timothy Myer commented

+1 for backporting to Spring 2.5.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: messaging Issues in messaging modules (jms, messaging) type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants