Weird thing works on localhost:8080 but not on nlp.homeip.net:29750
is there any ports that are not allowed to connect to Google
Calendar....this was just working last week but not this week???
I have put the printed out the exception and I get: unauthorized!!!!
Exception/UpdateEvent/GoogleBE.java:
com.google.gdata.util.AuthenticationException: Unauthorized
com.google.gdata.util.AuthenticationException: Unauthorized
at
com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(Unknown
Source)
at
com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(Unknown
Source)
at
com.google.gdata.client.http.HttpGDataRequest.checkResponse(Unknown
Source)
at com.google.gdata.client.http.HttpGDataRequest.execute(Unknown
Source)
at com.google.gdata.client.http.GoogleGDataRequest.execute(Unknown
Source)
at com.google.gdata.client.Service.getFeed(Unknown Source)
at com.google.gdata.client.GoogleService.getFeed(Unknown Source)
at com.google.gdata.client.Service.query(Unknown Source)
at com.google.gdata.client.Service.query(Unknown Source)
at Calendar.GoogleBE.getEvents(GoogleBE.java:80)
at Calendar.GoogleBE.addToVector(GoogleBE.java:93)
at Calendar.GoogleBE.removeEvent(GoogleBE.java:190)
at Calendar.GoogleBE.updateEvent(GoogleBE.java:226)
at Calendar.GoogleWeb.AddEvent(GoogleWeb.java:143)
at
org.apache.jsp.src.insertlocation_jsp._jspService(insertlocation_jsp.java:
116)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:
384)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:
320)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
228)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
104)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
216)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
844)
at org.apache.coyote.http11.Http11Protocol
$Http11ConnectionHandler.process(Http11Protocol.java:634)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:
445)
at java.lang.Thread.run(Unknown Source)
however the jsp calls a class:
<jsp:useBean id="cal" class="Calendar.GoogleWeb"/>
answer = cal.AddEvent(frame2, loc);
and in AddEvent I have:
GoogleBE google = new GoogleBE(user, password);
CalendarBE calendar = google;.......
ArrayList test = calendar.updateEvent(type, newtype);
The GoogleBE looks like
public GoogleBE(String username, String password) throws Exception
{
try{
calendarService = new CalendarService("stonybrook-
RavenCalendar-1");
calendarService.setUserCredentials(username,
password);
privateFeedUrl = new URL(CALENDAR_FEEDS_URL + "/
default/private/full");
System.out.println("Logged in!!!!!!!");
}
catch(Exception e){
System.out.println("Exception in Login: "+e);
e.printStackTrace();
}
}
updateEvent looks like
CalendarQuery myQuery = new CalendarQuery(privateFeedUrl);
myQuery.setMinimumStartTime(info.getStartDate());
myQuery.setMaximumStartTime(info.getEndDate());
CalendarEventFeed resultFeed =
calendarService.query(myQuery, CalendarEventFeed.class);
return resultFeed;
and this is where I get the error in the query....in the
calendarService.query????
Please anyone help!!!!!
On Apr 23, 10:56 pm, "Lane LiaBraaten (Google)"
<[EMAIL PROTECTED]> wrote:
> Hi Basia,
>
> The setUserCredentials method throws an AuthenticationException if the
> CalendarService is not able to validate the user's credentials. There
> are several subclasses of AuthenticationException that may be thrown,
> depending on what went wrong.
>
> You may want to print out the cause of the exception using the
> printStackTrace method:
>
> catch(Exception e){
> System.out.println("Cannot set Credentials in update Event
> of GoogleWeb");
> e.printStackTrace();
> return false;
> }
>
> Once you have the error message you can find more information about
> the ClientLogin errors
> here:http://code.google.com/apis/accounts/AuthForInstalledApps.html#Errors
>
> Hope that helps,
> Lane
>
> On Apr 23, 1:21 pm, Basia <[EMAIL PROTECTED]> wrote:
>
> > I have a java application that queries events from
> > googlecalendar....in addition i have created a jsp page that queries
> > events from googlecalendar. Since yesterday the jsp page is not
> > working. It goes to the exception "Cannot set Credentials in update
> > Event of GoogleWeb"....did something change on the Google Calendar API
> > side?
>
> > code is below:
>
> > String CALENDAR_FEEDS_URL = "http://www.google.com/calendar/
> > feeds";
> > CalendarService calendarService;
> > try{
> > URL privateFeedUrl = new URL(CALENDAR_FEEDS_URL + "/
> > default/private/full");
> > }
> > catch(Exception e){
> > System.out.println("Cannot set private feed url in update
> > Event of GoogleWeb");
> > return false;
> > }
> > calendarService = new CalendarService("stonybrook-
> > RavenCalendar-1");
> > try{
>
> > calendarService.setUserCredentials("[EMAIL PROTECTED]",
> > "XXXXXXXXXX");
> > }
> > catch(Exception e){
> > System.out.println("Cannot set Credentials in update Event
> > of GoogleWeb");
> > return false;
> > }
>
> > CalendarQuery myQuery = new CalendarQuery(privateFeedUrl);
> > myQuery.setMinimumStartTime(info.getStartDate());
> > myQuery.setMaximumStartTime(info.getEndDate());
>
> > CalendarEventFeed resultFeed;
> > try{
> > resultFeed = calendarService.query(myQuery,
> > CalendarEventFeed.class);
> > }
> > catch(Exception e){
> > System.out.println("Cannot query in update Event of
> > GoogleWeb");
> > return false;
> > }
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Calendar Data API" 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-calendar-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---