[google-appengine] The API package 'urlfetch' or call 'Fetch()' was not found.

816 views
Skip to first unread message

Ajay Chitre

unread,
Apr 28, 2010, 1:34:00 AM4/28/10
to google-a...@googlegroups.com
Hello,

I created a GWT application, tested it locally and later deployed it on Appengine.  Everything was working well.  Later I added code that uses SDC (Secure Data Connector).  It looks something like this..

      URLFetchService fetcher = URLFetchServiceFactory.getURLFetchService();
      URL dataURL = new URL("http://localhost:8182/jobs?arg1=1&arg2=1");
      HTTPRequest fetchreq = new HTTPRequest(dataURL);
      HTTPResponse resp = fetcher.fetch(fetchreq);

Every time I run it, the fetcher.fetch method throws an exception that says... "com.google.apphosting.api.ApiProxy$CallNotFoundException: The API package 'urlfetch' or call 'Fetch()' was not found."

I tried changing the classpath, but nothing seems to help.

I created a separate GWT application given in the tutorial and added the above code to it.  It works just fine, which implies that something is wrong with my project setup... missing jar in Classpath.. or something like that.

Please help.  Thanks.


--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.

Ajay Chitre

unread,
Apr 30, 2010, 1:02:27 AM4/30/10
to google-a...@googlegroups.com
Just to close the loop on this one...  the problem was that I was starting GWT 'DevMode' as a Java application in Eclipse.  After I started it as a 'Google Web Application', the SDC started working!
Reply all
Reply to author
Forward
0 new messages