Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

NullPointerException due to incoming emails



NullPointerException (NPE) errors coming up with incoming emails.

Error Messages

2016-09-11 17:59:29,009 [fault (self-tuning)'] [  STANDARD] [                    ] [                    ] ( ERROR EMAIL.customer_MyOrg_Com.Listener|from([email protected]|sub(Delivery S) [email protected] - Caught unexpected NullPointerException.  Will attempt to mark mail as 'seen'.
java.lang.NullPointerException: charsetName
    at javax.activation.DataSourceDataContentHandler.getContent(
    at javax.activation.DataHandler.getContent(
    at javax.mail.internet.MimeBodyPart.getContent(

Steps to Reproduce

Not applicable

Root Cause

A third-party product issue. This is due to StringDataContentHandler class, which is getting referenced from WebLogic app server library glassfish.jaxws.rt_1.3.0.0_2-1-5.jar. And this version of class definition don't have a NPE check on charset.


The following PDN article is explaning how to avoid NPE with email listeners:


Suggest Edit

Published November 15, 2016 - Updated December 2, 2021

Did you find this content helpful? Yes No

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us