Google App Engine modifyThreadGroup问题不让我使用DWR

时间:2011-06-06 21:22:24

标签: google-app-engine dwr

我在tomcat上运行良好的基本DWR代码在GAE中不起作用。根据{{​​3}},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>

3 个答案:

答案 0 :(得分:0)

如错误消息所示,您无法对App Engine中的线程执行操作,包括modifyThreadGroup。我不确定为什么dwr会尝试这样做,但你需要避免导致它的操作,或者修改dwr以不尝试进行线程操作。

答案 1 :(得分:0)

即使GAE声称它支持DWR,但显然不支持DWR。根据文献,我不认为它会在不久的将来支持它。

如果您遇到同样的问题,请查看Channel API。

答案 2 :(得分:0)

即使是现在,您仍然可以使用DWR 2.0.10。它不会产生线程。