Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoSuchFileException in logs and improper caching in devmode after removing a html file #5163

Closed
jmartisk opened this issue Nov 4, 2019 · 3 comments
Assignees
Labels
area/devmode kind/bug Something isn't working
Milestone

Comments

@jmartisk
Copy link
Contributor

jmartisk commented Nov 4, 2019

If there is a static html file in src/main/resources/META-INF/resources/, the user starts dev mode, accesses that file over a HTTP request, and then deletes the file and tries the same URL again, this exception will start to appear repeatedly in the log:

2019-11-04 10:17:20,409 ERROR [io.qua.dev] (vert.x-worker-thread-4) Failed to copy resources: java.nio.file.NoSuchFileException: /home/jmartisk/Workspace/reproducers/devmode-html-file/my-quarkus-project/target/classes/META-INF/resources/index.html
	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
	at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:244)
	at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103)
	at java.nio.file.Files.delete(Files.java:1126)
	at io.quarkus.dev.RuntimeUpdatesProcessor.checkForFileChange(RuntimeUpdatesProcessor.java:338)
	at io.quarkus.dev.RuntimeUpdatesProcessor.doScan(RuntimeUpdatesProcessor.java:122)
	at io.quarkus.vertx.http.deployment.devmode.VertxHotReplacementSetup$1.handle(VertxHotReplacementSetup.java:51)
	at io.quarkus.vertx.http.deployment.devmode.VertxHotReplacementSetup$1.handle(VertxHotReplacementSetup.java:43)
	at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$2(ContextImpl.java:316)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.lang.Thread.run(Thread.java:748)

Moreover, if this file is removed BEFORE there is a HTTP request to it, the contents of that file are cached somewhere and it will still be possible to request it even though the file does not exist anymore.

@jmartisk jmartisk added kind/bug Something isn't working area/devmode labels Nov 4, 2019
@machi1990 machi1990 self-assigned this Nov 4, 2019
@jmartisk
Copy link
Contributor Author

jmartisk commented Nov 4, 2019

#5165 should fix the log part, haven't yet looked much into the caching thing but that seems to be somewhere on Vert.x level?! @machi1990 I see you self-assigned this so perhaps you could find out :)

@machi1990
Copy link
Member

Yeap, I planned to look at this a bit later. Thanks for fixing the logging part.

machi1990 added a commit to machi1990/quarkus that referenced this issue Nov 4, 2019
@machi1990
Copy link
Member

#5165 should fix the log part, haven't yet looked much into the caching thing but that seems to be somewhere on Vert.x level?! @machi1990 I see you self-assigned this so perhaps you could find out :)

@jmartisk I pushed a possible fix for this. It also includes your fix for the log. I could not update your PR, so let's open another one that includes the two fixes.

@gsmet gsmet closed this as completed in 0b33537 Nov 4, 2019
gsmet pushed a commit that referenced this issue Nov 5, 2019
@gsmet gsmet added this to the 1.1.0 milestone Nov 15, 2019
mmusgrov pushed a commit to mmusgrov/quarkus that referenced this issue Dec 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devmode kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants