2015-06-08 56 views
1

我不知道爲什麼會發生這種情況:我改變的是我從經典開發模式轉到超級開發模式 - 我不記得我爲什麼這麼做,因爲從那以後我我再次嘗試運行(!)。我不知道是什麼的階乘我改變了,但現在我得到這樣的:GWT:java.security.AccessControlException:訪問被拒絕

Jun 08, 2015 1:57:41 AM com.google.apphosting.utils.security.SecurityManagerInstaller install 
WARNING: Unable to delete dynamic policy file: C:\Users\Stefan\AppData\Local\Temp\test798307262776049603.policy 
java.security.AccessControlException: access denied ("java.io.FilePermission" "C:\Users\Stefan\AppData\Local\Temp\test798307262776049603.policy" "delete") 
    at java.security.AccessControlContext.checkPermission(Unknown Source) 
    at java.security.AccessController.checkPermission(Unknown Source) 
    at java.lang.SecurityManager.checkPermission(Unknown Source) 
    at java.lang.SecurityManager.checkDelete(Unknown Source) 
    at java.io.File.delete(Unknown Source) 
    at com.google.apphosting.utils.security.SecurityManagerInstaller.install(SecurityManagerInstaller.java:107) 
    at com.google.appengine.tools.development.DevAppServerFactory.doCreateDevAppServer(DevAppServerFactory.java:251) 
    at com.google.appengine.tools.development.DevAppServerFactory.access$000(DevAppServerFactory.java:36) 
    at com.google.appengine.tools.development.DevAppServerFactory$1.run(DevAppServerFactory.java:226) 
    at com.google.appengine.tools.development.DevAppServerFactory$1.run(DevAppServerFactory.java:224) 
    at java.security.AccessController.doPrivileged(Native Method) 
    at com.google.appengine.tools.development.DevAppServerFactory.createDevAppServer(DevAppServerFactory.java:224) 
    at com.google.appengine.tools.development.DevAppServerFactory.createDevAppServer(DevAppServerFactory.java:76) 
    at com.google.appengine.tools.development.DevAppServerFactory.createDevAppServer(DevAppServerFactory.java:60) 
    at com.google.appengine.tools.development.gwt.AppEngineLauncher.start(AppEngineLauncher.java:84) 
    at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:632) 
    at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1054) 
    at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:836) 
    at com.google.gwt.dev.DevMode.main(DevMode.java:413) 

Unable to start embedded HTTP server 
java.lang.RuntimeException: Unable to create a DevAppServer 
    at com.google.appengine.tools.development.DevAppServerFactory.doCreateDevAppServer(DevAppServerFactory.java:266) 
    at com.google.appengine.tools.development.DevAppServerFactory.access$000(DevAppServerFactory.java:36) 
    at com.google.appengine.tools.development.DevAppServerFactory$1.run(DevAppServerFactory.java:226) 
    at com.google.appengine.tools.development.DevAppServerFactory$1.run(DevAppServerFactory.java:224) 
    at java.security.AccessController.doPrivileged(Native Method) 
    at com.google.appengine.tools.development.DevAppServerFactory.createDevAppServer(DevAppServerFactory.java:224) 
    at com.google.appengine.tools.development.DevAppServerFactory.createDevAppServer(DevAppServerFactory.java:76) 
    at com.google.appengine.tools.development.DevAppServerFactory.createDevAppServer(DevAppServerFactory.java:60) 
    at com.google.appengine.tools.development.gwt.AppEngineLauncher.start(AppEngineLauncher.java:84) 
    at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:632) 
    at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1054) 
    at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:836) 
    at com.google.gwt.dev.DevMode.main(DevMode.java:413) 
Caused by: java.security.AccessControlException: access denied ("java.security.SecurityPermission" "getPolicy") 
    at java.security.AccessControlContext.checkPermission(Unknown Source) 
    at java.security.AccessController.checkPermission(Unknown Source) 
    at java.lang.SecurityManager.checkPermission(Unknown Source) 
    at java.security.Policy.getPolicy(Unknown Source) 
    at com.google.apphosting.utils.security.SecurityManagerInstaller.install(SecurityManagerInstaller.java:104) 
    at com.google.appengine.tools.development.DevAppServerFactory.doCreateDevAppServer(DevAppServerFactory.java:251) 
    ... 12 more 
[ERROR] Failure in unit cache map load. 
java.util.concurrent.ExecutionException: java.security.AccessControlException: access denied ("java.io.FilePermission" "E:\java\mahlzeit-web\mahlzeit-web\gwt-unitCache\gwt-unitCache-c04dfa348afbdd12c2a9ddc3bc36901a78fa6812-0000014DD072583D" "read") 
    at java.util.concurrent.FutureTask.report(Unknown Source) 
    at java.util.concurrent.FutureTask.get(Unknown Source) 
    at com.google.gwt.dev.javac.PersistentUnitCache.awaitUnitCacheMapLoad(PersistentUnitCache.java:523) 
    at com.google.gwt.dev.javac.PersistentUnitCache.find(PersistentUnitCache.java:428) 
    at com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:548) 
    at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:513) 
    at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:499) 
    at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:668) 
    at com.google.gwt.dev.codeserver.Recompiler.initWithoutPrecompile(Recompiler.java:200) 
    at com.google.gwt.dev.codeserver.Outbox.maybePrecompile(Outbox.java:82) 
    at com.google.gwt.dev.codeserver.Outbox.<init>(Outbox.java:61) 
    at com.google.gwt.dev.codeserver.CodeServer.makeOutboxes(CodeServer.java:156) 
    at com.google.gwt.dev.codeserver.CodeServer.start(CodeServer.java:118) 
    at com.google.gwt.dev.codeserver.CodeServer.main(CodeServer.java:91) 
    at com.google.gwt.dev.codeserver.CodeServer.main(CodeServer.java:50) 
    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.dev.shell.SuperDevListener$1.run(SuperDevListener.java:84) 
Caused by: java.security.AccessControlException: access denied ("java.io.FilePermission" "E:\java\mahlzeit-web\mahlzeit-web\gwt-unitCache\gwt-unitCache-c04dfa348afbdd12c2a9ddc3bc36901a78fa6812-0000014DD072583D" "read") 
    at java.security.AccessControlContext.checkPermission(Unknown Source) 
    at java.security.AccessController.checkPermission(Unknown Source) 
    at java.lang.SecurityManager.checkPermission(Unknown Source) 
    at java.lang.SecurityManager.checkRead(Unknown Source) 
    at java.io.FileInputStream.<init>(Unknown Source) 
    at com.google.gwt.dev.javac.PersistentUnitCache.loadUnitMap(PersistentUnitCache.java:566) 
    at com.google.gwt.dev.javac.PersistentUnitCache.access$800(PersistentUnitCache.java:103) 
    at com.google.gwt.dev.javac.PersistentUnitCache$4.run(PersistentUnitCache.java:232) 
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) 
    at java.util.concurrent.FutureTask.run(Unknown Source) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 
    at java.lang.Thread.run(Unknown Source) 
java.security.AccessControlException: access denied ("java.io.FilePermission" "E:\java\mahlzeit-web\mahlzeit-web\src\com\mahlzeit\web\client\service\LoginServiceAsync.java" "read") 
    at java.security.AccessControlContext.checkPermission(Unknown Source) 
    at java.security.AccessController.checkPermission(Unknown Source) 
    at java.lang.SecurityManager.checkPermission(Unknown Source) 
    at java.lang.SecurityManager.checkRead(Unknown Source) 
    at java.io.File.lastModified(Unknown Source) 
    at com.google.gwt.dev.resource.impl.FileResource.getLastModified(FileResource.java:46) 
    at com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:552) 
    at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:513) 
    at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:499) 
    at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:668) 
    at com.google.gwt.dev.codeserver.Recompiler.initWithoutPrecompile(Recompiler.java:200) 
    at com.google.gwt.dev.codeserver.Outbox.maybePrecompile(Outbox.java:82) 
    at com.google.gwt.dev.codeserver.Outbox.<init>(Outbox.java:61) 
    at com.google.gwt.dev.codeserver.CodeServer.makeOutboxes(CodeServer.java:156) 
    at com.google.gwt.dev.codeserver.CodeServer.start(CodeServer.java:118) 
    at com.google.gwt.dev.codeserver.CodeServer.main(CodeServer.java:91) 
    at com.google.gwt.dev.codeserver.CodeServer.main(CodeServer.java:50) 
    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.dev.shell.SuperDevListener$1.run(SuperDevListener.java:84) 
[ERROR] Error during shutdown 
java.util.concurrent.ExecutionException: java.security.AccessControlException: access denied ("java.io.FilePermission" "E:\java\mahlzeit-web\mahlzeit-web\gwt-unitCache\gwt-unitCache-c04dfa348afbdd12c2a9ddc3bc36901a78fa6812-0000014DD075526C" "delete") 
    at java.util.concurrent.FutureTask.report(Unknown Source) 
    at java.util.concurrent.FutureTask.get(Unknown Source) 
    at com.google.gwt.dev.javac.PersistentUnitCache$5.run(PersistentUnitCache.java:301) 
