[ 
https://issues.apache.org/jira/browse/CAMEL-5980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13569745#comment-13569745
 ] 

Joe San commented on CAMEL-5980:
--------------------------------

@Alex: I tried running your test case and below is what I get to see:

org.apache.camel.RuntimeCamelException: Error populating the initial mail 
message attachments
        at 
org.apache.camel.component.mail.MailMessage.populateInitialAttachments(MailMessage.java:124)
        at 
org.apache.camel.impl.DefaultMessage.createAttachments(DefaultMessage.java:209)
        at 
org.apache.camel.impl.DefaultMessage.getAttachments(DefaultMessage.java:274)
        at 
org.apache.camel.component.mail.MailAttachmentTest.testEmailFile(MailAttachmentTest.java:120)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
        at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
        at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
        at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
        at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
        at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
        at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:47)
        at org.junit.rules.RunRules.evaluate(RunRules.java:18)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
        at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
        at 
com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:76)
        at 
com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195)
        at 
com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: javax.mail.internet.ParseException: Expected parameter value, got 
"null"
        at javax.mail.internet.ParameterList.<init>(ParameterList.java:262)
        at 
javax.mail.internet.ContentDisposition.<init>(ContentDisposition.java:100)
        at 
javax.mail.internet.MimeBodyPart.getDisposition(MimeBodyPart.java:1076)
        at 
javax.mail.internet.MimeBodyPart.getDisposition(MimeBodyPart.java:303)
        at 
org.apache.camel.component.mail.MailBinding.extractAttachmentsFromMultipart(MailBinding.java:309)
        at 
org.apache.camel.component.mail.MailBinding.extractAttachmentsFromMail(MailBinding.java:287)
        at 
org.apache.camel.component.mail.MailMessage.populateInitialAttachments(MailMessage.java:121)
        ... 34 more

I will try to debug and see if I could fix this soon.
                
> camel-mail - Better handle null values when extracting attachments
> ------------------------------------------------------------------
>
>                 Key: CAMEL-5980
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5980
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-mail
>    Affects Versions: 2.9.0, 2.10.0
>            Reporter: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.10.4, 2.11.0
>
>         Attachments: Exception Mail.eml
>
>
> See nabble
> http://camel.465427.n5.nabble.com/MailComponent-s-claim-to-handle-special-mail-multipart-formats-and-attachments-tp5724859.html
> We should see if we can fix the Camel code to handle those null data.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to