Thanks for the quick reply Isaac. It actually solved the problem. I
did not know about Timer were not allowed on app engine. I really
intended to use it for my project. I will try to figure out another
way to make it work without the timer.

Thanks again =)

On Jul 30, 7:25 pm, Isaac Truett <[email protected]> wrote:
> Timerisn't allowed on app engine. Did you mean to have your project
> configured to use app engine? If not, you can go into project
> properties and uncheck app engine. That'll make this go away.
>
>
>
> On Thu, Jul 30, 2009 at 5:40 PM, Melodaf<[email protected]> wrote:
>
> > Hey folks
>
> > I am having a weird problem when I try to use aTimeron the server-
> > side code of my gwt app.
>
> > After I import the package:
>
> > import  java.util.Timer;
>
> > and declare  my variable:
>
> >    publicTimerrefreshTimer;
>
> > IF I do this:
>
> > refreshTimer = newTimer();
>
> > I get these errors:
>
> > 30-Jul-2009 21:36:57
> > com.google.appengine.tools.development.ApiProxyLocalImpl log
> > SEVERE: [1248989817022000] javax.servlet.ServletContext log: Exception
> > while dispatching incoming RPC call
> > com.google.gwt.user.server.rpc.UnexpectedException: Service method
> > 'public abstract java.util.ArrayList
> > com.google.gwt.spacefighter.client.SpaceFighterService.startup
> > (com.google.gwt.spacefighter.client.Phantom)' threw an unexpected
> > exception: java.security.AccessControlException: access denied
> > (java.lang.RuntimePermission modifyThreadGroup)
> >        at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure
> > (RPC.java:360)
> >        at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse
> > (RPC.java:546)
> >        at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall
> > (RemoteServiceServlet.java:166)
> >        at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost
> > (RemoteServiceServlet.java:86)
> >        at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
> >        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 com.google.appengine.tools.development.StaticFileFilter.doFilter
> > (StaticFileFilter.java:124)
> >        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:313)
> >        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.content
> > (HttpConnection.java:844)
> >        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
> >        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
> >        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)
> > Caused by: java.security.AccessControlException: access denied
> > (java.lang.RuntimePermission modifyThreadGroup)
> >        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:128)
> >        at com.google.appengine.tools.development.DevAppServerFactory
> > $CustomSecurityManager.checkAccess(DevAppServerFactory.java:155)
> >        at java.lang.ThreadGroup.checkAccess(Unknown Source)
> >        at java.lang.Thread.init(Unknown Source)
> >        at java.lang.Thread.<init>(Unknown Source)
> >        at java.util.TimerThread.<init>(Unknown Source)
> >        at java.util.Timer.<init>(Unknown Source)
> >        at java.util.Timer.<init>(Unknown Source)
> >        at com.google.gwt.spacefighter.server.SpaceFighterServiceImpl.startup
> > (SpaceFighterServiceImpl.java:46)
> >        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(Unknown Source)
> >        at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse
> > (RPC.java:527)
> >        ... 27 more
>
> > If I comment the line that creates thetimerall of those go away.
>
> > It seems to me like theTimercreation somehow violates security and
> > does not allow the server to communicate with the client through RPC.
> > Someone can help me to figure out the problem and solve it ?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to