Do you see any other exceptions under WARNING or ERROR that provides more
information? How long do you wait before the exception is thrown? If it's
close to 30 seconds, you could be experiencing a timeout, and you can try
scaling back the number of entities written (500 is the theoretical max but
depending on the size of the entities and the responsiveness of the
datastore, you may not be able to hit this count in every request).

- Jason

On Sat, Oct 31, 2009 at 8:30 AM, Pion <[email protected]> wrote:

>
> I got the AccessControlException on the following code snippet:
>
>        public void add(List<String> iriList, List<String> nameList,
> List<String> imageList) {
>                // deleted for brevity
>
>                                 try {
>                                         datastore.put(eList);   // The log
> below shows this line as at
> com.col.server.MDsIri.add(MDsIri.java:74)
>                                 } catch (IllegalArgumentException exIA) {
>
> logger.severe("IllegalArgumentException when trying to
> datastore.put. Exception message: " + exIA.getMessage());
>                                 } catch (ConcurrentModificationException
>  exCM) {
>
> logger.severe("ConcurrentModificationException when trying to
> datastore.put. Exception message: " + exCM.getMessage());
>                                 } catch (Exception ex) {
>                                         logger.severe("Exception when
> trying to datastore.put. Exception
> message: " + ex.getMessage()); // the log (last line) below says that
> the message is unknown
>                                 }
>                }
>                // deleted for brevity
>        }
>
> I follow the guideline that the eList has only 500 entities at most as
> mentioned on
> http://code.google.com/appengine/docs/java/datastore/overview.html#Quotas_and_Limits
> .
> Also, I don't call any thread or system threads as mentioned on
> http://code.google.com/appengine/docs/java/runtime.html#The_Sandbox.
>
> I did not get the error below on my Development Server.
>
> I don't know how to interpret the error because the exception/error
> message is Unknown(last line of the log).
>
> I appreciate any help.
>
> Log from the Google Apple Engine Admin Console -> Main -> Logs
> 10-31 09:06AM 07.119
>
> com.google.appengine.repackaged.com.google.common.base.FinalizableReferenceQueue
> $SystemLoader loadFinalizer: Not allowed to access system class
> loader.
> I 10-31 09:06AM 07.145
> com.google.appengine.repackaged.com.google.common.base.internal.Finalizer
> getInheritableThreadLocalsField: Couldn't access
> Thread.inheritableThreadLocals. Reference finalizer threads will
> inherit thread local values.
> I 10-31 09:06AM 07.148
>
> com.google.appengine.repackaged.com.google.common.base.FinalizableReferenceQueue
> <init>: Failed to start reference finalizer thread. Reference cleanup
> will only occur when new references are created.
> java.lang.reflect.InvocationTargetException
>        at com.google.appengine.runtime.Request.process-69e6389d93ef7f72
> (Request.java)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>        at java.lang.reflect.Method.invoke(Method.java:40)
>        at
>
> com.google.appengine.repackaged.com.google.common.base.FinalizableReferenceQueue.<init>
> (FinalizableReferenceQueue.java:124)
>        at
> com.google.appengine.repackaged.com.google.common.labs.misc.InterningPools
> $WeakInterningPool.<clinit>(InterningPools.java:104)
>        at
>
> com.google.appengine.repackaged.com.google.common.labs.misc.InterningPools.newWeakInterningPool
> (InterningPools.java:48)
>        at
>
> com.google.appengine.repackaged.com.google.io.protocol.ProtocolSupport.<clinit>
> (ProtocolSupport.java:55)
>        at com.google.apphosting.api.DatastorePb$PutRequest.freeze
> (DatastorePb.java:8452)
>        at com.google.apphosting.api.DatastorePb$PutRequest$1.<init>
> (DatastorePb.java:8367)
>        at com.google.apphosting.api.DatastorePb$PutRequest.<clinit>
> (DatastorePb.java:8364)
>        at com.google.appengine.api.datastore.DatastoreServiceImpl.put
> (DatastoreServiceImpl.java:155)
>        at com.google.appengine.api.datastore.DatastoreServiceImpl.put
> (DatastoreServiceImpl.java:147)
>        at com.col.server.MDsIri.add(MDsIri.java:74) // please see the code
> snippet above
>        at com.col.server.tool.DsWriter.writeIri(DsWriter.java:73)
>        at com.col.server.CAdmin.doIriWriteIri(CAdmin.java:165)
>        at com.col.server.CAdmin.doGet(CAdmin.java:60)
>        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:238)
>        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:139)
>        at com.google.apphosting.runtime.JavaRuntime.handleRequest
> (JavaRuntime.java:239)
>        at com.google.apphosting.base.RuntimePb$EvaluationRuntime
> $6.handleBlockingRequest(RuntimePb.java:5135)
>        at com.google.apphosting.base.RuntimePb$EvaluationRuntime
> $6.handleBlockingRequest(RuntimePb.java:5133)
>        at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest
> (BlockingApplicationHandler.java:24)
>        at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:
> 363)
>        at com.google.net.rpc.impl.Server$2.run(Server.java:814)
>        at com.google.tracing.LocalTraceSpanRunnable.run
> (LocalTraceSpanRunnable.java:56)
>        at com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan
> (LocalTraceSpanBuilder.java:516)
>        at com.google.net.rpc.impl.Server.startRpc(Server.java:769)
>        at com.google.net.rpc.impl.Server.processRequest(Server.java:351)
>        at com.google.net.rpc.impl.ServerConnection.messageReceived
> (ServerConnection.java:437)
>        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:
> 436)
>        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:396)
>        at java.lang.Thread.run(Unknown Source)
> Caused by: java.security.AccessControlException: access denied
> (java.lang.RuntimePermission modifyThreadGroup)
>        at java.security.AccessControlContext.checkPermission
> (AccessControlContext.java:355)
>        at java.security.AccessController.checkPermission
> (AccessController.java:567)
>        at java.lang.SecurityManager.checkPermission(Unknown Source)
>        at java.lang.ThreadGroup.checkAccess(Unknown Source)
>        at java.lang.Thread.init(Unknown Source)
>        at java.lang.Thread.<init>(Unknown Source)
>        at
>
> com.google.appengine.repackaged.com.google.common.base.internal.Finalizer.<init>
> (Finalizer.java:96)
>        at
>
> com.google.appengine.repackaged.com.google.common.base.internal.Finalizer.startFinalizer
> (Finalizer.java:82)
>        ... 58 more
>
> 10-31 09:06AM 11.757
> com.col.server.MDsIri add: Exception when trying to datastore.put.
> Exception message: Unknown
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" 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-appengine-java?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to