gpt4 book ai didi

java - com.sun.mail.iap.ParsingException : BODYSTRUCTURE parse error: bad `` size'' element

转载 作者:行者123 更新时间:2023-12-02 05:17:07 26 4
gpt4 key购买 nike

我尝试从电子邮件收件箱读取退回邮件,但总是遇到以下异常:

2019-05-23 16:05:42 INFO  [stdio.AbstractLoggingWriter] (Camel (camel-inbound) thread #24 - robustimaps://abc@test.com) DEBUG IMAPS: ignoring bad response, THROW: 
2019-05-23 16:05:42 INFO [stdio.AbstractLoggingWriter] (Camel (camel-inbound) thread #24 - robustimaps://abc@test.com) com.sun.mail.iap.ParsingException: BODYSTRUCTURE parse error: bad ``size'' element
2019-05-23 16:05:42 INFO [stdio.AbstractLoggingWriter] (Camel (camel-inbound) thread #24 - robustimaps://abc@test.com) at com.sun.mail.imap.protocol.BODYSTRUCTURE.<init>(BODYSTRUCTURE.java:266)
2019-05-23 16:05:42 INFO [stdio.AbstractLoggingWriter] (Camel (camel-inbound) thread #24 - robustimaps://abc@test.com) at com.sun.mail.imap.protocol.BODYSTRUCTURE.<init>(BODYSTRUCTURE.java:291)
2019-05-23 16:05:42 INFO [stdio.AbstractLoggingWriter] (Camel (camel-inbound) thread #24 - robustimaps://abc@test.com) at com.sun.mail.imap.protocol.BODYSTRUCTURE.<init>(BODYSTRUCTURE.java:110)
2019-05-23 16:05:42 INFO [stdio.AbstractLoggingWriter] (Camel (camel-inbound) thread #24 - robustimaps://abc@test.com) at com.sun.mail.imap.protocol.FetchResponse.parseItem(FetchResponse.java:258)
2019-05-23 16:05:42 INFO [stdio.AbstractLoggingWriter] (Camel (camel-inbound) thread #24 - robustimaps://abc@test.com) at com.sun.mail.imap.protocol.FetchResponse.parse(FetchResponse.java:213)
2019-05-23 16:05:42 INFO [stdio.AbstractLoggingWriter] (Camel (camel-inbound) thread #24 - robustimaps://abc@test.com) at com.sun.mail.imap.protocol.FetchResponse.<init>(FetchResponse.java:96)
2019-05-23 16:05:42 INFO [stdio.AbstractLoggingWriter] (Camel (camel-inbound) thread #24 - robustimaps://abc@test.com) at com.sun.mail.imap.protocol.IMAPProtocol.readResponse(IMAPProtocol.java:392)
2019-05-23 16:05:42 INFO [stdio.AbstractLoggingWriter] (Camel (camel-inbound) thread #24 - robustimaps://abc@test.com) at com.sun.mail.iap.Protocol.command(Protocol.java:354)
2019-05-23 16:05:42 INFO [stdio.AbstractLoggingWriter] (Camel (camel-inbound) thread #24 - robustimaps://abc@test.com) at com.sun.mail.imap.protocol.IMAPProtocol.fetch(IMAPProtocol.java:2113)
2019-05-23 16:05:42 INFO [stdio.AbstractLoggingWriter] (Camel (camel-inbound) thread #24 - robustimaps://abc@test.com) at com.sun.mail.imap.protocol.IMAPProtocol.fetch(IMAPProtocol.java:2105)
2019-05-23 16:05:42 INFO [stdio.AbstractLoggingWriter] (Camel (camel-inbound) thread #24 - robustimaps://abc@test.com) at com.sun.mail.imap.protocol.IMAPProtocol.fetchBodyStructure(IMAPProtocol.java:1680)
2019-05-23 16:05:42 INFO [stdio.AbstractLoggingWriter] (Camel (camel-inbound) thread #24 - robustimaps://abc@test.com) at com.sun.mail.imap.IMAPMessage.loadBODYSTRUCTURE(IMAPMessage.java:1476)
2019-05-23 16:05:42 INFO [stdio.AbstractLoggingWriter] (Camel (camel-inbound) thread #24 - robustimaps://abc@test.com) at com.sun.mail.imap.IMAPMessage.getDataHandler(IMAPMessage.java:746)
2019-05-23 16:05:42 INFO [stdio.AbstractLoggingWriter] (Camel (camel-inbound) thread #24 - robustimaps://abc@test.com) at javax.mail.internet.MimeMessage.getContent(MimeMessage.java:1454)
2019-05-23 16:05:42 INFO [stdio.AbstractLoggingWriter] (Camel (camel-inbound) thread #24 - robustimaps://abc@test.com) at org.apache.camel.component.mail.MailBinding.extractBodyFromMail(MailBinding.java:250)
2019-05-23 16:05:42 INFO [stdio.AbstractLoggingWriter] (Camel (camel-inbound) thread #24 - robustimaps://abc@test.com) at org.apache.camel.component.mail.MailMessage.createBody(MailMessage.java:105)
2019-05-23 16:05:42 INFO [stdio.AbstractLoggingWriter] (Camel (camel-inbound) thread #24 - robustimaps://abc@test.com) at org.apache.camel.component.mail.MailMessageRobust.createBody(MailMessageRobust.java:39)
2019-05-23 16:05:42 INFO [stdio.AbstractLoggingWriter] (Camel (camel-inbound) thread #24 - robustimaps://abc@test.com) at org.apache.camel.impl.MessageSupport.getBody(MessageSupport.java:47)
2019-05-23 16:05:42 INFO [stdio.AbstractLoggingWriter] (Camel (camel-inbound) thread #24 - robustimaps://abc@test.com) at org.apache.camel.component.mail.MailConsumer.createExchanges(MailConsumer.java:354)
2019-05-23 16:05:42 INFO [stdio.AbstractLoggingWriter] (Camel (camel-inbound) thread #24 - robustimaps://abc@test.com) at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:128)
2019-05-23 16:05:42 INFO [stdio.AbstractLoggingWriter] (Camel (camel-inbound) thread #24 - robustimaps://abc@test.com) at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:175)
2019-05-23 16:05:42 INFO [stdio.AbstractLoggingWriter] (Camel (camel-inbound) thread #24 - robustimaps://abc@test.com) at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:102)
2019-05-23 16:05:42 INFO [stdio.AbstractLoggingWriter] (Camel (camel-inbound) thread #24 - robustimaps://abc@test.com) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
2019-05-23 16:05:42 INFO [stdio.AbstractLoggingWriter] (Camel (camel-inbound) thread #24 - robustimaps://abc@test.com) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
2019-05-23 16:05:42 INFO [stdio.AbstractLoggingWriter] (Camel (camel-inbound) thread #24 - robustimaps://abc@test.com) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPool
Executor.java:180)
2019-05-23 16:05:42 INFO [stdio.AbstractLoggingWriter] (Camel (camel-inbound) thread #24 - robustimaps://abc@test.com) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecuto
r.java:294)
2019-05-23 16:05:42 INFO [stdio.AbstractLoggingWriter] (Camel (camel-inbound) thread #24 - robustimaps://abc@test.com) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
2019-05-23 16:05:42 INFO [stdio.AbstractLoggingWriter] (Camel (camel-inbound) thread #24 - robustimaps://abc@test.com) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
2019-05-23 16:05:42 INFO [stdio.AbstractLoggingWriter] (Camel (camel-inbound) thread #24 - robustimaps://abc@test.com) at java.lang.Thread.run(Thread.java:748)

我尝试在互联网上查找此错误的含义,但我并没有真正得到任何有用的结果。任何有关该方向的建议或提示都会有所帮助。

提前致谢!

阅读@arnt的评论后,我提取了引发此错误的响应,如下所示:

robustimaps://abc@test.com) * 1 FETCH (BODYSTRUCTURE (((("text" "plain" ("charset" "UTF-8") NIL NIL "7BIT" 143 7 NIL NIL NIL NIL)("text"
"html" ("charset" "UTF-8") NIL NIL "7BIT" 1209 33 NIL NIL NIL NIL) "alternative" ("boundary" "0000000000006a31d605898e6fe4") NIL NIL)("image" "png" ("name" "icon.png") "<icon.png>" NIL "base64" 7864 NIL ("attachment" ("filename"
"icon.png")) NIL NIL) "related" ("boundary" "0000000000006a31d305898e6fe3") NIL NIL)("message" "delivery-status" NIL NIL NIL "7BIT" 355 NIL NIL NIL NIL)("message" "rfc822" NIL NIL NIL "7BIT" 0 ("Thu, 23 May 2019 15:55:30 +0200" "=
?UTF-8?Q?Ihr_blah_blah_blah_bald._when_and_where_m=C3=B6c?= =?UTF-8?Q?hten_Sie_es_empfangen=3F_Jetzt_festlegen_...?=" (("ABC Paket" NIL "abc" "test.com")) NIL (("ABC Paket" NIL "abc" "test.com")) ((NIL NIL "3011941477" "xyz.
de")) NIL NIL NIL "<2066153904.661086.1558619730208@rnd-02.broadmail.live>") ("multipart" "signed" ("protocol" "application/pkcs7-signature" "micalg" "sha-256" "boundary" "----=_Part_661085_623173410.1558619730208") NIL NIL "7BIT"
-1 NIL NIL NIL NIL) 0 NIL NIL NIL NIL) "report" ("boundary" "0000000000006a30fa05898e6fdb" "report-type" "delivery-status") NIL NIL))

最佳答案

Javamail 正在解析一个正文结构,这是一个很长的行,包含许多括号、数字、NIL 和字符串。在它期望大小的时候,它发现了一个负数。为什么那里有负数?好吧,IMAP 服务器没有很多机会发送负数,所以我怀疑服务器有错误。

(为了完整起见:另一种选择是服务器的编号是正确的,而客户端对此时的大小的期望是错误的。但我们现在知道这是一个服务器错误。)

关于java - com.sun.mail.iap.ParsingException : BODYSTRUCTURE parse error: bad `` size'' element,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56287841/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com