Phoenixasuga / google-api-java-client

Automatically exported from code.google.com/p/google-api-java-client
0 stars 0 forks source link

Attempt to Run Downloaded Project Fails -- Missing Code #538

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Version of google-api-java-client (e.g. 1.5.0-beta)?

Java environment (e.g. Java 6, Android 2.3, App Engine)?

Describe the problem.

How would you expect it to be fixed?

I am trying to run the project on my instance of the Google App Engine, but it 
fails since it appears to be missing some code. Could a full project be posted?

WARNING: Failed startup of context 
com.google.appengine.tools.development.DevAppEngineWebAppContext@4d926d59{/,C:\U
sers\Yuki\workspace\calendar-appengine-sample\target\war}
org.mortbay.util.MultiException[java.lang.NoClassDefFoundError: 
com/google/api/client/extensions/appengine/auth/oauth2/AbstractAppEngineAuthoriz
ationCodeServlet, java.lang.NoClassDefFoundError: 
com/google/api/client/extensions/appengine/auth/oauth2/AbstractAppEngineAuthoriz
ationCodeCallbackServlet]

Thanks,

Original issue reported on code.google.com by JohnGabr...@gmail.com on 24 Jun 2012 at 1:26

GoogleCodeExporter commented 9 years ago
This is for the Google Calendar App project on the Google App Engine.  
http://samples.google-api-java-client.googlecode.com/hg/calendar-appengine-sampl
e/instructions.html

Thanks,

Original comment by JohnGabr...@gmail.com on 24 Jun 2012 at 1:27

GoogleCodeExporter commented 9 years ago
I have the same problem. I included the latest version (1.10.3) of 
api-java-client, I am running on eclipse juno with java 7.

This is my stack:

jul 20, 2012 10:41:34 AM com.google.apphosting.utils.jetty.JettyLogger info
INFO: Logging to JettyLogger(null) via 
com.google.apphosting.utils.jetty.JettyLogger
jul 20, 2012 10:41:34 AM 
com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed 
C:\eclipsedata\workspace\gaCalendarApp\CalendarToday\war\WEB-INF/appengine-web.x
ml
jul 20, 2012 10:41:34 AM 
com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed 
C:\eclipsedata\workspace\gaCalendarApp\CalendarToday\war\WEB-INF/web.xml
jul 20, 2012 10:41:36 AM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: failed CalendarToday: java.lang.NoClassDefFoundError: 
com/google/api/client/extensions/appengine/auth/oauth2/AbstractAppEngineAuthoriz
ationCodeServlet
jul 20, 2012 10:41:36 AM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: failed 
com.google.appengine.tools.development.DevAppEngineWebAppContext@40541d79{/,C:\e
clipsedata\workspace\gaCalendarApp\CalendarToday\war}: 
java.lang.NoClassDefFoundError: 
com/google/api/client/extensions/appengine/auth/oauth2/AbstractAppEngineAuthoriz
ationCodeServlet
jul 20, 2012 10:41:36 AM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: failed JettyContainerService$ApiProxyHandler@55c8a526: 
java.lang.NoClassDefFoundError: 
com/google/api/client/extensions/appengine/auth/oauth2/AbstractAppEngineAuthoriz
ationCodeServlet
jul 20, 2012 10:41:36 AM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: Error starting handlers
java.lang.NoClassDefFoundError: 
com/google/api/client/extensions/appengine/auth/oauth2/AbstractAppEngineAuthoriz
ationCodeServlet
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at org.mortbay.util.Loader.loadClass(Loader.java:91)
    at org.mortbay.util.Loader.loadClass(Loader.java:71)
    at org.mortbay.jetty.servlet.Holder.doStart(Holder.java:73)
    at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:242)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:685)
    at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
    at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
    at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
    at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
    at org.mortbay.jetty.Server.doStart(Server.java:224)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:197)
    at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:241)
    at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:148)
    at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:259)
    at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)
    at com.google.appengine.tools.development.DevAppServerMain.<init>(DevAppServerMain.java:162)
    at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:138)
Caused by: java.lang.ClassNotFoundException: 
com.google.api.client.extensions.appengine.auth.oauth2.AbstractAppEngineAuthoriz
ationCodeServlet
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 35 more

Original comment by jhbell...@gmail.com on 20 Jul 2012 at 10:55

GoogleCodeExporter commented 9 years ago
I was able to start the application without errors.
After following the procedure to install the calendar example and importing the 
project (calendar-appengine-sample into Eclipse, I moved all the stuff under 
src/main/webapp/WEB-INF to target/war/WEB-INF
After that I copied all the jar's in for example the package 
google-api-services-calendar-v3-rev11-1.7.2-beta to target/war/WEB-INF/lib. 
After a refresh and restarting eclipse, the application is started without 
classdef errors.

Original comment by jhbell...@gmail.com on 27 Jul 2012 at 10:59

GoogleCodeExporter commented 9 years ago

Original comment by rmis...@google.com on 14 Jan 2013 at 3:31

GoogleCodeExporter commented 9 years ago

Original comment by yan...@google.com on 14 Jan 2013 at 4:24

GoogleCodeExporter commented 9 years ago
running "mvn war:exploded" solves this issue. I am not sure if there is an easy 
way to make it part of the eclipse build.

Original comment by NikolayM...@gmail.com on 25 Aug 2013 at 10:21

GoogleCodeExporter commented 9 years ago
instructions.html say you need to run "mvn package" before importing into 
Eclipse.

Original comment by yan...@google.com on 26 Aug 2013 at 10:30