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

Particular Email not captured by Email Listener



Particular email was not captured by Email Listener in the user environments and the below error is observed in log files.

Error Messages

2016-03-15 12:16:02,159 [fault (self-tuning)'] [ STANDARD] ( ERROR EMAIL.ABCDCareListener_1.Listener|from([email protected])|sub(Re: Insura) - Caught unexpected exception. 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

1. Mark this particular .eml file as Unread.
2. Run the EmailListener to pick this email.
3. See the error message in logs.

Root Cause

It has been found out that one of the mail part contains content-type as "text/plain" with cp932 charset. CP932 is an extension of Japanese encoding to represent Japanese text,  user is unsure why one of the mail part charset is set to cp932 when there are no Japanese characters in email content.  cp932 is not listed as a standard format in the supported encodings as per Java API docs.

Ideally user would be seeing UnSupportedEncodingException instead of NullPointerException, after inspecting the stack trace 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


Make the following change to the operating environment:

Upgrade the 
glassfish.jaxws.rt_1.3.0.0_2-1-5.jar to 2.2.5 version which does contain a NPE check for charset.

User should not be seeing this exception post upgrade of this class. 


Published April 29, 2016 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

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

Did you find this content helpful?

Want to help us improve this content?

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