Skip to content
This repository has been archived by the owner on Jan 8, 2025. It is now read-only.

Properties file located, but failed to read from it java.nio.file.NoSuchFileException: ~/.config/tmc-cli/properties.json #386

Open
jamo opened this issue Jul 19, 2016 · 1 comment

Comments

@jamo
Copy link
Member

jamo commented Jul 19, 2016

I don't have much more information than the stacktrace (below) - it seems that the permissions are correct and the file is readable by the user.

2016-07-19 15:46:27 ERROR SettingsIo:178 - Properties file located, but failed to read from it
java.nio.file.NoSuchFileException: /home/kkeikei/.config/tmc-cli/properties.json
    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.newByteChannel(UnixFileSystemProvider.java:214)
    at java.nio.file.Files.newByteChannel(Files.java:361)
    at java.nio.file.Files.newByteChannel(Files.java:407)
    at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:384)
    at java.nio.file.Files.newInputStream(Files.java:152)
    at java.nio.file.Files.newBufferedReader(Files.java:2784)
    at fi.helsinki.cs.tmc.cli.backend.SettingsIo.getPropertiesFromJson(SettingsIo.java:176)
    at fi.helsinki.cs.tmc.cli.backend.SettingsIo.loadPropertiesFrom(SettingsIo.java:76)
    at fi.helsinki.cs.tmc.cli.backend.SettingsIo.loadProperties(SettingsIo.java:71)
    at fi.helsinki.cs.tmc.cli.core.CliContext.<init>(CliContext.java:52)
    at fi.helsinki.cs.tmc.cli.core.CliContext.<init>(CliContext.java:41)
    at fi.helsinki.cs.tmc.cli.core.CliContext.<init>(CliContext.java:37)
    at fi.helsinki.cs.tmc.cli.Application.main(Application.java:142)
@Salmela
Copy link
Contributor

Salmela commented Jul 23, 2016

Only thing that comes to mind is that the parent directory of the config file could have reduced privileges and owned by another user.

Currently SettingsIo hides all exceptions in getPropertiesFile method. I added a TODO comment about it before my trip. I will fix it after my trip.

I haven't had a internet access for many days, so I couldn't answer you sooner.

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

2 participants