Re: Google Calendar API: NoClassDefFoundError AuthenticationException

2009-07-31 Thread JesperA

The solution was to put all the gdata**.jar files into the war/WEB-INF/
lib directory in my Eclipse GWT project.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Google Calendar API: NoClassDefFoundError AuthenticationException

2009-07-29 Thread JesperA

Hi!
I'm trying to get feed data from the Google Calendar API.
To the Eclipse project I have added the following libs (Java Build
Path)
gdata-calendar-2.0.jar
gdata-calendar-meta-2.0.jar
gdata-client-1.0.jar
gdata-client-meta-1.0.jar
gdata-core-1.0.jar
google-collect-1.0-rc1.jar
Google Data Plugin
GWT 1.7.0
App Engine 1.2.2

Code:
==
...
...
// Create a new Calendar service
myService = new CalendarService(My Application);
myService.setUserCredentials(sUserName, sPassword);
URL feedUrl = null;
try {
feedUrl = new URL(

http://www.google.com/calendar/feeds/default/allcalendars/
full);
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
CalendarFeed resultFeed = null;
try {
resultFeed = myService.getFeed(feedUrl,
CalendarFeed.class);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (ServiceException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

for (int i = 0; i  resultFeed.getEntries().size(); i++) {
CalendarEntry entry = resultFeed.getEntries().get(i);
if (entry.getTitle().getPlainText().startsWith
(sCalendarStartsWith)) {
System.out.println(\t + 
entry.getTitle().getPlainText());

ListLink links = entry.getLinks();
for (Link link : links) {
System.out.println(\t + 
link.getRel());
System.out.println(\t + 
link.getHref());
}
setCalendarUrl(links.get(0).getHref());
}
}

...

Error:
==
The server is running at http://localhost:8080/
29-Jul-2009 14:12:35 com.google.apphosting.utils.jetty.JettyLogger
warn
WARNING: Nested in javax.servlet.ServletException: init:
java.lang.NoClassDefFoundError: com/google/gdata/util/
AuthenticationException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
at java.lang.Class.getConstructor0(Class.java:2699)
at java.lang.Class.newInstance0(Class.java:326)
at java.lang.Class.newInstance(Class.java:308)
at org.mortbay.jetty.servlet.Holder.newInstance(Holder.java:153)
at org.mortbay.jetty.servlet.ServletHolder.getServlet
(ServletHolder.java:339)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
463)
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:124)
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:313)
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.content
(HttpConnection.java:844)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
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

Re: Google Calendar API: NoClassDefFoundError AuthenticationException

2009-07-29 Thread JesperA

Forgot to say...
Using the same code in a general Java application works perfect.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Google Calendar API: NoClassDefFoundError AuthenticationException

2009-07-29 Thread JesperA

After some debugging i found where the Exception is thrown:
   com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(Object,
Method, Object[], SerializationPolicy)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---