The community forums are in BETA and closed to the public.

Issue with GAE when publishing messages using cron - AccessControlException

Hi ,

I have created cron job on Google app engine to publish messages to a predefined channel. However I get following exception , can you any one help me in any way they can ... pointers will be helpful too...

java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "setFactory") at java.security.AccessControlContext.checkPermission(AccessControlContext.java:382) at java.security.AccessController.checkPermission(AccessController.java:572) at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) at com.google.apphosting.runtime.security.CustomSecurityManager.checkPermission(CustomSecurityManager.java:56) at java.lang.SecurityManager.checkSetFactory(SecurityManager.java:1625) at java.net.HttpURLConnection.setFollowRedirects(HttpURLConnection.java:335) at com.pubnub.api.HttpClientCore.init(Unknown Source) at com.pubnub.api.HttpClientCore.(Unknown Source) at com.pubnub.api.HttpClient.getClient(Unknown Source) at com.pubnub.api.Worker.(Unknown Source) at com.pubnub.api.AbstractSubscribeWorker.(Unknown Source) at com.pubnub.api.SubscribeWorker.(Unknown Source) at com.pubnub.api.AbstractSubscribeManager.getWorker(Unknown Source) at com.pubnub.api.RequestManager.initManager(Unknown Source) at com.pubnub.api.RequestManager.(Unknown Source) at com.pubnub.api.AbstractSubscribeManager.(Unknown Source) at com.pubnub.api.SubscribeManager.(Unknown Source) at com.pubnub.api.PubnubCore.init(Unknown Source) at com.pubnub.api.PubnubCore.init(Unknown Source) at com.pubnub.api.PubnubCore.(Unknown Source) at com.pubnub.api.PubnubCoreShared.(Unknown Source) at com.pubnub.api.Pubnub.(Unknown Source) at com.myproject.HelloWorld2Servlet.doGet(HelloWorld2Servlet.java:15) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166) at com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:125) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:35) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at com.google.apphosting.utils.servlet.JdbcMySqlConnectionCleanupFilter.doFilter(JdbcMySqlConnectionCleanupFilter.java:60) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:257) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923) at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:146) at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run(JavaRuntime.java:482) at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:437) at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:444) at com.google.tracing.CurrentContext.runInContext(CurrentContext.java:230) at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:308) at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:300) at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:441) at com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run(ThreadGroupPool.java:234) at java.lang.Thread.run(Thread.java:745)

I've seen this before and it is a GAE limitation with some Java library that triggers a security issue. I have to search for the root cause and solution in our system. I'll be back with some more details.

Thanks Craig. I will wait for the response.


Comments to this discussion are now closed!