创建aws S3客户端时maven依赖冲突java.lang.NoSuchMethodError:org.apache.http.conn.ssl.SSLConnectionSocketFactory错误

时间:2016-11-14 11:42:18

标签: java apache ssl amazon-s3

当我尝试创建amazon S3客户端时,我收到以下错误。它工作得更早,在我完成了很少的代码后,我看到了这个错误。我觉得这可能是一些依赖冲突但无法找到它。尝试很多东西,但没有什么可以帮助。

java.lang.NoSuchMethodError: org.apache.http.conn.ssl.SSLConnectionSocketFactory.<init>(Ljavax/net/ssl/SSLContext;Ljavax/net/ssl/HostnameVerifier;)V
        at com.amazonaws.http.conn.ssl.SdkTLSSocketFactory.<init>(SdkTLSSocketFactory.java:56)
        at com.amazonaws.http.apache.client.impl.ApacheConnectionManagerFactory.getPreferredSocketFactory(ApacheConnectionManagerFactory.java:91)
        at com.amazonaws.http.apache.client.impl.ApacheConnectionManagerFactory.create(ApacheConnectionManagerFactory.java:65)
        at com.amazonaws.http.apache.client.impl.ApacheConnectionManagerFactory.create(ApacheConnectionManagerFactory.java:58)
        at com.amazonaws.http.apache.client.impl.ApacheHttpClientFactory.create(ApacheHttpClientFactory.java:51)
        at com.amazonaws.http.apache.client.impl.ApacheHttpClientFactory.create(ApacheHttpClientFactory.java:39)
        at com.amazonaws.http.AmazonHttpClient.<init>(AmazonHttpClient.java:301)
        at com.amazonaws.AmazonWebServiceClient.<init>(AmazonWebServiceClient.java:164)
        at com.amazonaws.services.s3.AmazonS3Client.<init>(AmazonS3Client.java:523)
        at com.amazonaws.services.s3.AmazonS3Client.<init>(AmazonS3Client.java:503)
        at com.amazonaws.services.s3.AmazonS3Client.<init>(AmazonS3Client.java:485)
        at com.amazonaws.services.s3.AmazonS3Client.<init>(AmazonS3Client.java:457)
        at com.amazonaws.services.s3.AmazonS3Client.<init>(AmazonS3Client.java:439)
        at com.ge.hc.cloud.e2e.workflows.steps.BasicWorkflowSteps.<clinit>(BasicWorkflowSteps.java:72)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:348)
        at net.sf.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:386)
        at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:219)
        at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
        at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:285)
        at net.thucydides.core.steps.StepFactory.webEnabledStepLibrary(StepFactory.java:201)
        at net.thucydides.core.steps.StepFactory.createProxyStepLibrary(StepFactory.java:164)
        at net.thucydides.core.steps.StepFactory.instantiateNewStepLibraryFor(StepFactory.java:117)
        at net.thucydides.core.steps.StepFactory.instantiateNewStepLibraryFor(StepFactory.java:109)
        at net.thucydides.core.steps.StepFactory.getNewStepLibraryFor(StepFactory.java:77)
        at net.thucydides.core.steps.StepFactory.getStepLibraryFor(StepFactory.java:72)
        at net.thucydides.core.steps.StepAnnotations.instantiateAnyUnitiaializedSteps(StepAnnotations.java:52)
        at net.thucydides.core.steps.StepAnnotations.instanciateScenarioStepFields(StepAnnotations.java:41)
        at net.thucydides.core.steps.StepAnnotations.injectScenarioStepsInto(StepAnnotations.java:23)
        at net.serenitybdd.jbehave.SerenityStepFactory.createInstanceOfType(SerenityStepFactory.java:80)
        at org.jbehave.core.steps.StepCreator.stepsInstance(StepCreator.java:83)
        at org.jbehave.core.steps.StepCreator$ParametrisedStep.perform(StepCreator.java:595)
        at org.jbehave.core.embedder.StoryRunner$FineSoFar.run(StoryRunner.java:566)

感谢任何帮助。

0 个答案:

没有答案