[
http://issues.apache.org/jira/browse/JAMES-447?page=comments#action_12368134 ]
Bernd Fondermann commented on JAMES-447:
----------------------------------------
both still fail with the same stacktrace:
javax.mail.MessagingException: MIME part of type "multipart/alternative;
boundary="XyoYyxCQIfmZ5Sxofid6XQVZt5Z09XtTnqBF4Z45XSA="" contains object of
type com.sun.mail.util.SharedByteArrayInputStream instead of MimeMultipart
at
javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1113)
at javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:1927)
at javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:1908)
at
org.apache.james.core.MimeMessageUtil.writeTo(MimeMessageUtil.java:67)
at
org.apache.james.core.MimeMessageUtil.writeTo(MimeMessageUtil.java:45)
at
org.apache.james.core.MimeMessageUtilTest.testWriteMimeMessageMultipartWithMessageID(MimeMessageUtilTest.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at
com.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStarter.java:31)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:86)
> ClassCastException when storing multipart message without Msg ID
> ----------------------------------------------------------------
>
> Key: JAMES-447
> URL: http://issues.apache.org/jira/browse/JAMES-447
> Project: James
> Type: Bug
> Components: MailStore & MailRepository
> Versions: 2.3.0a1
> Reporter: Bernd Fondermann
> Assignee: Stefano Bagnara
> Attachments: MimeMessageUtilTest.java, test.zip
>
> This problem occurs with James HEAD, but not with James 2.2.0
> When sending a multipart message which has no Message-ID header field to an
> internal user, the following exception is raised:
> javax.mail.MessagingException: Exception caught while storing Message
> Container: javax.mail.MessagingException: MIME part of type "multipart/mixed;
> boundary="bmQykoPt9wvlXeBFetOZnNCi/trubV+f25KeVm5YJYo="" contains object of
> type com.sun.mail.util.SharedByteArrayInputStream instead of MimeMultipart
> at
> org.apache.james.mailrepository.AvalonMailRepository.store(AvalonMailRepository.java:329)
> at
> org.apache.james.transport.mailets.ToMultiRepository.storeMail(ToMultiRepository.java:226)
> at
> org.apache.james.transport.mailets.ToMultiRepository.service(ToMultiRepository.java:151)
> at
> org.apache.james.transport.mailets.LocalDelivery.service(LocalDelivery.java:64)
> at
> org.apache.james.transport.LinearProcessor.service(LinearProcessor.java:414)
> at
> org.apache.james.transport.JamesSpoolManager.process(JamesSpoolManager.java:397)
> at
> org.apache.james.transport.JamesSpoolManager.run(JamesSpoolManager.java:306)
> at java.lang.Thread.run(Thread.java:534)
> the exception is thrown within JavaMail, the last related James call is in
> line 67 of MimeMessageUtil:
> public static void writeTo(MimeMessage message, OutputStream headerOs,
> OutputStream bodyOs, String[] ignoreList) throws IOException,
> MessagingException {
> if (message instanceof MimeMessageCopyOnWriteProxy) {
> MimeMessageCopyOnWriteProxy wr = (MimeMessageCopyOnWriteProxy)
> message;
> MimeMessage m = wr.getWrappedMessage();
> if (m instanceof MimeMessageWrapper) {
> MimeMessageWrapper wrapper = (MimeMessageWrapper)m;
> wrapper.writeTo(headerOs, bodyOs, ignoreList);
> return;
> }
> } else if (message instanceof MimeMessageWrapper) {
> MimeMessageWrapper wrapper = (MimeMessageWrapper)message;
> wrapper.writeTo(headerOs, bodyOs, ignoreList);
> return;
> }
> if(message.getMessageID() == null) {
> message.saveChanges(); //// <====== exception thrown from here
> }
> the exception is going away if at least one of the following is done:
> + a message id header field is added when sending the message
> + the receiver is not a James internal account
> + the message mime type is changed from "multipart" to something else
> + James 2.2.0 is being used.
> I did the first one for the stress test tool, but wonder if a Message-ID is
> mandatory.
> I debugged this problem but did not find neither a fix nor the critical
> change from 2.2.0
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]