Caused by: java.security.AccessControlException: access denied ("java.io.FilePermission" "E:\java\mahlzeit-web\mahlzeit-web\gwt-unitCache\gwt-unitCache-c04dfa348afbdd12c2a9ddc3bc36901a78fa6812-0000014DD075526C" "delete") 
    at java.security.AccessControlContext.checkPermission(Unknown Source) 
    at java.security.AccessController.checkPermission(Unknown Source) 
    at java.lang.SecurityManager.checkPermission(Unknown Source) 
    at java.lang.SecurityManager.checkDelete(Unknown Source) 
    at java.io.File.delete(Unknown Source) 
    at com.google.gwt.dev.javac.PersistentUnitCache.closeCurrentCacheFile(PersistentUnitCache.java:540) 
    at com.google.gwt.dev.javac.PersistentUnitCache.access$700(PersistentUnitCache.java:103) 
    at com.google.gwt.dev.javac.PersistentUnitCache$3.run(PersistentUnitCache.java:218) 
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) 
    at java.util.concurrent.FutureTask.run(Unknown Source) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 
    at java.lang.Thread.run(Unknown Source) 
Exception in thread "Thread-4" java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "modifyThread") 
    at java.security.AccessControlContext.checkPermission(Unknown Source) 
    at java.security.AccessController.checkPermission(Unknown Source) 
    at java.lang.SecurityManager.checkPermission(Unknown Source) 
    at java.util.concurrent.ThreadPoolExecutor.checkShutdownAccess(Unknown Source) 
    at java.util.concurrent.ThreadPoolExecutor.shutdownNow(Unknown Source) 
    at java.util.concurrent.Executors$DelegatedExecutorService.shutdownNow(Unknown Source) 
    at com.google.gwt.dev.javac.PersistentUnitCache$5.run(PersistentUnitCache.java:311) 

大家都知道的Windows的工作方式鼓勵方案,以唾其轉變成一個所謂的臨時目錄,你可以C:\Users\<username>\AppData\Local\Temp\下找到並已創建,但從來沒有試圖避免只是爲了惹惱 - 用戶。我不知道爲什麼現在突然出現這個問題 - 當然這是我的錯,因爲它一定是我改變了一些東西 - 但我無法弄清楚什麼我已經改變了s.t.這個問題現在出現了。

使用默認問候示例創建新的GWT項目可以毫無問題地工作 - 在經典開發模式下以超級開發模式&運行。

它對我有什麼要求?


作爲一個方面說明:自從我開始使用GWT,我從一個問題運行到另一個。我不記得GWT在資產方面是如此痛苦,但我一直認爲這個工具讓我害怕的人數太多了。所以,如果有人想要提出我的意見,請繼續。我想要的只是一個相當簡單的Web Interface,它允許登錄用戶操縱數據庫中的某些數據 - 但當然要給它一些結構。

+0

看起來您沒有在臨時目錄上擁有足夠的權限運行IDE。 –

+0

@RoddyoftheFrozenPeas我以管理員身份運行Eclipse。另一件事是,如果我只是創建另一個包含默認GWT「Hello World!」的項目,它就可以工作。項目。我不是100%肯定的,但我認爲我們可以排除這種可能性。 – displayname

回答

0

我在你的堆棧跟蹤中看到你遇到了兩條截然不同的路徑問題。在C上的那個:另一個在E:\ java \ mahlzeit ....你的項目可能有這個硬編碼的地方?在您的項目中搜索該字符串並將其更改爲任何您需要的內容。

我(現在)注意到的另一件事是,底部還有另一個問題,即修改線程策略。也許當您創建Hello World項目時,它默認爲一個運行時環境,而您當前的項目正在使用另一個具有特殊策略設置的項目。

+0

不,該項目沒有任何硬編碼路徑。在C:\驅動器上執行某些操作的路徑僅指向\ temp目錄。 – displayname

+0

好吧我想我應該評論而不是回答......:/我只是編輯了我的答案,以包含有關環境策略的內容。也許呢? – jotadepicas

+0

嗨,有關這方面的消息嗎? – jotadepicas

2

此例外的一個可能的原因是,您正在使用Google App Engine並將服務器端庫添加到您的項目中。

要解決此問題:禁用Google App Engine或刪除服務器端庫。

到這裏看看: http://www.gwtproject.org/doc/latest/FAQ_Troubleshooting.html#AccessControlException_access_denied

希望有所幫助。

+0

刪除我打算使用的引擎是沒有意義的。 :) – displayname

+0

你在項目中使用服務器端庫嗎? –

+0

我不確定什麼是服務器端庫,但我正在使用例如Hibernate和兩個在我的GWT項目中被引用爲依賴關係的項目。 – displayname