Navigation Menu

Skip to content
This repository has been archived by the owner on Nov 5, 2022. It is now read-only.

Using the Google Data APIs Java Client in Google App Engine #122

Closed
GoogleCodeExporter opened this issue Apr 6, 2015 · 34 comments
Closed

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Use the GData Java Client within the Google App Engine SDK for Java
2.
3.

What is the expected output? What do you see instead?
Expected is to be able to fetch a Contacts feed for example. Instead an error 
gets thrown which is most likely due to a restriction within the App Engine SDK


What version of the product are you using? On what operating system?
GData 1.30.0 + App Engine SDK 1.2.0 + Windows XP


Please provide any additional information below.

Stack trace here:

java.security.AccessControlException: access denied (java.net.NetPermission 
getCookieHandler)
    at java.security.AccessControlContext.checkPermission(Unknown Source)
    at java.security.AccessController.checkPermission(Unknown Source)
    at java.lang.SecurityManager.checkPermission(Unknown Source)
    at com.google.appengine.tools.development.DevAppServerFactory$CustomSecurityManager.checkPermission(DevAppServerFactory.java:76)
    at java.net.CookieHandler.getDefault(Unknown Source)
    at com.google.gdata.client.http.GoogleGDataRequest$GoogleCookieHandler.(GoogleGDataRequest.java:334)
    at com.google.gdata.client.http.GoogleGDataRequest$GoogleCookieHandler.(GoogleGDataRequest.java:323)
    at com.google.gdata.client.http.GoogleGDataRequest.(GoogleGDataRequest.java:426)
    at com.google.gdata.client.http.GoogleGDataRequest$Factory.getRequest(GoogleGDataRequest.java:90)
    at com.google.gdata.client.Service.createRequest(Service.java:613)
    at com.google.gdata.client.GoogleService.createRequest(GoogleService.java:497)
    at com.google.gdata.client.Service.createFeedRequest(Service.java:1005)
    at com.google.gdata.client.Service.getFeed(Service.java:897)
    at com.google.gdata.client.GoogleService.getFeed(GoogleService.java:624)
    at com.google.gdata.client.Service.getFeed(Service.java:855)
    at com.feth.appengine.contactsync.server.gcontacts.AuthenticationServlet.doGet(AuthenticationServlet.java:78)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
    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 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:306)
    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.headerComplete(HttpConnection.java:830)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
    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(SelectChannelEndPoint.java:396)
    at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)




Original issue reported on code.google.com by joschaf...@gmx.de on 11 Apr 2009 at 4:04

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

Workaround seems to be to disable automatic cookie handling by calling:

service.setCookieManager(null);

just don't know about the side effects...

Original comment by joschaf...@gmx.de on 11 Apr 2009 at 4:15

@GoogleCodeExporter
Copy link
Author

See also Issue over at GAE: 
http://code.google.com/p/googleappengine/issues/detail?id=1272

Original comment by joschaf...@gmx.de on 11 Apr 2009 at 4:17

@GoogleCodeExporter
Copy link
Author

Actually the right way to disable automatic cookie handling (which would 
currently be needed due to the restrictions of the App Engine Java Environment) 
is to set the according system property:

System.setProperty(GoogleGDataRequest.DISABLE_COOKIE_HANDLER_PROPERTY, "true");

Unfortunately this results in getting an error because of missing 
authentication header information:

java.lang.NullPointerException: No authentication header information
    at com.google.gdata.util.AuthenticationException.initFromAuthHeader(AuthenticationException.java:95)
    at com.google.gdata.util.AuthenticationException.(AuthenticationException.java:66)
    at com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java:509)
    at com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleGDataRequest.java:562)
    at com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java:481)
    at com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:460)
    at com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:534)
    at com.google.gdata.client.Service.getFeed(Service.java:962)
    at com.google.gdata.client.Service.getFeed(Service.java:819)
    at com.google.gdata.client.GoogleService.getFeed(GoogleService.java:593)
    at com.google.gdata.client.Service.getFeed(Service.java:838)
    at com.feth.appengine.contactsync.server.gcontacts.AuthenticationServlet.doGet(AuthenticationServlet.java:92)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
    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 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:306)
    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.headerComplete(HttpConnection.java:830)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
    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(SelectChannelEndPoint.java:396)
    at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)

Original comment by joschaf...@gmx.de on 11 Apr 2009 at 5:41

@GoogleCodeExporter
Copy link
Author

interestingly java.net.CookieHandler seems to be on the white list for Google 
App Engine: http://code.google.com/appengine/docs/java/jrewhitelist.html.

