You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
While registering a Metadata Document with any self-provided Id, e.g. d1, I receive HTTP 400. The logfile gives me the following stacktrace:
java.nio.file.InvalidPathException: UNC path is missing sharename: /\d1
at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:118) ~[na:na]
at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77) ~[na:na]
at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92) ~[na:na]
at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:229) ~[na:na]
at java.base/java.nio.file.Path.of(Path.java:147) ~[na:na]
at java.base/java.nio.file.Paths.get(Paths.java:69) ~[na:na]
at edu.kit.datamanager.repo.service.impl.IdBasedStorageService.createPath(IdBasedStorageService.java:66) ~[repo-core-1.0.0.jar!/:na]
at edu.kit.datamanager.repo.util.PathUtils.substitutePathPattern(PathUtils.java:92) ~[repo-core-1.0.0.jar!/:na]
at edu.kit.datamanager.repo.util.PathUtils.getDataUri(PathUtils.java:69) ~[repo-core-1.0.0.jar!/:na]
at edu.kit.datamanager.repo.service.impl.SimpleDataVersioningService.write(SimpleDataVersioningService.java:67) ~[repo-core-1.0.0.jar!/:na]
at edu.kit.datamanager.repo.service.impl.ContentInformationService.create(ContentInformationService.java:156) ~[repo-core-1.0.0.jar!/:na]
The issue happens at IdBasedStorageService.java#L66 where the path is build starting with "/", whereas all other elements are added with "[part]" under Windows, which results in path /\d1for our chosen identifier.
Another issue, but also related to how to include IDs in the path occurs, if someone uses a URL as Id. Using 'http://localhost:8080/d1' results in the following stacktrace:
2022-03-17 22:07:13.935 ERROR 34812 --- [nio-8040-exec-5] e.k.d.r.s.i.ContentInformationService : Failed to write content using versioning service simple.
java.nio.file.InvalidPathException: Illegal character [:] in path at index 7: /\http\://l\ocal\host\:804\0/d1
at java.base/sun.nio.fs.WindowsPathParser.nextSlash(WindowsPathParser.java:212) ~[na:na]
at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:116) ~[na:na]
at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77) ~[na:na]
at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92) ~[na:na]
at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:229) ~[na:na]
at java.base/java.nio.file.Path.of(Path.java:147) ~[na:na]
at java.base/java.nio.file.Paths.get(Paths.java:69) ~[na:na]
at edu.kit.datamanager.repo.service.impl.IdBasedStorageService.createPath(IdBasedStorageService.java:66) ~[repo-core-1.0.0.jar!/:na]
at edu.kit.datamanager.repo.util.PathUtils.substitutePathPattern(PathUtils.java:92) ~[repo-core-1.0.0.jar!/:na]
at edu.kit.datamanager.repo.util.PathUtils.getDataUri(PathUtils.java:69) ~[repo-core-1.0.0.jar!/:na]
at edu.kit.datamanager.repo.service.impl.SimpleDataVersioningService.write(SimpleDataVersioningService.java:67) ~[repo-core-1.0.0.jar!/:na]
at edu.kit.datamanager.repo.service.impl.ContentInformationService.create(ContentInformationService.java:156) ~[repo-core-1.0.0.jar!/:na]
The text was updated successfully, but these errors were encountered:
Describe the bug
While registering a Metadata Document with any self-provided Id, e.g. d1, I receive HTTP 400. The logfile gives me the following stacktrace:
The issue happens at IdBasedStorageService.java#L66 where the path is build starting with "/", whereas all other elements are added with "[part]" under Windows, which results in path /\d1for our chosen identifier.
Another issue, but also related to how to include IDs in the path occurs, if someone uses a URL as Id. Using 'http://localhost:8080/d1' results in the following stacktrace:
The text was updated successfully, but these errors were encountered: