Google Ananlytics API + Java in Lotus Notes

Hi all,

I’m trying to use Google Analytics API in LN Agent.

I took example here

http://code.google.com/apis/analytics/docs/gdata/1.0/gdataJava.html

include all necessary libraries and when run agent got an error. I don’t know how I can fix it.

Error generates when these line execute:

// Construct query from a string.

URL queryUrl = new URL(

    "https://www.google.com/analytics/feeds/accounts/default?max-results=50");

// Make request to the API.

AccountFeed accountFeed = analyticsService.getFeed(queryUrl, AccountFeed.class);

does anybody know how I can fix it? at least approach to fix.

log of error

Exception in thread “AgentThread: GettingStarted” java.lang.ExceptionInInitializerError

at java.lang.J9VMInternals.initialize(J9VMInternals.java:222)

at com.google.gdata.client.http.GoogleGDataRequest$Factory.createRequest(GoogleGDataRequest.java:73)

at com.google.gdata.client.http.HttpGDataRequest$Factory.getRequest(HttpGDataRequest.java:161)

at com.google.gdata.client.Service.createRequest(Service.java:660)

at com.google.gdata.client.GoogleService.createRequest(GoogleService.java:525)

at com.google.gdata.client.Service.createFeedRequest(Service.java:1037)

at com.google.gdata.client.Service.getFeed(Service.java:878)

at com.google.gdata.client.GoogleService.getFeed(GoogleService.java:631)

at com.google.gdata.client.Service.getFeed(Service.java:898)

at GettingStarted.getAccountFeed(GettingStarted.java:99)

at GettingStarted.NotesMain(GettingStarted.java:51)

at lotus.domino.AgentBase.runNotes(Unknown Source)

at lotus.domino.NotesThread.run(Unknown Source)

Caused by: java.security.AccessControlException: Access denied (java.net.NetPermission getCookieHandler)

at java.security.AccessController.checkPermission(AccessController.java:108)

at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)

at COM.ibm.JEmpower.applet.AppletSecurity.superDotCheckPermission(AppletSecurity.java:1449)

at COM.ibm.JEmpower.applet.AppletSecurity.checkPermission(AppletSecurity.java:1480)

at COM.ibm.JEmpower.applet.AppletSecurity.checkPermission(AppletSecurity.java:1464)

at java.net.CookieHandler.getDefault(CookieHandler.java:69)

at com.google.gdata.client.http.GoogleGDataRequest$GoogleCookieHandler.<init>(GoogleGDataRequest.java:316)

at com.google.gdata.client.http.GoogleGDataRequest$GoogleCookieHandler.<init>(GoogleGDataRequest.java:305)

at com.google.gdata.client.http.GoogleGDataRequest.<clinit>(GoogleGDataRequest.java:408)

at java.lang.J9VMInternals.initializeImpl(Native Method)

at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)