Still, invoking this code:

java.net.CookieHandler.setDefault(new CookieHandler(){

    @Override
    public Map<String, List<String>> get(URI uri,
            Map<String, List<String>> requestHeaders)
            throws IOException {
        return null;
    }

    @Override
    public void put(URI uri, Map<String, List<String>> responseHeaders)
            throws IOException {
    }
});

results in an java.security.AccessControlException: access denied 
(java.net.NetPermission setCookieHandler) error.

Original comment by joschaf...@gmx.de on 11 Apr 2009 at 5:55

@GoogleCodeExporter
Copy link
Author

Its kind of a readonly access.  You can use the default cookie handler, but 
cannot
inject your custom handler.  So you need the system property.

As far as the authentication issue., could you send me the http trace for the 
failing
auth request?

Original comment by vbarat...@gmail.com on 13 Apr 2009 at 2:37

  • Changed state: RequestedFeedback

@GoogleCodeExporter
Copy link
Author

Weird I retried gdata client lib 1.30.0 with appengine 1.2.0 sdk.  I couldnt
reproduce the issue.  Please send me the wire trace, that may provide more 
clues into
why you are seeing that error.

Original comment by vbarat...@gmail.com on 13 Apr 2009 at 5:39

@GoogleCodeExporter
Copy link
Author

While preparing the HTTP traces, I found the following:
it seems as if the problem occured because of a wrong authentication scope when 
generating the auth sub url using AuthSubUtil.getRequestUrl(...).

I used: http://www.google.com/m8/feeds/ (this failed) - when I am using: 
https://www.google.com/m8/feeds/contacts/default/full it works.

The official documentation 
(http://code.google.com/intl/de-DE/apis/contacts/docs/2.0/developers_guide_proto
col.html#auth_sub) however says to use http://www.google.com/m8/feeds/.

By the way, I do not have any of these problems when using the Docs API instead 
of the Contacts API.

Regarding the traces: I prepared them, but it seems as if there is a lot of 
sensitive data in there - which parts do I need to remove before posting them 
here?!

Original comment by joschaf...@gmx.de on 13 Apr 2009 at 5:49

@GoogleCodeExporter
Copy link
Author

Did you try the contacts API or a different one? I have an idea why it fails: 
if the 
the auth scope is using a different protocol (e.g. http instead of https) than 
the 
requested URL has, a NullPointer exception gets thrown.

Original comment by joschaf...@gmx.de on 13 Apr 2009 at 5:59

@GoogleCodeExporter
Copy link
Author

I havent had chance to look at this issue.  It should work with http as well. 
weird.

Is this blocking you? or using https is an acceptable solution for you?

Original comment by vbarat...@gmail.com on 29 Apr 2009 at 2:04

@GoogleCodeExporter
Copy link
Author

Having the same issues (google apps + gdata 1.30) - tried
service.setCookieManager(null) - no luck

The code works when running from a shell and retrieves portfolio data

Through commenting/uncommenting it seems that one can authenticate but using a 
feed
from the FinancialService produces a security exception.

FinanceService service = new FinanceService("MyService-1.0");
service.getAuthTokenFactory().getAuthToken();
service.setUserCredentials("[a valid email]", "[a valid password]"]);

//OK to Here

String feedUrl = "http://finance.google.com/finance/feeds/default/portfolios";
//Requesting Feed 
PortfolioFeed portfolioFeed = _service.getFeed(new URL(feedUrl), 
PortfolioFeed.class);

//Dies with the following stack

java.lang.ExceptionInInitializerError
    at
com.google.gdata.client.http.GoogleGDataRequest$Factory.getRequest(GoogleGDataRe
quest.java:77)
    at com.google.gdata.client.Service.createRequest(Service.java:600)
    at com.google.gdata.client.GoogleService.createRequest(GoogleService.java:487)
    at com.google.gdata.client.Service.createFeedRequest(Service.java:988)
    at com.google.gdata.client.Service.getFeed(Service.java:818)
    at com.google.gdata.client.GoogleService.getFeed(GoogleService.java:593)
    at com.google.gdata.client.Service.getFeed(Service.java:838)
    at com.activebaskets.portfolio.User.getPortfolioList(User.java:644)
    at org.apache.jsp.index_jsp._jspService(index_jsp.java:163)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
    at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.jav
a:1093)
    at
com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter
.java:35)
    at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.jav
a:1084)
    at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(Transactio
nCleanupFilter.java:43)
    at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.jav
a: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.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandle
rMap.java:237)
    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.headerComplete(HttpConnection.ja
va:830)
    at
com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestPa
rser.java:63)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
    at
com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(Jet
tyServletEngineAdapter.java:125)
    at com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:235)
    at
com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(R
untimePb.java:4547)
    at
com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(R
untimePb.java:4545)
    at
com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplica
tionHandler.java:24)
    at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:359)
    at com.google.net.rpc.impl.Server$2.run(Server.java:792)
    at com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java:56)
    at
com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan(LocalTraceSpanBuil
der.java:489)
    at com.google.net.rpc.impl.Server.startRpc(Server.java:748)
    at com.google.net.rpc.impl.Server.processRequest(Server.java:340)
    at com.google.net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java:422)
    at com.google.net.rpc.impl.RpcConnection.parseMessages(RpcConnection.java:319)
    at com.google.net.rpc.impl.RpcConnection.dataReceived(RpcConnection.java:290)
    at com.google.net.async.Connection.handleReadEvent(Connection.java:419)
    at com.google.net.async.EventDispatcher.processNetworkEvents(EventDispatcher.java:733)
    at com.google.net.async.EventDispatcher.internalLoop(EventDispatcher.java:207)
    at com.google.net.async.EventDispatcher.loop(EventDispatcher.java:101)
    at com.google.net.rpc.RpcService.runUntilServerShutdown(RpcService.java:249)
    at com.google.apphosting.runtime.JavaRuntime$RpcRunnable.run(JavaRuntime.java:373)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.security.AccessControlException: access denied
(java.net.NetPermission getCookieHandler)
    at java.security.AccessControlContext.checkPermission(Unknown Source)
    at java.security.AccessController.checkPermission(Unknown Source)
    at java.lang.SecurityManager.checkPermission(Unknown Source)
    at java.net.CookieHandler.getDefault(Unknown Source)
    at
com.google.gdata.client.http.GoogleGDataRequest$GoogleCookieHandler.<init>(Googl
eGDataRequest.java:334)
    at
com.google.gdata.client.http.GoogleGDataRequest$GoogleCookieHandler.<init>(Googl
eGDataRequest.java:323)
    at com.google.gdata.client.http.GoogleGDataRequest.<clinit>(GoogleGDataRequest.java:426)
    ... 50 more

I see there is a new load of gdata (1.31). Mine is 1.30. Does anyone know if the
update fixes tis issue? Nothing about it in the release notes
http://code.google.com/p/gdata-java-client/wiki/ReleaseNotes

Original comment by 190...@gmail.com on 2 May 2009 at 1:54

@GoogleCodeExporter
Copy link
Author

Please check this FAQ:
http://code.google.com/intl/zh-HK/appengine/kb/java.html#googledata

Let us know if this fixes the problem.

Original comment by vbarat...@gmail.com on 2 May 2009 at 2:06

@GoogleCodeExporter
Copy link
Author

I'm having the same problem with the spreadsheets API.  Adding 

<system-properties>
  <property name="com.google.gdata.DisableCookieHandler" value="true"/>
</system-properties>
to the web.xml didn't seem to help with using 1.30.0 and earlier.  I can't tell 
if
1.31.1 has this changed since 1.31.1 throws an exception on creating the 
service. Am
I doing something wrong?

Original comment by steven.anderson4@gmail.com on 6 May 2009 at 9:44

@GoogleCodeExporter
Copy link
Author

Comment#12 by vbarathan WORKS. on gdata 1.31.1

Original comment by lovettd...@gmail.com on 13 May 2009 at 11:31

@GoogleCodeExporter
Copy link
Author

Original comment by vbarat...@gmail.com on 14 May 2009 at 3:06

  • Changed state: Done

@GoogleCodeExporter
Copy link
Author

When I set
 <system-properties>
  <property name="com.google.gdata.DisableCookieHandler" value="true"/>
</system-properties>

, I can't use datastore.

What can i do?

Original comment by daxiong...@gmail.com on 21 May 2009 at 4:24

@GoogleCodeExporter
Copy link
Author

Fixed it for me; thanks Google Team; Awesome work!

<system-properties>
  <property name="com.google.gdata.DisableCookieHandler" value="true"/>
</system-properties>


java.lang.ExceptionInInitializerError 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.http.HttpGDataRequest$Factory.getRequest
(HttpGDataRequest.java:167) at com.google.gdata.client.Service.createRequest
(Service.java:677) at com.google.gdata.client.GoogleService.createRequest
(GoogleService.java:535) at com.google.gdata.client.Service.createFeedRequest
(Service.java:1138) at 
com.google.gdata.client.Service.getFeed(Service.java:958) at 
com.google.gdata.client.GoogleService.getFeed(GoogleService.java:662) at 
com.google.gdata.client.Service.query(Service.java:1119) at 
com.google.gdata.client.Service.query(Service.java:1060) at 
com.lighthouseracing.application.server.BooksClient.searchVolumes
(BooksClient.java:81) at 
com.lighthouseracing.application.server.BooksClient.getSearchList
(BooksClient.java:390) at com.lighthouseracing.application.server.JR.doGet
(JR.java:59) at javax.servlet.http.HttpServlet.service(HttpServlet.java:693) at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at 
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1093) at 
com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter
(SaveSessionFilter.java:35) at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1084) at 
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter
(TransactionCleanupFilter.java:43) 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.runtime.jetty.AppVersionHandlerMap.handle
(AppVersionHandlerMap.java:237) 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.headerComplete
(HttpConnection.java:830) at 
com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable
(RpcRequestParser.java:76) at org.mortbay.jetty.HttpConnection.handle
(HttpConnection.java:381) at 
com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest
(JettyServletEngineAdapter.java:125) at 
com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:235) 
at 
com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest
(RuntimePb.java:4755) at 
com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest
(RuntimePb.java:4753) at 
com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest
(BlockingApplicationHandler.java:24) at 
com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:359) at 
com.google.net.rpc.impl.Server$2.run(Server.java:800) at 
com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java:56) 
at 
com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan
(LocalTraceSpanBuilder.java:510) at com.google.net.rpc.impl.Server.startRpc
(Server.java:756) at 
com.google.net.rpc.impl.Server.processRequest(Server.java:348) 
at com.google.net.rpc.impl.ServerConnection.messageReceived
(ServerConnection.java:459) at 
com.google.net.rpc.impl.RpcConnection.parseMessages
(RpcConnection.java:319) at com.google.net.rpc.impl.RpcConnection.dataReceived
(RpcConnection.java:290) at com.google.net.async.Connection.handleReadEvent
(Connection.java:419) at 
com.google.net.async.EventDispatcher.processNetworkEvents
(EventDispatcher.java:762) at com.google.net.async.EventDispatcher.internalLoop
(EventDispatcher.java:207) at com.google.net.async.EventDispatcher.loop
(EventDispatcher.java:101) at 
com.google.net.rpc.RpcService.runUntilServerShutdown
(RpcService.java:251) at 
com.google.apphosting.runtime.JavaRuntime$RpcRunnable.run
(JavaRuntime.java:373) at java.lang.Thread.run(Unknown Source) Caused by: 
java.security.AccessControlException: access denied (java.net.NetPermission 
getCookieHandler) at java.security.AccessControlContext.checkPermission(Unknown 
Source) at java.security.AccessController.checkPermission(Unknown Source) at 
java.lang.SecurityManager.checkPermission(Unknown Source) at 
java.net.CookieHandler.getDefault(Unknown Source) at 
com.google.gdata.client.http.GoogleGDataRequest$GoogleCookieHandler.
(GoogleGDataRequest.java:316) at 
com.google.gdata.client.http.GoogleGDataRequest$GoogleCookieHandler.
(GoogleGDataRequest.java:305) at 
com.google.gdata.client.http.GoogleGDataRequest.
(GoogleGDataRequest.java:408) ... 54 more 

Original comment by radical...@excite.com on 29 May 2009 at 7:19

@GoogleCodeExporter
Copy link
Author

Problem still there. Any help would be nice :)

Original comment by zed...@gmail.com on 9 Aug 2009 at 2:05

@GoogleCodeExporter
Copy link
Author

zed163,

Are you referring to issue with authentication or disabling cookie handler in 
appengine?

Original comment by vbarat...@gmail.com on 9 Aug 2009 at 2:15

@GoogleCodeExporter
Copy link
Author

Sorry my fault. 
<system-properties>
  <property name="com.google.gdata.DisableCookieHandler" value="true"/>
</system-properties>
fixed the problem 

Original comment by zed...@gmail.com on 9 Aug 2009 at 2:27

@GoogleCodeExporter
Copy link
Author

i have the same problem...

Original comment by pengfly...@gmail.com on 28 Aug 2009 at 7:21

@GoogleCodeExporter
Copy link
Author

do you still have the problem after disabling the cookiehandler?

<system-properties>
  <property name="com.google.gdata.DisableCookieHandler" value="true"/>
</system-properties>

Original comment by vbarat...@gmail.com on 28 Aug 2009 at 1:39

  • Changed state: RequestedFeedback

