有赞新零售社区

发帖
API使用问题»请求各种接口都报错

请求各种接口都报错

49a609291fe8 2018-12-04 864 浏览 1 评论 | 只看楼主 [打印]
java sdk2.0.2,

OAuth oauth = OAuthFactory.create(OAuthType.SELF, new OAuthContext("clientId", "clientSecret", 111L));
System.out.println(JsonUtils.toJson(oauth.getToken()));报错



YZClient client = new DefaultYZClient(new Token("")); //new Sign(appKey, appSecret)
YouzanItemsInventoryGetParams youzanItemsInventoryGetParams = new YouzanItemsInventoryGetParams();

youzanItemsInventoryGetParams.setPageNo(1L);
youzanItemsInventoryGetParams.setPageSize(10L);
youzanItemsInventoryGetParams.setOrderBy("asc");

YouzanItemsInventoryGet youzanItemsInventoryGet = new YouzanItemsInventoryGet();
youzanItemsInventoryGet.setAPIParams(youzanItemsInventoryGetParams);
YouzanItemsInventoryGetResult result = client.invoke(youzanItemsInventoryGet);
也报错

Exception in thread "main" java.lang.VerifyError: class com.youzan.open.sdk.util.json.MyNumberDeserializers$BooleanDeserializer overrides final method _parseBoolean.(Lcom/fasterxml/jackson/core/JsonParser;Lcom/fasterxml/jackson/databind/DeserializationContext;)Ljava/lang/Boolean;


用手机打开
收藏 ··· 回复
    client.invoke 替换成client.execute试试

      1跳至
      您需要登录后才可以回帖 登录 | 立即注册

      本版积分规则

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

      • 评分

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

      复制成功