java.nio.file.AccessDeniedException thrown on GWT compile

276 views
Skip to first unread message

Craig Mitchell

unread,
Jan 20, 2019, 7:51:54 PM1/20/19
to GWT Users
When developing, I refresh the browser for GWT to do its super dev mode compile, it usually works great, however, about 1 in every 10 times, I get the following error on the class it is trying to compile (I replaced the long class name with 'MyClass'):

java.nio.file.AccessDeniedException: C:\blah\MyClass.java___jb_old___
 at sun
.nio.fs.WindowsException.translateToIOException(WindowsException.java:83)
 at sun
.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
 at sun
.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
 at sun
.nio.fs.WindowsFileSystemProvider.isHidden(WindowsFileSystemProvider.java:466)
 at java
.nio.file.Files.isHidden(Files.java:1531)
 at com
.google.gwt.dev.resource.impl.ResourceAccumulator.onNewPath(ResourceAccumulator.java:141)
 at com
.google.gwt.dev.resource.impl.ResourceAccumulator.refresh(ResourceAccumulator.java:129)
 at com
.google.gwt.dev.resource.impl.ResourceAccumulator.refreshResources(ResourceAccumulator.java:67)
 at com
.google.gwt.dev.resource.impl.ResourceAccumulatorManager.refreshResources(ResourceAccumulatorManager.java:128)
 at com
.google.gwt.dev.resource.impl.ResourceAccumulatorManager$1.run(ResourceAccumulatorManager.java:91)



Happens running on Windows10, and happens in IntelliJ and in Eclipse, both using GWT 2.8.2.

All I have to do is restart the GWT web service, and it works great again.  Just would be nice not to have to do this.

It only started happening about 3 months ago, so I think Windows has done something to cause this.  I've tried a few things like disabling the Windows Search service, but with no luck.

Anyone else seeing this?  Any ideas on how to fix it?

Craig Mitchell

unread,
Jan 20, 2019, 11:53:38 PM1/20/19
to GWT Users
Correction:  The exception is thrown before the compile even occurs.  It seems to be random when it actually happens (however, it will only happen if code has been changed).

Once the exception has occurred, a refresh of the browser will still trigger a compile of the new code, which seems to complete, but never shows up in the browser until a restart is done on the GWT web server.

Running Java 1.8.0_192.

Jens

unread,
Jan 21, 2019, 2:10:15 AM1/21/19
to GWT Users
Search in IntelliJ preferences for "safe write" and try disabling it.

-- J.

Craig Mitchell

unread,
Jan 21, 2019, 7:52:14 PM1/21/19
to GWT Users
Thanks Jens.  Been working all day, and not a single exception raised.  So, looks like that was the problem.  Cheers!
Reply all
Reply to author
Forward
0 new messages