NoSuchMethodError: com.google.common.base.Joiner.with…

记录一次异常:

“exception”:"java.lang.NoSuchMethodError: com.google.common.base.Joiner.withKeyValueSeparator©Lcom/google/common/base/Joiner$MapJoiner;\n\tat com.alibaba.cloudapi.sdk.core.util.SignUtil.buildHeaders(SignUtil.java:174)\n\tat com.alibaba.cloudapi.sdk.core.util.SignUtil.combineParamsTogether(SignUtil.java:109)\n\tat com.alibaba.cloudapi.sdk.core.util.SignUtil.sign(SignUtil.java:65)\n\tat com.alibaba.cloudapi.sdk.core.BaseApiClient.buildHttpRequest(BaseApiClient.java:187)\n\tat com.alibaba.cloudapi.sdk.core.BaseApiClient.syncInvoke(BaseApiClient.java:246)\n\tat …

刚才帮一个同学弄一个阿里云对接的系统,报了一个错

解决办法:

添加guava依赖即可

  1. <dependency>
  2.     <groupId>com.aliyun.api.gateway</groupId>
  3.     <artifactId>sdk-core-java</artifactId>
  4.     <version>1.0.4</version>
  5. </dependency>
  6. <dependency>
  7.     <groupId>com.alibaba</groupId>
  8.     <artifactId>fastjson</artifactId>
  9.     <version>1.2.54</version>
  10. </dependency>
  11. <dependency>
  12.     <groupId>com.google.guava</groupId>
  13.     <artifactId>guava</artifactId>
  14.     <version>20.0</version>
  15. </dependency>

  • 微信
  • 交流学习,有偿服务
  • weinxin
  • 博客/Java交流群
  • 资源分享,问题解决,技术交流。群号:590480292
  • weinxin
言曌

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: