Skip to content
This repository has been archived by the owner on Nov 3, 2022. It is now read-only.

Handle AccessDeniedExceptions more gracefully #13

Open
dualspiral opened this issue Oct 19, 2017 · 0 comments
Open

Handle AccessDeniedExceptions more gracefully #13

dualspiral opened this issue Oct 19, 2017 · 0 comments

Comments

@dualspiral
Copy link
Member

During scanning of the classpath

[13:41:14] [Server thread/INFO] [STDERR/sponge]: [java.lang.Throwable:printStackTrace:-1]: Caused by: java.nio.file.AccessDeniedException: C:\<snip>\Minecraft
[13:41:14] [Server thread/INFO] [STDERR/sponge]: [java.lang.Throwable:printStackTrace:-1]: 	at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
[13:41:14] [Server thread/INFO] [STDERR/sponge]: [java.lang.Throwable:printStackTrace:-1]: 	at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
[13:41:14] [Server thread/INFO] [STDERR/sponge]: [java.lang.Throwable:printStackTrace:-1]: 	at sun.nio.fs.WindowsLinkSupport.getRealPath(Unknown Source)
[13:41:14] [Server thread/INFO] [STDERR/sponge]: [java.lang.Throwable:printStackTrace:-1]: 	at sun.nio.fs.WindowsPath.toRealPath(Unknown Source)
[13:41:14] [Server thread/INFO] [STDERR/sponge]: [java.lang.Throwable:printStackTrace:-1]: 	at sun.nio.fs.WindowsPath.toRealPath(Unknown Source)
[13:41:14] [Server thread/INFO] [STDERR/sponge]: [java.lang.Throwable:printStackTrace:-1]: 	at io.github.nucleuspowered.relocate.io.github.lukehutch.fastclasspathscanner.scanner.Scanner.call(Scanner.java:221)
[13:41:14] [Server thread/INFO] [STDERR/sponge]: [java.lang.Throwable:printStackTrace:-1]: 	... 5 more

Can we find out why this happens on Windows sometimes? Probably a file lock - user in question was using the AMP panel which might have locked the file. Is there a better way to scan a JAR that is already on the classpath?

Will be worked around by #12

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant