javax.mail.MessagingException: IOException while sending message; nested exception is: java.io.FileNotFoundException: /drawable:/2130837597: open failed: ENOENT (No such file or directory)

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert tip

Check if android.permission.WRITE_EXTERNAL_STORAGE is in AndroidManifest.xml. Also, add checks in your code to see if the storage is available to write before trying to write. And last: create a folder to put your files inside.

Solutions on the web

via Stack Overflow by Muhammad Farooq Arshad
, 11 months ago
IOException while sending message; nested exception is: java.io.FileNotFoundException: /drawable:/2130837597: open failed: ENOENT (No such file or directory)
via java2s.com by Unknown author, 1 year ago
IOException while sending message; nested exception is: java.io.FileNotFoundException: /Error_20080825.xls (No such file or directory)
via Stack Overflow by Mocktheduck
, 1 year ago
IOException while sending message; W/System.err: nested exception is: W/System.err: java.io.FileNotFoundException: /sdcard/filelocation (No such file or directory)
via qos.ch by Unknown author, 2 years ago
via Coderanch by Piyush Doraya, 6 months ago
IOException while sending message; nested exception is: javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed; boundary="----=_Part_0_1731747840.1331020495293"
via Oracle Community by 843834, 1 year ago
IOException while sending message; [java] nested exception is: [java] javax.activation.UnsupportedDataTypeException: no object DCH for MIME type text/plain; charset=us-ascii [java]
libcore.io.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Posix.open(Native Method)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)
at libcore.io.IoBridge.open(IoBridge.java:393)
at java.io.FileInputStream.(FileInputStream.java:78)
at javax.activation.FileDataSource.getInputStream(FileDataSource.java:110)
at javax.activation.DataHandler.writeTo(DataHandler.java:318)
at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1403)
at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:874)
at javax.mail.internet.MimeMultipart.writeTo(MimeMultipart.java:444)
at com.sun.mail.handlers.multipart_mixed.writeTo(multipart_mixed.java:102)
at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:897)
at javax.activation.DataHandler.writeTo(DataHandler.java:330)
at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1403)
at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1745)
at javax.mail.Transport.send0(Transport.java:189)
at javax.mail.Transport.send(Transport.java:118)
at io.farooq.check.GMailSender.sendMail(GMailSender.java:81)
at io.farooq.check.MainActivity$1$1.run(MainActivity.java:74)
at java.lang.Thread.run(Thread.java:841)

Users with the same issue

13 times, 3 months ago
13 times, 4 months ago
Once, 6 months ago
2 times, 7 months ago
95 times, 7 months ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.