java.lang.NoClassDefFoundError: com/google/gdata/client/GoogleService

469 views
Skip to first unread message

Cesar

unread,
May 22, 2012, 2:09:26 PM5/22/12
to google-co...@googlegroups.com
I've created a web applicattion in eclipse with app engine, is an example with contacts, but when I deploy my app, i get the error: 
java.lang.NoClassDefFoundError: com/google/gdata/client/GoogleService
at com.google.appengine.runtime.Request.process-3cbbd54696308062(Request.java)
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
....... 
I've installed the library of gdata located in  http://code.google.com/p/gdata-java-client/downloads/list.

Mi code is the following:

import com.google.appengine.api.users.User;
import com.google.appengine.api.users.UserService;
import com.google.appengine.api.users.UserServiceFactory;
import com.google.gdata.client.GoogleService;
import com.google.gdata.client.*;
import com.google.gdata.client.contacts.ContactsService;
import com.google.gdata.client.contacts.*;
import com.google.gdata.data.*;
import com.google.gdata.data.contacts.ContactFeed;
import com.google.gdata.data.contacts.*;
import com.google.gdata.data.extensions.*;
import com.google.gdata.util.*;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class Testeando extends HttpServlet {
public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
resp.getWriter().println("testing"); 
try {
   ContactsService myService = new ContactsService("example");

} catch (Exception e) {
resp.getWriter().println(e.getMessage());
}
}
}

The error ocurrs at: ContactsService myService = new ContactsService("example");

Please help me what happend with my code or what I have to do?

Alain Vongsouvanh

unread,
Jun 1, 2012, 11:40:35 AM6/1/12
to google-co...@googlegroups.com
Hello,

This means that you are missing some .jars in your classpath. I'm not an expert on Google App Engine with Java, you should ask on their forum where to put the .jars and how to set your classpath.

Best,
Alain


--
You received this message because you are subscribed to the Google
Groups "Google Contacts, Shared Contacts and User Profiles APIs" group.
To post to this group, send email to
google-co...@googlegroups.com
To unsubscribe from this group, send email to
google-contacts...@googlegroups.com
For more options, visit this group at
http://code.google.com/apis/contacts/community/forum.html



--
Alain Vongsouvanh | Developer Programs Engineer
Reply all
Reply to author
Forward
0 new messages