我正在使用 Wildfly(和 maven)开发 Java Web 应用程序,我想将 logentries 与 Logback 一起使用,如https://logentries.com/doc/java/#logback中所述。
我还将 AWS SDK 用于某些操作,这似乎是 logentries 和 AWS SDK 之间的不兼容。
如果我删除 aws-java-sdk (1.7.11) logentries 就像一个魅力。但是一旦我添加它,我就会收到以下错误:
14:36:25,329 INFO [stdout] (default task-32) DEBUG: JavaMail version 1.5.1
14:36:25,330 INFO [stdout] (default task-32) DEBUG: URL vfs:/home/lucasferreira/Desenvolvimento/2.Servidores/wildfly-8.1.0.Final/standalone/deployments/server-1.0-SNAPSHOT.war/WEB-INF/lib/aws-java-sdk-1.7.11.jar/META-INF/javamail.providers
14:36:25,330 INFO [stdout] (default task-32) DEBUG: Bad provider entry:
14:36:25,330 INFO [stdout] (default task-32) DEBUG: successfully loaded resource: vfs:/home/lucasferreira/Desenvolvimento/2.Servidores/wildfly-8.1.0.Final/standalone/deployments/server-1.0-SNAPSHOT.war/WEB-INF/lib/aws-java-sdk-1.7.11.jar/META-INF/javamail.providers
14:36:25,331 INFO [stdout] (default task-32) DEBUG: successfully loaded resource: /META-INF/javamail.default.providers
14:36:25,331 INFO [stdout] (default task-32) DEBUG: Tables of loaded providers
14:36:25,331 INFO [stdout] (default task-32) DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Oracle], com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle], com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Oracle], com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Oracle], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Oracle], com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Oracle], com.amazonaws.services.simpleemail.AWSJavaMailTransport=javax.mail.Provider[TRANSPORT,aws,com.amazonaws.services.simpleemail.AWSJavaMailTransport,Amazon Web Services LLC]}
14:36:25,331 INFO [stdout] (default task-32) DEBUG: Providers Listed By Protocol: {imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Oracle], imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Oracle], smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Oracle], pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Oracle], pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Oracle], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle], aws=javax.mail.Provider[TRANSPORT,aws,com.amazonaws.services.simpleemail.AWSJavaMailTransport,Amazon Web Services LLC]}
14:36:25,332 INFO [stdout] (default task-32) DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map
14:36:25,339 INFO [stdout] (default task-32) 14:36:25.338 [default task-32] INFO logentries - Test message
而且我的登录帐户中没有收到该消息。
经过一番研究,我发现亚马逊 SDK 与 javamail 配置混在一起,过去有一些问题(http://www.thebuzzmedia.com/javamail-smtp-on-localhost-fails-with-amazon- aws-sdk-in-classpath/)。我可以采用任何解决方法或修复方法吗?这是 AWS SDK 问题还是 logentries 问题?