Imap Fetch 时出现异常
Exception while Imap Fetch
我已经按照 this post 中的建议编写了一个批量获取 IMAP 命令。
当我 运行 它作为 JUnit 或独立地作为 jar 实用程序时,它工作得很好而且很快。
当我在 JBoss 上部署它并启动 运行 作为 quartz 调度程序时,下面的异常开始发生。我检查了 Dynatrace,但没有看到 CPU 或内存中有任何峰值。
有人可以建议我可以在 JBoss 中检查哪些参数,这可能会导致对缓冲区大小或 IMAP 连接时间的任何限制。我检查了是否有任何冲突 Java 邮件 jar 但没有运气。
java.lang.IndexOutOfBoundsException
at java.io.BufferedInputStream.read(BufferedInputStream.java:327)
at com.sun.mail.iap.ResponseInputStream.readResponse(ResponseInputStream.java:154)
at com.sun.mail.iap.Response.<init>(Response.java:95)
at com.sun.mail.imap.protocol.IMAPResponse.<init>(IMAPResponse.java:60)
at com.sun.mail.imap.protocol.IMAPResponse.readResponse(IMAPResponse.java:134)
at com.sun.mail.imap.protocol.IMAPProtocol.readResponse(IMAPProtocol.java:270)
at com.sun.mail.iap.Protocol.command(Protocol.java:313)
at com.macys.notification.handlers.impl.BCCArchiveHandler$CustomProtocolCommand.doCommand(BCCArchiveHandler.java:321)
at com.sun.mail.imap.IMAPFolder.doProtocolCommand(IMAPFolder.java:2721)
at com.sun.mail.imap.IMAPFolder.doCommand(IMAPFolder.java:2671)
我终于找到了解决办法。在 jboss 服务器上,ssl 调试日志已打开。一旦我删除了 -Djavax.net.debug=ssl,handshake -Djavax.net.debug=all,它就被修复了。
我已经按照 this post 中的建议编写了一个批量获取 IMAP 命令。
当我 运行 它作为 JUnit 或独立地作为 jar 实用程序时,它工作得很好而且很快。
当我在 JBoss 上部署它并启动 运行 作为 quartz 调度程序时,下面的异常开始发生。我检查了 Dynatrace,但没有看到 CPU 或内存中有任何峰值。
有人可以建议我可以在 JBoss 中检查哪些参数,这可能会导致对缓冲区大小或 IMAP 连接时间的任何限制。我检查了是否有任何冲突 Java 邮件 jar 但没有运气。
java.lang.IndexOutOfBoundsException
at java.io.BufferedInputStream.read(BufferedInputStream.java:327)
at com.sun.mail.iap.ResponseInputStream.readResponse(ResponseInputStream.java:154)
at com.sun.mail.iap.Response.<init>(Response.java:95)
at com.sun.mail.imap.protocol.IMAPResponse.<init>(IMAPResponse.java:60)
at com.sun.mail.imap.protocol.IMAPResponse.readResponse(IMAPResponse.java:134)
at com.sun.mail.imap.protocol.IMAPProtocol.readResponse(IMAPProtocol.java:270)
at com.sun.mail.iap.Protocol.command(Protocol.java:313)
at com.macys.notification.handlers.impl.BCCArchiveHandler$CustomProtocolCommand.doCommand(BCCArchiveHandler.java:321)
at com.sun.mail.imap.IMAPFolder.doProtocolCommand(IMAPFolder.java:2721)
at com.sun.mail.imap.IMAPFolder.doCommand(IMAPFolder.java:2671)
我终于找到了解决办法。在 jboss 服务器上,ssl 调试日志已打开。一旦我删除了 -Djavax.net.debug=ssl,handshake -Djavax.net.debug=all,它就被修复了。