【问题标题】:JAVA EWS item.load throws The request failed. Connection is still allocatedJAVA EWS item.load throws 请求失败。连接仍然被分配
【发布时间】:2016-06-28 11:41:51
【问题描述】:

我希望有人可以帮助我。 我正在使用 EWS Java API 构建 Web 客户端电子邮件。

这是引发异常的代码sn-p:

if (mailList != null){
                for (Item item : mailList.getItems()){      
                    synchronized (item) {
                        es = Utils.initiateExchangeService(mailAccountData);
                        em = EmailMessage.bind(es, item.getId(), emPropSet);
                        item.load(new PropertySet(BasePropertySet.FirstClassProperties));

引发异常的行是:
item.load(new PropertySet(BasePropertySet.FirstClassProperties));

我知道,当我们使用 ExchangeService 类的相同实例时,通常会引发此异常,但这里不会。

感谢任何帮助

【问题讨论】:

    标签: java exchangewebservices


    【解决方案1】:

    到目前为止,唯一的解决方案似乎是使用单个 ExchangeService 实例并同步访问它(一次只允许一个线程)。

    https://github.com/OfficeDev/ews-java-api/issues/276

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-04-27
      • 2016-08-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-11-02
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多