Compiler with Google App Engine

58 views
Skip to first unread message

Balogh Péter

unread,
Apr 14, 2011, 10:39:20 AM4/14/11
to Closure Compiler Discuss
Hi,

I'm trying to finalize our development environment for Javascript, and I
would like to integrate Closure Compiler into the process.
My idea was to invoke the compiler from a servlet, that is served by
Google App Engine in the development environment.
Certainly I don't want to use this feature in the actual release, I
would just use the precompiled version.
But when I try to invoke the compiler, I get an Access Control
Exception. Here is the relevant part of the exception:

java.security.AccessControlException: access denied
(java.lang.RuntimePermission modifyThreadGroup)
at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
at
java.security.AccessController.checkPermission(AccessController.java:546)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
at
com.google.appengine.tools.development.DevAppServerFactory$CustomSecurityManager.checkPermission(DevAppServerFactory.java:166)
at
com.google.appengine.tools.development.DevAppServerFactory$CustomSecurityManager.checkAccess(DevAppServerFactory.java:191)
at java.lang.ThreadGroup.checkAccess(ThreadGroup.java:299)
at java.lang.Thread.init(Thread.java:336)
at java.lang.Thread.<init>(Thread.java:608)
at com.google.javascript.jscomp.Compiler.runCallable(Unknown Source)
at
com.google.javascript.jscomp.Compiler.runInCompilerThread(Unknown Source)
at com.google.javascript.jscomp.Compiler.compile(Unknown Source)
at com.google.javascript.jscomp.Compiler.compile(Unknown Source)
at com.google.javascript.jscomp.Compiler.compile(Unknown Source)
at com.google.javascript.jscomp.Compiler.compile(Unknown Source)
at com.google.javascript.jscomp.Compiler.compile(Unknown Source)

Is there a way, to use the compiler without threads? Has anyone tried to
use the compiler this way?
Does anybody know a way to disable this specific restriction form the
App Engine on localhost?

Best regards,
Peter Balogh

Nick Santos

unread,
Apr 14, 2011, 11:27:52 AM4/14/11
to closure-comp...@googlegroups.com
compiler.disableThreads()

2011/4/14 Balogh Péter <balogh...@cit.hu>:

Balogh Péter

unread,
Apr 14, 2011, 11:32:09 AM4/14/11
to closure-comp...@googlegroups.com
Hi Nick,

Thank you for the quick answer, it fixed the problem.

Best regards,
Peter Balogh

On 2011.04.14. 17:27, Nick Santos wrote:
> compiler.disableThreads()
>
> 2011/4/14 Balogh P�ter<balogh...@cit.hu>:

Reply all
Reply to author
Forward
0 new messages