有赞新零售社区

发帖
API使用问题»报错Exception in thread "main"

报错Exception in thread "main"

有赞-导演 2018-10-20 3861 浏览 0 评论 | 只看楼主 [打印]
说明:

  如果您在使用有赞SDK报错:

  1. Exception in thread "main" java.lang.NoSuchMethodError: org.apache.http.conn.ssl.SSLConnectionSocketFactory
复制代码
   

解决方案:

  是ssl这个包的版本不对,有赞SDK所需要依赖的第三方包的版本如下:

  1. <dependency>
  2.             <groupId>org.apache.httpcomponents</groupId>
  3.             <artifactId>httpclient</artifactId>
  4.             <version>4.5.2</version>
  5.         </dependency>

  6.         <dependency>
  7.             <groupId>org.apache.httpcomponents</groupId>
  8.             <artifactId>httpcore</artifactId>
  9.             <version>4.4.5</version>
  10.         </dependency>

  11.         <dependency>
  12.             <groupId>org.apache.httpcomponents</groupId>
  13.             <artifactId>httpmime</artifactId>
  14.             <version>4.5.2</version>
  15.         </dependency>

  16.         <dependency>
  17.             <groupId>org.apache.commons</groupId>
  18.             <artifactId>commons-io</artifactId>
  19.             <version>1.3.2</version>
  20.         </dependency>

  21.         <dependency>
  22.             <groupId>org.apache.commons</groupId>
  23.             <artifactId>commons-lang3</artifactId>
  24.             <version>3.4</version>
  25.         </dependency>

  26.         <dependency>
  27.             <groupId>com.google.guava</groupId>
  28.             <artifactId>guava</artifactId>
  29.             <version>19.0</version>
  30.         </dependency>

  31.         <dependency>
  32.             <groupId>org.codehaus.jackson</groupId>
  33.             <artifactId>jackson-mapper-asl</artifactId>
  34.             <version>1.9.13</version>
  35.         </dependency>

  36.         <dependency>
  37.             <groupId>com.fasterxml.jackson.core</groupId>
  38.             <artifactId>jackson-databind</artifactId>
  39.             <version>2.9.4</version>
  40.         </dependency>
复制代码






本帖最后由 有赞-导演 于 2018-10-19 17:33 编辑
用手机打开
收藏 ··· 回复
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    复制链接
    新浪微博
    QQ空间
    微信扫码
    • 回复

    • 评分

    客服工作时间是9:00-18:00,客服妹子当前不在线,若不能及时回复请谅解。试试右上角的搜索吧,论坛有丰富的经验贴、公告贴,相信一定能够帮到您~

    复制成功