Notice: register_sidebar was called incorrectly. No id was set in the arguments array for the "Sidebar 1" sidebar. Defaulting to "sidebar-1". Manually set the id to "sidebar-1" to silence this notice and keep existing sidebar content. Please see Debugging in WordPress for more information. (This message was added in version 4.2.0.) in /usr/share/wordpress/wp-includes/functions.php on line 4147 Tech Notes » Blog Archive » Hidden NullPointerException in

Hidden NullPointerException in

troubleshooting Add comments

Quick reminder to myself:

Exception in thread "main" java.lang.NullPointerException
at javax.mail.internet.MimeUtility.getEncoding(
at javax.mail.internet.MimeUtility.getEncoding(
at javax.mail.internet.MimeBodyPart.updateHeaders(
at javax.mail.internet.MimeBodyPart.updateHeaders(
at javax.mail.internet.MimeMultipart.updateHeaders(
at javax.mail.internet.MimeBodyPart.updateHeaders(
at javax.mail.internet.MimeMessage.updateHeaders(
at javax.mail.internet.MimeMessage.saveChanges(
at javax.mail.Transport.send(
at SendEmail.main(

was caused in code similar to (this example: )

// Part two is attachment
messageBodyPart = new MimeBodyPart();
DataSource source = new FileDataSource(filename);
messageBodyPart.setDataHandler(new DataHandler(source));

// Put parts in message

// Send the message

In this case, if the “filename” cannot be read, it silently works, but later causes a failure perhaps based on a null-load of the content.

Leave a Reply

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in