title: ClassNotFound Exception while trying to use Google OAuth API on Eclipse & Tomcat
body: <p>After adding Google OAuth2 API v. 2 (listed as "preferred") from Google API loader (right click on Project -> Google -> Add Google APIs...) in Eclipse, my servlet fails with following traceback: </p>
  
  <pre><code>java.lang.ClassNotFoundException: com.google.api.client.json.JsonFactory
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
      at com.some.my.backend.MyServlet.myMethod(MyServlet.java:268)
      and so on.
  </code></pre>
  
  <p>Everything compiles OK and "Run on Server" otherwise works normally. I assume something is broken with the way Eclipse deploys the web app to Tomcat.</p>
  
  <p>I also tried to download the Google client zip by hand, unpacked it and added all the jars to the Java Build Path from Project Properties. The result was the same.</p>
  
  <p>I am trying to compile the Checker class <a href="http://android-developers.blogspot.tw/2013/01/verifying-back-end-calls-from-android.html" rel="nofollow">of this article</a>.</p>
  
  <p>Isn't adding Google APIs supposed to be as simple as described above? What am I doing wrong?</p>