Josh, This line:
java.lang.NoClassDefFoundError: Could not initialize class com.google.gdata.client.http.GoogleGDataRequest Tells me that the issue is with your build environment not being able to resolve these files. Including JAR files in your lib directory ensures that classes in these JAR files will be resolved when the application is deployed to App Engine, however, it does not mean that it will necessarily work in your local environment. The JAR files may be in your classpath, but if you are using an IDE, the IDE may override the default CLASSPATH variable for your system. The safest thing to do is to go into your IDE settings and make sure that the JAR files are being included in your build. Can you give that a try and let us know what happens? On Tue, Nov 10, 2009 at 5:54 PM, Josh <[email protected]> wrote: > > Hi, > > I've been playing around with google app engine and I'm running into > some problems with trying to to request a contact data feed. Here is > a snippet of my code: > > String urlFromAuthSub = req.getQueryString(); > String token = AuthSubUtil.getTokenFromReply > (urlFromAuthSub); > String sessionToken = null; > > sessionToken = AuthSubUtil.exchangeForSessionToken > (token, null); > > ContactsService myService = new ContactsService > ("contacts-app-v1"); > myService.setAuthSubToken(sessionToken, null); > > URL feedUrl = new URL(http://www.google.com/m8/feeds/ > contacts/default/full); > Query myQuery = new Query(feedUrl); > > // Next line fails > ContactFeed resultFeed = myService.query(myQuery, > ContactFeed.class); > > When I run, I get this error: > > HTTP ERROR: 500 > > Could not initialize class > com.google.gdata.client.http.GoogleGDataRequest > > RequestURI=/view > Caused by: > > java.lang.NoClassDefFoundError: Could not initialize class > com.google.gdata.client.http.GoogleGDataRequest > at com.google.gdata.client.http.GoogleGDataRequest > $Factory.createRequest(GoogleGDataRequest.java:73) > at com.google.gdata.client.http.HttpGDataRequest > $Factory.getRequest > (HttpGDataRequest.java:162) > at com.google.gdata.client.http.HttpGDataRequest > $Factory.getRequest > (HttpGDataRequest.java:168) > at com.google.gdata.client.Service.createRequest(Service.java: > 713) > at com.google.gdata.client.GoogleService.createRequest > (GoogleService.java:535) > at com.google.gdata.client.Service.createFeedRequest > (Service.java: > 1174) > at com.google.gdata.client.Service.getFeed(Service.java:994) > at com.google.gdata.client.GoogleService.getFeed > (GoogleService.java: > 662) > at com.google.gdata.client.Service.query(Service.java:1155) > at com.google.gdata.client.Service.query(Service.java:1096) > at contacts.ViewContacts.doGet(ViewContacts.java:53) > at javax.servlet.http.HttpServlet.service(HttpServlet.java: > 693) > at javax.servlet.http.HttpServlet.service(HttpServlet.java: > 806) > at org.mortbay.jetty.servlet.ServletHolder.handle > (ServletHolder.java: > 487) > at org.mortbay.jetty.servlet.ServletHandler > $CachedChain.doFilter > (ServletHandler.java:1093) > at > com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter > (TransactionCleanupFilter.java:43) > at org.mortbay.jetty.servlet.ServletHandler > $CachedChain.doFilter > (ServletHandler.java:1084) > at > com.google.appengine.tools.development.StaticFileFilter.doFilter > (StaticFileFilter.java:121) > at org.mortbay.jetty.servlet.ServletHandler > $CachedChain.doFilter > (ServletHandler.java:1084) > at org.mortbay.jetty.servlet.ServletHandler.handle > (ServletHandler.java:360) > at org.mortbay.jetty.security.SecurityHandler.handle > (SecurityHandler.java:216) > at org.mortbay.jetty.servlet.SessionHandler.handle > (SessionHandler.java:181) > at org.mortbay.jetty.handler.ContextHandler.handle > (ContextHandler.java:712) > at org.mortbay.jetty.webapp.WebAppContext.handle > (WebAppContext.java: > 405) > at > com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle > (DevAppEngineWebAppContext.java:54) > at org.mortbay.jetty.handler.HandlerWrapper.handle > (HandlerWrapper.java:139) > at > com.google.appengine.tools.development.JettyContainerService > $ApiProxyHandler.handle(JettyContainerService.java:342) > at org.mortbay.jetty.handler.HandlerWrapper.handle > (HandlerWrapper.java:139) > at org.mortbay.jetty.Server.handle(Server.java:313) > at org.mortbay.jetty.HttpConnection.handleRequest > (HttpConnection.java: > 506) > at org.mortbay.jetty.HttpConnection > $RequestHandler.headerComplete > (HttpConnection.java:830) > at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514) > at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java: > 211) > at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java: > 381) > at org.mortbay.io.nio.SelectChannelEndPoint.run > (SelectChannelEndPoint.java:396) > at org.mortbay.thread.BoundedThreadPool$PoolThread.run > (BoundedThreadPool.java:442) > > I have these jars in my classpath and in my \war\WEB-INF\lib folder > > gdata-core-1.0.jar > gdata-client-meta-1.0.jar > gdata-client-1.0.jar > gdata-contacts-meta-3.0.jar > gdata-contacts-3.0.jar > gdata-base-1.0.jar > jrs305.jar > google-collect-1.0-rc1.jar > > > > -- Ikai Lan Developer Programs Engineer, Google App Engine --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~----------~----~----~----~------~----~------~--~---
