Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » JakartaMail / JavaMail: IOException: no data(IOException: no data when mail attachment larger than 64K)
JakartaMail / JavaMail: IOException: no data [message #1835826] Mon, 14 December 2020 13:07 Go to next message
Anjali Biddanda is currently offline Anjali BiddandaFriend
Messages: 1
Registered: December 2020
Junior Member
Hi guys,

We've been stuck on an issue that we're hoping you can help us out with. We have a custom workflow that converts .DAT files to PDF and sends an email with the PDF as attachment. The issue is when PDFs are larger than 65KB, we're seeing an IOException: no data when the javax.Mail.util.ByteArrayDataSource.getInputStream() is called. We're sending this mail through our corporate SMTP server. PDF sizes any smaller than 65KB are attached and emailed successfully.

Unfortunately we can't try a different SMTP Server such as Gmail because of our corporate network. I've tested using Telnet to send large attachments to our corporate SMTP server, and these are queued successfully.

I've read the documentation on JavaMail FAQ. We're using HtmlEmail API that uses MutlipartEmail. Hoping you can give us some direction, clues or tips on why we might be seeing "no data" when reading the stream?

There are 2 things we are yet to check with the SMTP team:
Is it possible they may have a "fetchsize" setting on the server.
Or they could have a 64KB limit on the header fields in a message file placed in the pickup directory

Here is the stack trace:
There was error while sending email for DAT file : XXXXXXXXXX, Error : org.apache.commons.mail.EmailException: Sending the email to the following server failed : org.apache.commons.mail.EmailException: Sending the email to the following server failed :
at []
at []
at com.xxxx.core.xml.SendEmailFormsWorkflow.sendEmail( [xxxx.core:1.1.0]
at com.xxxx.core.xml.SendEmailFormsWorkflow.processWorkflowContext( [xxxx.core:1.1.0]
at com.adobe.aemfd.watchfolder.workflow.WorkflowLauncherHandler.execute( [adobe-aemds-core-watch-folder:3.0.46]
at com.xxxx.core.workflowprocesses.SendEmail.execute( [xxxx.core:1.1.0]
at com.adobe.granite.workflow.core.job.HandlerBase.executeProcess( [com.adobe.granite.workflow.core:2.0.240.CQ650-B0014]
at com.adobe.granite.workflow.core.job.JobHandler.process( [com.adobe.granite.workflow.core:2.0.240.CQ650-B0014]
at$JobConsumerWrapper.process( []
at []
at$100( []
at$ []
at java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.util.concurrent.ThreadPoolExecutor$
Caused by: org.apache.commons.mail.EmailException: Sending the email to the following server failed :
at org.apache.commons.mail.Email.sendMimeMessage( []
at org.apache.commons.mail.Email.send( []
at []
... 14 common frames omitted
Caused by: javax.mail.MessagingException: IOException while sending message
at com.sun.mail.smtp.SMTPTransport.sendMessage( [com.sun.mail.javax.mail:1.6.2]
at javax.mail.Transport.send0( [com.sun.mail.javax.mail:1.6.2]
at javax.mail.Transport.send( [com.sun.mail.javax.mail:1.6.2]
at org.apache.commons.mail.Email.sendMimeMessage( []
... 16 common frames omitted
Caused by: no data
at javax.mail.util.ByteArrayDataSource.getInputStream( [com.sun.mail.javax.mail:1.6.2]
at javax.activation.DataHandler.writeTo( []
at javax.mail.internet.MimeBodyPart.writeTo( [com.sun.mail.javax.mail:1.6.2]
at javax.mail.internet.MimeBodyPart.writeTo( [com.sun.mail.javax.mail:1.6.2]
at javax.mail.internet.MimeMultipart.writeTo( [com.sun.mail.javax.mail:1.6.2]
at com.sun.mail.handlers.multipart_mixed.writeTo( [com.sun.mail.javax.mail:1.6.2]
at javax.activation.ObjectDataContentHandler.writeTo( []
at javax.activation.DataHandler.writeTo( []
at javax.mail.internet.MimeBodyPart.writeTo( [com.sun.mail.javax.mail:1.6.2]
at javax.mail.internet.MimeMessage.writeTo( [com.sun.mail.javax.mail:1.6.2]
at com.sun.mail.smtp.SMTPTransport.sendMessage( [com.sun.mail.javax.mail:1.6.2]
... 19 common frames omitted
Re: JakartaMail / JavaMail: IOException: no data [message #1835891 is a reply to message #1835826] Tue, 15 December 2020 22:53 Go to previous message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4044
Registered: July 2009
Senior Member

This doesn't appear to have anything to do with Eclipse, and this isn't a general programming question board. You'd probably find a better audience for it at Java Ranch or Stack Overflow.

Nitin Dahyabhai
Eclipse Web Tools Platform
Previous Topic:Custom Plug-in - Capture the Mouse Right Click popup menu selection
Next Topic:cannot start tomcat 9 plugin
Goto Forum:

Current Time: Mon May 10 19:30:55 GMT 2021

Powered by FUDForum. Page generated in 0.03362 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top