@GoogleCodeExporter
Copy link
Author

solution (for me) : put 

<system-properties>
  <property name="com.google.gdata.DisableCookieHandler" value="true"/>
</system-properties>

 in  eclipse_project/war/WEB-INF/appengine-web.xml 

Original comment by kristoff...@gmail.com on 2 Oct 2009 at 10:48

@GoogleCodeExporter
Copy link
Author

This worked for me as well.  I don't know if there are any negative 
side-effects yet.

Original comment by terry.ch...@gmail.com on 19 Nov 2009 at 3:42

@GoogleCodeExporter
Copy link
Author

Well, for those asking about the side effects of disabling the cookie handler, 
it's 
pretty brutal in my case: the app won't deploy while using the Eclipse plug-in.

com.google.apphosting.utils.config.AppEngineConfigException: XML error 
validating 
C:\Documents and Settings\User\My Documents\Java\workspace\Contacter\war\WEB-
INF\appengine-web.xml against C:\Documents and Settings\User\My 
Documents\Java\eclipse\plugins\com.google.appengine.eclipse.sdkbundle.1.2.8_1.2.
8.v20
0912062003\appengine-java-sdk-1.2.8\docs\appengine-web.xsd

Removing the bit from appengine-web.xml will allow deployment but cause an 
exception 
at run time.

Any solution?

Original comment by tbert...@gmail.com on 17 Dec 2009 at 5:40

@GoogleCodeExporter
Copy link
Author

Does not happen to me with 1.39.1 release, consider updating.

Original comment by peter.on...@gmail.com on 17 Dec 2009 at 8:21

@GoogleCodeExporter
Copy link
Author

As per release notes in 1.40.2 there is no need to use:

<system-properties>
  <property name="com.google.gdata.DisableCookieHandler" value="true"/>
</system-properties>

I have just tested.

Original comment by peter.on...@gmail.com on 26 Dec 2009 at 7:30

@GoogleCodeExporter
Copy link
Author

I got same exception while GoogleGDataRequest is initializing:
"Caused by: java.security.AccessControlException: access denied
(java.net.NetPermission getCookieHandler)"

althought I updated to  1.40.3

I'm using GData (Picasa) in a web application deployed with Apache Tomcat 6 
with Jdk
1.6_07, setting System.setProperty("com.google.gdata.DisableCookieHandler", 
"true");
fixed my problem.

Original comment by hho...@arcor.de on 31 Jan 2010 at 12:45

@GoogleCodeExporter
Copy link
Author

I just took a look at the changes which was made to fix this bug at
http://code.google.com/p/gdata-java-client/source/detail?r=114.
The diff for GoogleGDataRequest.java shows the class
"com.google.apphosting.api.ApiProxy" is required to make that fix work, but this
class is in my environment not availabe cause I don't use Google apphosting 
api..

Original comment by hho...@arcor.de on 31 Jan 2010 at 1:15

@GoogleCodeExporter
Copy link
Author

The fix was intended to make it workable in Google App Hosting environment.  If 
this is 
another restricted environment use the system property.

Original comment by vbarat...@gmail.com on 2 Feb 2010 at 2:00

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

I am facing the issue while getting data into the GAE. 
I have created a jar file which gets all the data from the domain using the 
admin
userid and pwd. Now, I am using this jar into my webapp and getting the list of
users/document in the domain.

1. I am getting proper output in Eclipse console (i.e. 3 users/11 docs)
2. When i deploy the same to GAE, it does not show any users/docs.

Question: Has anyone faced the above issue. 
I am using 1.3.1 SDK.

Original comment by Saraswat...@gmail.com on 24 Mar 2010 at 10:31

@GoogleCodeExporter
Copy link
Author

Please let me know how to get rid of this issue (comment #31)...

Original comment by Saraswat...@gmail.com on 24 Mar 2010 at 10:32

@GoogleCodeExporter
Copy link
Author

System.setProperty(GoogleGDataRequest.DISABLE_COOKIE_HANDLER_PROPERTY, "true");

This worked perfectly for me :)

I'm using Single-user "installed" client authentication though

Original comment by coolpr...@gmail.com on 6 May 2010 at 7:33

@GoogleCodeExporter
Copy link
Author

 coolprosu where exactly did you use :
System.setProperty(GoogleGDataRequest.DISABLE_COOKIE_HANDLER_PROPERTY, "true");

it seems to make no difference to me :(

Original comment by sean.rou...@gmail.com on 24 May 2010 at 8:14

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant