Hi!
I am facing an error when running a test code to access the calendar.
I haven't tried using windows though, but it gives me the error on
Ubuntu. I am using jdk1.5 to compile the code and execute it. This is
a runtime error. Although, there's a similar discussion about the same
error, I did not find any solutions there.
Here's my code. It's a simple code just for test purpose:
import com.google.gdata.client.*;
import com.google.gdata.client.calendar.*;
import com.google.gdata.data.*;
import com.google.gdata.data.acl.*;
import com.google.gdata.data.calendar.*;
import com.google.gdata.data.extensions.*;
import com.google.gdata.util.*;
import java.net.URL;
class AddCalendarEvent {
public static void main(String args[]) {
try{
CalendarService myService = new CalendarService("example");
myService.setUserCredentials("username", "password");
// Send the request and print the response
URL feedUrl = new URL("http://www.google.com/calendar/feeds/
default/owncalendars/full");
CalendarFeed resultFeed = myService.getFeed(feedUrl,
CalendarFeed.class);
System.out.println("Calendars you own:");
System.out.println();
for (int i = 0; i < resultFeed.getEntries().size(); i++) {
CalendarEntry entry = resultFeed.getEntries().get(i);
System.out.println("\t" + entry.getTitle().getPlainText());
}
}
catch ( Exception e ) {
e.printStackTrace();
}
}
}
The code compiles without any errors. But here's the error when I
execute it:
:~# java AddCalendarEvent
Exception in thread "main" java.lang.ExceptionInInitializerError
at java.lang.Class.initializeClass(libgcj.so.70)
at com.google.gdata.client.Service.<init>(Unknown Source)
at com.google.gdata.client.GoogleService.<init>(Unknown Source)
at com.google.gdata.client.calendar.CalendarService.<init>(Unknown
Source)
at com.google.gdata.client.calendar.CalendarService.<init>(Unknown
Source)
at AddCalendarEvent.main(AddCalendarEvent.java:14)
Caused by: java.util.regex.PatternSyntaxException: At position 10 in
regular expression pattern:
At position 0 in regular expression pattern:
unsupported name ASCII
^[\p{ASCII}&&[^\p{Cntrl} ;/=\[\]\(\)\<\>[EMAIL PROTECTED],\:\"\?\=]]+$
^
at java.util.regex.Pattern.<init>(libgcj.so.70)
at java.util.regex.Pattern.compile(libgcj.so.70)
at java.util.regex.Pattern.compile(libgcj.so.70)
at com.google.gdata.util.ContentType.<clinit>(Unknown Source)
at java.lang.Class.initializeClass(libgcj.so.70)
...5 more
Caused by: gnu.java.util.regex.REException: At position 10 in regular
expression pattern:
At position 0 in regular expression pattern:
unsupported name ASCII
at gnu.java.util.regex.RE.getRETokenNamedProperty(libgcj.so.70)
at gnu.java.util.regex.RE.parseCharClass(libgcj.so.70)
at gnu.java.util.regex.RE.initialize(libgcj.so.70)
at gnu.java.util.regex.RE.<init>(libgcj.so.70)
at gnu.java.util.regex.RE.<init>(libgcj.so.70)
at java.util.regex.Pattern.<init>(libgcj.so.70)
...9 more
Caused by: gnu.java.util.regex.REException: At position 0 in regular
expression pattern:
unsupported name ASCII
at gnu.java.util.regex.RETokenNamedProperty.getHandler(libgcj.so.
70)
at gnu.java.util.regex.RETokenNamedProperty.<init>(libgcj.so.70)
at gnu.java.util.regex.RE.getRETokenNamedProperty(libgcj.so.70)
...14 more
Any idea about what can I do to solve it? Any help will be
appreciated. Thank you!
Sonik
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---