I have a project that make use of Google Calendar API, in this PC I have configured tomcat and I can run it without problems, but when I try to run this on another PC I start getting a Exception, the other's PC doesn't have tomcat installed, because they're my clients PC's, the question is, do I need to install and configure tomcat even in the client's PC's? or Im missing a .jar to add to the classpath? I used a code to check the classhpath of the current project and all the jars are correctly in my 'lib' folder, What can I do?
this is the Exception:
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest
at com.google.api.client.extensions.jetty.auth.oauth2.LocalServerReceiver.getRedirectUri(LocalServerReceiver.java:98)
at com.google.api.client.extensions.java6.auth.oauth2.AuthorizationCodeInstalledApp.authorize(AuthorizationCodeInstalledApp.java:76)
at control.GoogleCalendar2.authorize(GoogleCalendar2.java:132)
at control.GoogleCalendar2.<init>(GoogleCalendar2.java:54)
at Formas.Principal.<init>(Principal.java:37)
at Formas.Principal$11.run(Principal.java:376)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:744)
at java.awt.EventQueue.access$400(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:697)
at java.awt.EventQueue$3.run(EventQueue.java:691)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:714)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.ClassNotFoundException: javax.servlet.http.HttpServletRequest
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)
... 20 more
and my classpath for this project is this:
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/commons-logging-1.1.1-sources.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/commons-logging-1.1.1.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/google-api-client-1.17.0-rc-sources.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/google-api-client-1.17.0-rc.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/google-api-client-android-1.17.0-rc-sources.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/google-api-client-android-1.17.0-rc.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/google-api-client-appengine-1.17.0-rc-sources.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/google-api-client-appengine-1.17.0-rc.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/google-api-client-gson-1.17.0-rc-sources.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/google-api-client-gson-1.17.0-rc.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/google-api-client-jackson2-1.17.0-rc-sources.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/google-api-client-jackson2-1.17.0-rc.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/google-api-client-java6-1.17.0-rc-sources.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/google-api-client-java6-1.17.0-rc.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/google-api-client-servlet-1.17.0-rc-sources.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/google-api-client-servlet-1.17.0-rc.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/google-api-services-calendar-v3-rev76-1.17.0-rc-sources.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/google-api-services-calendar-v3-rev76-1.17.0-rc.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/google-http-client-1.17.0-rc-sources.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/google-http-client-1.17.0-rc.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/google-http-client-android-1.17.0-rc-sources.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/google-http-client-android-1.17.0-rc.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/google-http-client-appengine-1.17.0-rc-sources.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/google-http-client-appengine-1.17.0-rc.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/google-http-client-gson-1.17.0-rc-sources.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/google-http-client-gson-1.17.0-rc.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/google-http-client-jackson2-1.17.0-rc-sources.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/google-http-client-jackson2-1.17.0-rc.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/google-http-client-jdo-1.17.0-rc-sources.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/google-http-client-jdo-1.17.0-rc.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/google-oauth-client-1.17.0-rc-sources.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/google-oauth-client-1.17.0-rc.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/google-oauth-client-appengine-1.17.0-rc-sources.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/google-oauth-client-appengine-1.17.0-rc.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/google-oauth-client-java6-1.17.0-rc-sources.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/google-oauth-client-java6-1.17.0-rc.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/google-oauth-client-jetty-1.17.0-rc-sources.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/google-oauth-client-jetty-1.17.0-rc.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/google-oauth-client-servlet-1.17.0-rc-sources.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/google-oauth-client-servlet-1.17.0-rc.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/gson-2.1-sources.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/gson-2.1.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/jackson-core-2.1.3-sources.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/jackson-core-2.1.3.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/javax.mail.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/jcalendar-1.4.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/jdo2-api-2.3-eb-sources.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/jdo2-api-2.3-eb.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/jetty-6.1.26-sources.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/jetty-6.1.26.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/jetty-util-6.1.26-sources.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/jetty-util-6.1.26.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/json-simple-1.1.1.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/jsr305-1.3.9.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/transaction-api-1.1-sources.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/transaction-api-1.1.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/commons-codec-1.6.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/commons-logging-1.1.3.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/fluent-hc-4.3.4.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/httpclient-4.3.4.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/httpclient-cache-4.3.4.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/httpcore-4.3.2.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/httpmime-4.3.4.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/lib/guava-17.0.jar
/Users/josemiguelledonnieblas/NetBeansProjects/capaPresentacion_expeDiente/build/classes/
I know there's a lot of jars, but when I downloaded the java class library for Google Calendar I just added all the jars to avoid problems.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…