[mule-user] DefaultMuleMessage.toString throws NPE if MuleContext is unavailable

0 views
Skip to first unread message

knaas

unread,
Mar 26, 2008, 11:40:48 AM3/26/08
to us...@mule.codehaus.org

I am using Mule2.0-RC3

If the toString() method on DefaultMuleMessage is called without a
MuleContext, it will throw this exception:

java.lang.NullPointerException
at
org.mule.transport.AbstractMessageAdapter.assertAccess(AbstractMessageAdapter.java:486)
at
org.mule.transport.AbstractMessageAdapter.toString(AbstractMessageAdapter.java:132)
at org.mule.DefaultMuleMessage.toString(DefaultMuleMessage.java:411)

This is occuring because TestNG is trying to output a report of what we
tested. We are using DataProviders - which is just a way to execute the
same test over and over with different combinations of parameters. After
the test is run, TestNG calls toString on the parameters for display
purposes.

However, this NPE could definitely occur at other times as well.


--
View this message in context: http://www.nabble.com/DefaultMuleMessage.toString-throws-NPE-if-MuleContext-is-unavailable-tp16304008p16304008.html
Sent from the Mule - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


Andrew Perepelytsya

unread,
Mar 26, 2008, 2:22:10 PM3/26/08
to us...@mule.codehaus.org
Hi,

Could you please file a jira for this?

Thanks,
Andrew

knaas

unread,
Apr 17, 2008, 11:28:54 AM4/17/08
to us...@mule.codehaus.org
Reply all
Reply to author
Forward
0 new messages