Conecte-se ao Office365 Exchange Server com ews-java-api-2.0.jar no Core JAVA

Estou usando o ews-java-api-2.0.jar, para conectar ao office365 e abaixo está o código de exemplo:

package javaapplication6;

import java.net.URI;
import microsoft.exchange.webservices.data.autodiscover.IAutodiscoverRedirectionUrl;

import microsoft.exchange.webservices.data.credential.ExchangeCredentials;
import microsoft.exchange.webservices.data.core.ExchangeService;
import microsoft.exchange.webservices.data.core.enumeration.property.WellKnownFolderName;
import microsoft.exchange.webservices.data.core.service.folder.Folder;
import microsoft.exchange.webservices.data.credential.WebCredentials;

public class JavaApplication6 {

    public static class RedirectionUrlCallback implements IAutodiscoverRedirectionUrl {
        public boolean autodiscoverRedirectionUrlValidationCallback(String redirectionUrl) {
          return redirectionUrl.toLowerCase().startsWith("https://");
        }
    }

    public static ExchangeService connectViaExchangeManually(String email, String password)
      throws Exception {
        ExchangeService service = new ExchangeService();
        ExchangeCredentials credentials = new WebCredentials(email, password);
        service.setUrl(new URI("https://outlook.office365.com/EWS/Exchange.asmx"));
        service.setCredentials(credentials);
        service.setTraceEnabled(true);
        Folder inbox = Folder.bind(service, WellKnownFolderName.Inbox);
        System.out.println("messages: " + inbox.getTotalCount());
        return service;
    }

    public static ExchangeService connectViaExchangeAutodiscover(String email, String password) {
        ExchangeService service = new ExchangeService();
        try {
            service.setCredentials(new WebCredentials(email, password));
            service.autodiscoverUrl(email, new RedirectionUrlCallback());
            service.setTraceEnabled(true);
            Folder inbox = Folder.bind(service, WellKnownFolderName.Inbox);
            System.out.println("messages: " + inbox.getTotalCount());
        }
        catch (Exception e){
            e.printStackTrace();
        }
        return service;
    }
    public static void main(String[] args) {
      try {
        ExchangeService service = connectViaExchangeManually("<name>@<company>.onmicrosoft.com", "<password>");
      } catch (Exception e) {
        e.printStackTrace();
      }
    }

}

Quando executo esse código no Netbeans IDE, obtendo o erro abaixo:

run:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/http/config/Lookup
    at javaapplication6.JavaApplication6.connectViaExchangeAutodiscover(JavaApplication6.java:33)
    at javaapplication6.JavaApplication6.main(JavaApplication6.java:48)
Caused by: java.lang.ClassNotFoundException: org.apache.http.config.Lookup
    at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 2 more
C:\Users\Brijesh Jalan\AppData\Local\NetBeans\Cache\8.1\executor-snippets\run.xml:53: Java returned: 1
BUILD FAILED (total time: 0 seconds)

Estou preso aqui desde 2 dias, qualquer ajuda seria apreciada !!

questionAnswers(1)

yourAnswerToTheQuestion