每当我尝试通过AWS SDK发送邮件时,都会出现以下异常:
java.lang.NoSuchMethodError: org.apache.http.params.HttpConnectionParams.setSoKeepalive(Lorg/apache/http/params/HttpParams;Z)V
我在这里得到了一个提示(https://github.com/aws/aws-sdk-java/issues/422)可能有什么问题:显然HttpClient和HttpCore版本之间存在一些冲突,但无论我尝试哪个版本,我都无法弄清楚。
的一部分。类路径文件:
<classpathentry kind="lib" path="lib/aws-java-sdk-1.10.69-javadoc.jar"/>
<classpathentry kind="lib" path="lib/aws-java-sdk-1.10.69-sources.jar"/>
<classpathentry kind="lib" path="lib/aws-java-sdk-1.10.69.jar"/>
<classpathentry kind="lib" path="lib/aws-java-sdk-flow-build-tools-1.10.69.jar"/>
<classpathentry kind="lib" path="lib/httpclient-4.3.6.jar"/>
<classpathentry kind="lib" path="lib/httpcore-4.3.3.jar"/>
<classpathentry kind="lib" path="lib/google-http-client-1.18.0-rc.jar"/>
<classpathentry kind="lib" path="lib/google-http-client-appengine-1.18.0-rc.jar"/>
<classpathentry kind="lib" path="lib/google-http-client-gson-1.18.0-rc.jar"/>
<classpathentry kind="lib" path="lib/google-http-client-jackson2-1.18.0-rc.jar"/>
<classpathentry kind="lib" path="lib/google-http-client-jdo-1.18.0-rc.jar"/>
<classpathentry kind="lib" path="lib/httpmime-4.1.3.jar"/
完成异常printStack():
java.lang.NoSuchMethodError: org.apache.http.params.HttpConnectionParams.setSoKeepalive(Lorg/apache/http/params/HttpParams;Z)V
at com.amazonaws.http.HttpClientFactory.createHttpClient(HttpClientFactory.java:96) ~[aws-java-sdk-1.10.69.jar:?]
at com.amazonaws.http.AmazonHttpClient.<init>(AmazonHttpClient.java:187) ~[aws-java-sdk-1.10.69.jar:?]
at com.amazonaws.AmazonWebServiceClient.<init>(AmazonWebServiceClient.java:136) ~[aws-java-sdk-1.10.69.jar:?]
at com.amazonaws.AmazonWebServiceClient.<init>(AmazonWebServiceClient.java:120) ~[aws-java-sdk-1.10.69.jar:?]
at com.amazonaws.services.simpleemail.AmazonSimpleEmailServiceClient.<init>(AmazonSimpleEmailServiceClient.java:165) ~[aws-java-sdk-1.10.69.jar:?]
at com.amazonaws.services.simpleemail.AmazonSimpleEmailServiceClient.<init>(AmazonSimpleEmailServiceClient.java:145) ~[aws-java-sdk-1.10.69.jar:?]
at com.fieldoo.service.MailService.send(MailService.java:259) ~[classes/:?]
at com.fieldoo.service.MailService.checkAndSendQueue(MailService.java:222) ~[classes/:?]
at com.fieldoo.service.MailService$$FastClassByCGLIB$$ce530a4.invoke(<generated>) ~[cglib-nodep-2.2.jar:?]
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191) ~[cglib-nodep-2.2.jar:?]
at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:689) ~[org.springframework.aop-3.1.2.RELEASE.jar:3.1.2.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) ~[org.springframework.aop-3.1.2.RELEASE.jar:3.1.2.RELEASE]
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) ~[org.springframework.transaction-3.1.2.RELEASE.jar:3.1.2.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) ~[org.springframework.aop-3.1.2.RELEASE.jar:3.1.2.RELEASE]
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:622) ~[org.springframework.aop-3.1.2.RELEASE.jar:3.1.2.RELEASE]
at com.fieldoo.service.MailService$$EnhancerByCGLIB$$382d8989.checkAndSendQueue(<generated>) ~[cglib-nodep-2.2.jar:?]
at com.fieldoo.controller.ScheduleController.sendEmails(ScheduleController.java:196) ~[classes/:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_04]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_04]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_04]
at java.lang.reflect.Method.invoke(Method.java:601) ~[?:1.7.0_04]
at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:64) ~[org.springframework.context-3.1.2.RELEASE.jar:3.1.2.RELEASE]
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53) [org.springframework.context-3.1.2.RELEASE.jar:3.1.2.RELEASE]
at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81) [org.springframework.context-3.1.2.RELEASE.jar:3.1.2.RELEASE]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [?:1.7.0_04]
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [?:1.7.0_04]
at java.util.concurrent.FutureTask.run(FutureTask.java:166) [?:1.7.0_04]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) [?:1.7.0_04]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) [?:1.7.0_04]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [?:1.7.0_04]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [?:1.7.0_04]
at java.lang.Thread.run(Thread.java:722) [?:1.7.0_04]
此异常由以下代码行引起:
AmazonSimpleEmailServiceClient client = new AmazonSimpleEmailServiceClient(credentials);
其中凭据
是AWS凭据的一个实例。
如果您需要任何其他信息,我很乐意提供。
我也面临着同样的问题。我能够通过制作我的只是制作httpClient的顺序并将其作为我在Project-中的顶级jar来解决它
有同样的问题。我的解决方案是升级AWS版本
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-s3</artifactId>
在的pom.xml中
确保您的核心版本和s3版本相同。
我java.lang.NoSuchmetodError for beforeClientExecution
这对我有用
compile('com.amazonaws:aws-java-sdk-core:1.11.376')
compile('com.amazonaws:aws-java-sdk-s3:1.11.376')
SPARK 2.3抛出以下异常。有人能帮忙吗!!我试着加入罐子 308 [驱动程序] 错误 org.apache.spark.deploy.yarn.ApplicationMaster - 用户类抛出异常:java.lang.NoSuchMethodError: io.netty.buffer.PooledByteBufAllocator.metric()Lio/netty/buffer/Pool
各位, 我试图运行一个简单的spring示例,使用Required 但是,当我运行main method类时,我会得到以下异常跟踪? 线程“main”java中出现异常。lang.NoSuchMethodError:org。springframework。豆。工厂注释。注入元数据。(Ljava/lang/Class;Ljava/util/Collection;)V位于组织。springframew
我在JavaSpring Framework MVC-Hibernate中发布了有关我的一个项目的问题。请看看我下面的代码和文件。我想问题是由1)一些缺失或错误的依赖关系以及2)Hibernate配置中的一些问题引起的。首先,我感谢您的时间和帮助。格雷格 我没有找到这个问题的解决办法。 GRAVE: Sontroller.java:104()的servlet[appServlet]在上下文中与路径
我在构建Spring启动应用程序时出错。我正在使用ES,jestClient调用执行方法时出错。错误: 原因:组织。springframework。豆子。工厂BeanCreationException:创建名为“configService”的bean时出错:调用init方法失败;嵌套异常为java。lang.NoSuchMethodError:io。搜索框。行动行动getURI()Ljava/la
我正在使用ChrisJenx的书法库。今天早上突然我的项目开始抛出奇怪的错误。有人知道吗?我还尝试了查看TintTypeArray.java:119。gradle缓存中的有getFont方法,它是v26.0.2,但在sdk/附加项中没有,它是v25.3.1。我认为gradle缓存代码将用于此,但它仍然是抛出错误。请帮助。 Logcat: 12-06 16:52:40.516 18533-18533
我使用Spring 3.2.6 RELEASE并在将此登录配置放入xml后出错: 这是我的pom。xml: 尝试访问url时出错: Java语言lang.NoSuchMethodError:org。springframework。豆。工厂注释。注入元数据。需求刷新(Lorg/springframework/beans/factory/annotation/InjectionMetadata;Lja
我在我新更新的OS X(现在是Mavericks)中启动了。 现在在Android Studio(也刚刚更新顺便说一句)我收到一条消息 错误:异常生成进程终止:线程“main”java中出现异常。lang.NoSuchMethodError:org。阿帕奇。log4j。PropertyConfiguration。配置(Ljava/io/InputStream;)V在org。喷气式飞机。jps。cm
我无法通过以下链接找到答案 一二三 以下是我的pom.xml依赖 我也看了一遍我的《代码》。m2/repository/javax/ws/rs/javax。ws。rs api目录,但它只包含一个目录。 我不能理解这个问题。 我正在使用Tomcat 8。 堆栈跟踪