微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Google App Engine ModifyThreadGroup问题不允许我使用DWR

如何解决Google App Engine ModifyThreadGroup问题不允许我使用DWR

|| 我在tomcat上正常运行的基本DWR代码在GAE中不起作用。根据http://groups.google.com/group/google-appengine-java/web/will-it-play-in-app-engine的说明,GAE支持dwr.3.0.0.RC1.jar。 我没有看到任何servlet参数来禁用DwrServlet中的线程(http://directwebremoting.org/dwr/documentation/server/configuration/servlet/index.html) 任何帮助表示赞赏。 谢谢 我得到的错误
runserver:
     [java] 2011-06-06 15:18:19.144 java[1170:903] [Java CocoaComponent compatibility mode]: Enabled
     [java] 2011-06-06 15:18:19.146 java[1170:903] [Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.100000
     [java] Jun 6,2011 10:18:20 PM com.google.apphosting.utils.jetty.JettyLogger info
     [java] INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
     [java] Jun 6,2011 10:18:20 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
     [java] INFO: Successfully processed /Users/mbustany/parents-portal/prototype/mo/geolocation-appengine/build/WEB-INF/appengine-web.xml
     [java] Jun 6,2011 10:18:20 PM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
     [java] INFO: Successfully processed /Users/mbustany/parents-portal/prototype/mo/geolocation-appengine/build/WEB-INF/web.xml
     [java] Jun 6,2011 10:18:20 PM com.google.apphosting.utils.jetty.JettyLogger info
     [java] INFO: jetty-6.1.x
     [java] Jun 6,2011 10:18:20 PM com.google.apphosting.utils.jetty.JettyLogger info
     [java] INFO: Started SelectChannelConnector@localhost:8080
     [java] Jun 6,2011 10:18:20 PM com.google.appengine.tools.development.DevAppServerImpl start
     [java] INFO: The server is running at http://localhost:8080/




     [java] Jun 6,2011 10:18:32 PM org.directwebremoting.impl.StartupUtil logStartup
     [java] INFO: Starting: DwrServlet v3.0.0.116.rc1 on Google App Engine Development/1.5.0 / JDK 1.6.0_24 from Apple Inc. at 
     [java] Jun 6,2011 10:18:33 PM org.directwebremoting.impl.DefaultContainer invoke
     [java] SEVERE:   - Exception during auto-wire: 
     [java] java.security.AccessControlException: access denied (java.lang.RuntimePermission modifyThreadGroup)
     [java]     at java.security.AccessControlContext.checkPermission(AccessControlContext.java:374)
     [java]     at java.security.AccessController.checkPermission(AccessController.java:546)
     [java]     at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
     [java]     at com.google.appengine.tools.development.DevAppServerFactory$CustomSecurityManager.checkPermission(DevAppServerFactory.java:166)
     [java]     at com.google.appengine.tools.development.DevAppServerFactory$CustomSecurityManager.checkAccess(DevAppServerFactory.java:191)
     [java]     at java.lang.ThreadGroup.checkAccess(ThreadGroup.java:299)
     [java]     at java.lang.Thread.init(Thread.java:336)
     [java]     at java.lang.Thread.<init>(Thread.java:626)
     [java]     at java.util.concurrent.Executors$DefaultThreadFactory.newThread(Executors.java:542)
     [java]     at java.util.concurrent.ThreadPoolExecutor.addThread(ThreadPoolExecutor.java:672)
     [java]     at java.util.concurrent.ThreadPoolExecutor.addIfUnderCorePoolSize(ThreadPoolExecutor.java:697)
     [java]     at java.util.concurrent.ThreadPoolExecutor.prestartCoreThread(ThreadPoolExecutor.java:1381)
     [java]     at java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:222)
     [java]     at java.util.concurrent.ScheduledThreadPoolExecutor.scheduleWithFixedDelay(ScheduledThreadPoolExecutor.java:443)
     [java]     at org.directwebremoting.impl.PurgingDownloadManager.setScheduledThreadPoolExecutor(PurgingDownloadManager.java:71)
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     [java]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     [java]     at java.lang.reflect.Method.invoke(Method.java:597)
     [java]     at com.google.appengine.tools.development.agent.runtime.Runtime.invoke(Runtime.java:100)
     [java]     at org.directwebremoting.impl.DefaultContainer.invoke(DefaultContainer.java:282)
     [java]     at org.directwebremoting.impl.DefaultContainer.initializeBean(DefaultContainer.java:260)
     [java]     at org.directwebremoting.impl.DefaultContainer.setupFinished(DefaultContainer.java:177)
     [java]     at org.directwebremoting.impl.StartupUtil.setupDefaultContainer(StartupUtil.java:264)
     [java]     at org.directwebremoting.impl.StartupUtil.createAndSetupDefaultContainer(StartupUtil.java:188)
     [java]     at org.directwebremoting.servlet.DwrServlet.createContainer(DwrServlet.java:97)
     [java]     at org.directwebremoting.servlet.DwrServlet.init(DwrServlet.java:64)
     [java]     at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:440)
     [java]     at org.mortbay.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:339)
     [java]     at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
     [java]     at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
     [java]     at com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(HeaderVerificationFilter.java:35)
     [java]     at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
     [java]     at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:58)
     [java]     at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
     [java]     at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
     [java]     at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
     [java]     at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:122)
     [java]     at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
     [java]     at com.google.appengine.tools.development.BackendServersFilter.doFilter(BackendServersFilter.java:94)
     [java]     at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
     [java]     at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
     [java]     at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
     [java]     at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
     [java]     at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
     [java]     at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
     [java]     at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:70)
     [java]     at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
     [java]     at com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:351)
     [java]     at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
     [java]     at org.mortbay.jetty.Server.handle(Server.java:326)
     [java]     at org.mortbay.jetty.httpconnection.handleRequest(httpconnection.java:542)
     [java]     at org.mortbay.jetty.httpconnection$RequestHandler.headerComplete(httpconnection.java:923)
     [java]     at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
     [java]     at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
     [java]     at org.mortbay.jetty.httpconnection.handle(httpconnection.java:404)
     [java]     at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
     [java]     at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
     [java] Jun 6,2011 10:18:33 PM org.directwebremoting.servlet.DwrServlet init
     [java] SEVERE: init Failed
     [java] org.directwebremoting.extend.ContainerConfigurationException: java.security.AccessControlException: access denied (java.lang.RuntimePermission modifyThreadGroup)
     [java]     at org.directwebremoting.impl.StartupUtil.createAndSetupDefaultContainer(StartupUtil.java:193)
     [java]     at org.directwebremoting.servlet.DwrServlet.createContainer(DwrServlet.java:97)
     [java]     at org.directwebremoting.servlet.DwrServlet.init(DwrServlet.java:64)
     [java]     at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:440)
     [java]     at org.mortbay.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:339)
     [java]     at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
     [java]     at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
     [java]     at com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(HeaderVerificationFilter.java:35)
     [java]     at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
     [java]     at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:58)
     [java]     at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
     [java]     at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
     [java]     at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
     [java]     at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:122)
     [java]     at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
     [java]     at com.google.appengine.tools.development.BackendServersFilter.doFilter(BackendServersFilter.java:94)
     [java]     at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
     [java]     at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
     [java]     at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
     [java]     at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
     [java]     at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
     [java]     at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
     [java]     at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:70)
     [java]     at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
     [java]     at com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:351)
     [java]     at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
     [java]     at org.mortbay.jetty.Server.handle(Server.java:326)
     [java]     at org.mortbay.jetty.httpconnection.handleRequest(httpconnection.java:542)
     [java]     at org.mortbay.jetty.httpconnection$RequestHandler.headerComplete(httpconnection.java:923)
     [java]     at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
     [java]     at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
     [java]     at org.mortbay.jetty.httpconnection.handle(httpconnection.java:404)
     [java]     at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
     [java]     at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
     [java] Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission modifyThreadGroup)
     [java]     at java.security.AccessControlContext.checkPermission(AccessControlContext.java:374)
     [java]     at java.security.AccessController.checkPermission(AccessController.java:546)
     [java]     at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
     [java]     at com.google.appengine.tools.development.DevAppServerFactory$CustomSecurityManager.checkPermission(DevAppServerFactory.java:166)
     [java]     at com.google.appengine.tools.development.DevAppServerFactory$CustomSecurityManager.checkAccess(DevAppServerFactory.java:191)
     [java]     at java.lang.ThreadGroup.checkAccess(ThreadGroup.java:299)
     [java]     at java.lang.Thread.init(Thread.java:336)
     [java]     at java.lang.Thread.<init>(Thread.java:626)
     [java]     at java.util.concurrent.Executors$DefaultThreadFactory.newThread(Executors.java:542)
     [java]     at java.util.concurrent.ThreadPoolExecutor.addThread(ThreadPoolExecutor.java:672)
     [java]     at java.util.concurrent.ThreadPoolExecutor.addIfUnderCorePoolSize(ThreadPoolExecutor.java:697)
     [java]     at java.util.concurrent.ThreadPoolExecutor.prestartCoreThread(ThreadPoolExecutor.java:1381)
     [java]     at java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:222)
     [java]     at java.util.concurrent.ScheduledThreadPoolExecutor.scheduleWithFixedDelay(ScheduledThreadPoolExecutor.java:443)
     [java]     at org.directwebremoting.impl.DefaultScriptSessionManager.afterContainerSetup(DefaultScriptSessionManager.java:70)
     [java]     at org.directwebremoting.impl.AbstractContainer.callInitializingBeans(AbstractContainer.java:55)
     [java]     at org.directwebremoting.impl.AbstractContainer.callInitializingBeans(AbstractContainer.java:39)
     [java]     at org.directwebremoting.impl.DefaultContainer.setupFinished(DefaultContainer.java:180)
     [java]     at org.directwebremoting.impl.StartupUtil.setupDefaultContainer(StartupUtil.java:264)
     [java]     at org.directwebremoting.impl.StartupUtil.createAndSetupDefaultContainer(StartupUtil.java:188)
     [java]     ... 33 more
     [java] Jun 6,2011 10:18:33 PM com.google.appengine.tools.development.ApiProxyLocalImpl log
     [java] SEVERE: javax.servlet.ServletContext log: unavailable
     [java] org.directwebremoting.extend.ContainerConfigurationException: java.security.AccessControlException: access denied (java.lang.RuntimePermission modifyThreadGroup)
     [java]     at org.directwebremoting.impl.StartupUtil.createAndSetupDefaultContainer(StartupUtil.java:193)
     [java]     at org.directwebremoting.servlet.DwrServlet.createContainer(DwrServlet.java:97)
     [java]     at org.directwebremoting.servlet.DwrServlet.init(DwrServlet.java:64)
     [java]     at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:440)
     [java]     at org.mortbay.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:339)
     [java]     at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
     [java]     at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
     [java]     at com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(HeaderVerificationFilter.java:35)
     [java]     at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
     [java]     at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:58)
     [java]     at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
     [java]     at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
     [java]     at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
     [java]     at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:122)
     [java]     at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
     [java]     at com.google.appengine.tools.development.BackendServersFilter.doFilter(BackendServersFilter.java:94)
     [java]     at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
     [java]     at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
     [java]     at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
     [java]     at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
     [java]     at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
     [java]     at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
     [java]     at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:70)
     [java]     at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
     [java]     at com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:351)
     [java]     at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
     [java]     at org.mortbay.jetty.Server.handle(Server.java:326)
     [java]     at org.mortbay.jetty.httpconnection.handleRequest(httpconnection.java:542)
     [java]     at org.mortbay.jetty.httpconnection$RequestHandler.headerComplete(httpconnection.java:923)
     [java]     at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
     [java]     at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
     [java]     at org.mortbay.jetty.httpconnection.handle(httpconnection.java:404)
     [java]     at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
     [java]     at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
     [java] Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission modifyThreadGroup)
     [java]     at java.security.AccessControlContext.checkPermission(AccessControlContext.java:374)
     [java]     at java.security.AccessController.checkPermission(AccessController.java:546)
     [java]     at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
     [java]     at com.google.appengine.tools.development.DevAppServerFactory$CustomSecurityManager.checkPermission(DevAppServerFactory.java:166)
     [java]     at com.google.appengine.tools.development.DevAppServerFactory$CustomSecurityManager.checkAccess(DevAppServerFactory.java:191)
     [java]     at java.lang.ThreadGroup.checkAccess(ThreadGroup.java:299)
     [java]     at java.lang.Thread.init(Thread.java:336)
     [java]     at java.lang.Thread.<init>(Thread.java:626)
     [java]     at java.util.concurrent.Executors$DefaultThreadFactory.newThread(Executors.java:542)
     [java]     at java.util.concurrent.ThreadPoolExecutor.addThread(ThreadPoolExecutor.java:672)
     [java]     at java.util.concurrent.ThreadPoolExecutor.addIfUnderCorePoolSize(ThreadPoolExecutor.java:697)
     [java]     at java.util.concurrent.ThreadPoolExecutor.prestartCoreThread(ThreadPoolExecutor.java:1381)
     [java]     at java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:222)
     [java]     at java.util.concurrent.ScheduledThreadPoolExecutor.scheduleWithFixedDelay(ScheduledThreadPoolExecutor.java:443)
     [java]     at org.directwebremoting.impl.DefaultScriptSessionManager.afterContainerSetup(DefaultScriptSessionManager.java:70)
     [java]     at org.directwebremoting.impl.AbstractContainer.callInitializingBeans(AbstractContainer.java:55)
     [java]     at org.directwebremoting.impl.AbstractContainer.callInitializingBeans(AbstractContainer.java:39)
     [java]     at org.directwebremoting.impl.DefaultContainer.setupFinished(DefaultContainer.java:180)
     [java]     at org.directwebremoting.impl.StartupUtil.setupDefaultContainer(StartupUtil.java:264)
     [java]     at org.directwebremoting.impl.StartupUtil.createAndSetupDefaultContainer(StartupUtil.java:188)
     [java]     ... 33 more
     [java] 
     [java] Jun 6,2011 10:18:33 PM com.google.apphosting.utils.jetty.JettyLogger warn
     [java] WARNING: /dwr/engine.js
     [java] org.directwebremoting.extend.ContainerConfigurationException: java.security.AccessControlException: access denied (java.lang.RuntimePermission modifyThreadGroup)
     [java]     at org.directwebremoting.impl.StartupUtil.createAndSetupDefaultContainer(StartupUtil.java:193)
     [java]     at org.directwebremoting.servlet.DwrServlet.createContainer(DwrServlet.java:97)
     [java]     at org.directwebremoting.servlet.DwrServlet.init(DwrServlet.java:64)
     [java]     at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:440)
     [java]     at org.mortbay.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:339)
     [java]     at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
     [java]     at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
     [java]     at com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(HeaderVerificationFilter.java:35)
     [java]     at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
     [java]     at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:58)
     [java]     at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
     [java]     at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
     [java]     at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
     [java]     at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:122)
     [java]     at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
     [java]     at com.google.appengine.tools.development.BackendServersFilter.doFilter(BackendServersFilter.java:94)
     [java]     at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
     [java]     at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
     [java]     at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
     [java]     at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
     [java]     at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
     [java]     at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
     [java]     at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:70)
     [java]     at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
     [java]     at com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:351)
     [java]     at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
     [java]     at org.mortbay.jetty.Server.handle(Server.java:326)
     [java]     at org.mortbay.jetty.httpconnection.handleRequest(httpconnection.java:542)
     [java]     at org.mortbay.jetty.httpconnection$RequestHandler.headerComplete(httpconnection.java:923)
     [java]     at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
     [java]     at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
     [java]     at org.mortbay.jetty.httpconnection.handle(httpconnection.java:404)
     [java]     at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
     [java]     at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
     [java] Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission modifyThreadGroup)
     [java]     at java.security.AccessControlContext.checkPermission(AccessControlContext.java:374)
     [java]     at java.security.AccessController.checkPermission(AccessController.java:546)
     [java]     at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
     [java]     at com.google.appengine.tools.development.DevAppServerFactory$CustomSecurityManager.checkPermission(DevAppServerFactory.java:166)
     [java]     at com.google.appengine.tools.development.DevAppServerFactory$CustomSecurityManager.checkAccess(DevAppServerFactory.java:191)
     [java]     at java.lang.ThreadGroup.checkAccess(ThreadGroup.java:299)
     [java]     at java.lang.Thread.init(Thread.java:336)
     [java]     at java.lang.Thread.<init>(Thread.java:626)
     [java]     at java.util.concurrent.Executors$DefaultThreadFactory.newThread(Executors.java:542)
     [java]     at java.util.concurrent.ThreadPoolExecutor.addThread(ThreadPoolExecutor.java:672)
     [java]     at java.util.concurrent.ThreadPoolExecutor.addIfUnderCorePoolSize(ThreadPoolExecutor.java:697)
     [java]     at java.util.concurrent.ThreadPoolExecutor.prestartCoreThread(ThreadPoolExecutor.java:1381)
     [java]     at java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:222)
     [java]     at java.util.concurrent.ScheduledThreadPoolExecutor.scheduleWithFixedDelay(ScheduledThreadPoolExecutor.java:443)
     [java]     at org.directwebremoting.impl.DefaultScriptSessionManager.afterContainerSetup(DefaultScriptSessionManager.java:70)
     [java]     at org.directwebremoting.impl.AbstractContainer.callInitializingBeans(AbstractContainer.java:55)
     [java]     at org.directwebremoting.impl.AbstractContainer.callInitializingBeans(AbstractContainer.java:39)
     [java]     at org.directwebremoting.impl.DefaultContainer.setupFinished(DefaultContainer.java:180)
     [java]     at org.directwebremoting.impl.StartupUtil.setupDefaultContainer(StartupUtil.java:264)
     [java]     at org.directwebremoting.impl.StartupUtil.createAndSetupDefaultContainer(StartupUtil.java:188)
     [java]     ... 33 more
而简单的html文件是:
<!DOCTYPE html>
<html lang=\"en\">
<head>
    <title>Test</title>
    <Meta http-equiv=\"Content-Type\" content=\"text/html; charset=us-ascii\"/>
    <script type=\'text/javascript\' src=\'../dwr/engine.js\'></script>
    <script type=\'text/javascript\' src=\'../dwr/util.js\'></script>
    <script type=\'text/javascript\' src=\'../dwr/interface/IPAddress.js\'></script>
</head>
<body>
<p>
    <input value=\"Fetch\" type=\"button\" onclick=\"fetch()\"/>
    <br/>
    Reply: <span id=\"ipaddress\"></span>
</p>

<script lang=\"javascript\">
    function fetch() {
        IPAddress.getDate(function(data) {
            dwr.util.setValue(\"ipaddress\",data);
        });
    }
</script>
</body>
</html>
    

解决方法

        如错误消息所暗示,您无法在App Engine中的线程上执行操作,包括
modifyThreadGroup
。我不确定为什么dwr会尝试执行此操作,但是您需要避免导致它的操作,或者将dwr修改为不尝试执行线程操作。     ,        即使GAE声称它支持DWR,也显然不支持。根据文献,我认为它不会在不久的将来支持它。 如果您遇到相同的问题,请查看Channel API。     ,        即使现在,您仍然可以使用DWR 2.0.10。它不会产生线程。     

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。