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 java2s.com by Unknown author, 1 year ago
via Stack Overflow by Mocktheduck
, 1 year agovia qos.ch by Unknown author, 2 years ago
via Stack Overflow by Bobby
, 3 weeks agovia Coderanch by Piyush Doraya, 9 months ago
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 com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:636)
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)