Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Getting javax.mail.internet.ParseException when parsing MIME message

Saroja Kandepuneni-OracleSep 25 2012 — edited Oct 4 2012
Hi All,

The MIME Content Type is as below.

Content-Type: application/pdf;
name="ecm-000669.pdf";
Content-Disposition: attachment;
filename="ecm-000669.pdf";


When executing the following statement
ContentType ct = new ContentType(contentType);

where contentType is application/pdf;
name="ecm-000669.pdf";

Getting the below error

javax.mail.internet.ParseException
at javax.mail.internet.ParameterList.<init>(ParameterList.java:61)
at javax.mail.internet.ContentType.<init>(ContentType.java:83)
at oracle.apps.fnd.wf.common.MIMEUtils.handleContent(MIMEUtils.java:488)
at oracle.apps.fnd.wf.mailer.EmailParser.processSingleContent(EmailParser.java:1851)
at oracle.apps.fnd.wf.mailer.EmailParser.parseBody(EmailParser.java:2166)
at oracle.apps.fnd.wf.mailer.EmailParser.parseEmail(EmailParser.java:1195)
at oracle.apps.fnd.wf.mailer.IMAPResponseHandler.processSingleMessage(IMAPResponseHandler.java:255)
at oracle.apps.fnd.wf.mailer.IMAPResponseHandler.processMessage(IMAPResponseHandler.java:92)
at oracle.apps.fnd.cp.gsc.SvcComponentProcessor.process(SvcComponentProcessor.java:659)
at oracle.apps.fnd.cp.gsc.Processor.run(Processor.java:283)
at java.lang.Thread.run(Thread.java:534)

The error is not happening when I remove the semi colon at the end of content-type header as shown below

Content-Type: application/pdf;
name="ecm-000669.pdf"


Can you please tell that semi colon at the end of Content-Type header is not supported in MIME standard? This MIME is coming from the rediff email client. Is there any parameter in Java Mail API to avoid these kind of issues?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 1 2012
Added on Sep 25 2012
3 comments
3,015 views