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

PhenopacketValidatorRuntimeException: Could not find input json file #28

Open
MauricioMoldes opened this issue Dec 2, 2021 · 2 comments

Comments

@MauricioMoldes
Copy link

Hi !

I am currently exploring this phenopacket validator tool re-using the 384 phenopacket dataset from https://zenodo.org/record/3905420#.YajQ3r_MJH5

########
Command
########

$ java -jar validator-cli-0.1.1-SNAPSHOT.jar validate -p=/home/mmoldes/Documents/EGA/bioteam/pheno_test/phenopackets/phenopackets/Yang-2016-MFN2-patient.json

#######
Issue
#######

It seems that the positionals are correct, and so is the file path.

mycommand was called with --rare=false and positionals: [validate]

However, the tool is outputting file not found, in a different directory than filepath.

org.phenopackets.schema.validator.core.except.PhenopacketValidatorRuntimeException: Could not find input json file "/home/mmoldes/Documents/EGA/bioteam/pheno_test/phenopacket-validator/validator-cli/target/validate"

Am I doing something wrong?

java --version
openjdk 11.0.11 2021-04-20
OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2)
OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2, mixed mode, sharing)

########
output log
########

14:54:06.732 [main] INFO org.phenopackets.schema.validator.cli.ValidatorApplication - STARTING THE APPLICATION
. __ __
_
\ |
____ ____ ____ ___________ ____ | | __ / |
| / | _/ __ \ / \ / _ \
_
\ / | |/ // __ \ _
| | | Y \ /| | ( <> ) |> > __ \ _
| <\ /| |
|
| |
| /_
>
| /_/| (_ /___ >|_ \_ >|
/ / / |
| / / / /
____ ____ .__ .__ .___ __
\ \ / /____ | | || | /_ / | ___________
\ Y /__ \ | | | |/ __ |__ \ / _ _ __
\ / / __ | || / // | / __ | | ( <_> ) | /
_/ (____ /____/
____ |(____ /| _/|_|
/ / /

                                                     v0.1.1-SNAPSHOT

2021-12-02 14:54:07.222 INFO 33200 --- [ main] o.p.s.v.cli.ValidatorApplication : Starting ValidatorApplication v0.1.1-SNAPSHOT using Java 11.0.11 on mmoldes-GE66-Raider-10UE with PID 33200 (/home/mmoldes/Documents/EGA/bioteam/pheno_test/phenopacket-validator/validator-cli/target/validator-cli-0.1.1-SNAPSHOT.jar started by mmoldes in /home/mmoldes/Documents/EGA/bioteam/pheno_test/phenopacket-validator/validator-cli/target)
2021-12-02 14:54:07.223 INFO 33200 --- [ main] o.p.s.v.cli.ValidatorApplication : No active profile set, falling back to default profiles: default
2021-12-02 14:54:07.665 INFO 33200 --- [ main] o.p.s.v.cli.ValidatorApplication : Started ValidatorApplication in 0.834 seconds (JVM running for 1.119)
2021-12-02 14:54:07.714 WARN 33200 --- [ main] picocli.spring.PicocliSpringFactory : Unable to get bean of class interface java.util.List, using default Picocli factory
mycommand was called with --rare=false and positionals: [validate]
2021-12-02 14:54:07.716 INFO 33200 --- [ main] o.p.s.validator.cli.ValidateCommand : EXECUTING : command line runner
org.phenopackets.schema.validator.core.except.PhenopacketValidatorRuntimeException: Did not recognize error type: "enum"
at org.phenopackets.schema.validator.core.validation.ErrorType.stringToErrorType(ErrorType.java:34)
at org.phenopackets.schema.validator.core.jsonschema.JsonValidationError.(JsonValidationError.java:18)
at org.phenopackets.schema.validator.core.jsonschema.JsonSchemaValidator.lambda$validate$0(JsonSchemaValidator.java:76)
at java.base/java.lang.Iterable.forEach(Iterable.java:75)
at org.phenopackets.schema.validator.core.jsonschema.JsonSchemaValidator.validate(JsonSchemaValidator.java:76)
at org.phenopackets.schema.validator.core.PhenopacketValidator.genericValidation(PhenopacketValidator.java:90)
at org.phenopackets.schema.validator.core.PhenopacketValidator.(PhenopacketValidator.java:56)
at org.phenopackets.schema.validator.cli.ValidateCommand.call(ValidateCommand.java:45)
at org.phenopackets.schema.validator.cli.ValidateCommand.call(ValidateCommand.java:17)
at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
at picocli.CommandLine.access$1300(CommandLine.java:145)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2352)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2346)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2311)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
at picocli.CommandLine.execute(CommandLine.java:2078)
at org.phenopackets.schema.validator.cli.ValidatorApplicationRunner.run(ValidatorApplicationRunner.java:32)
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:791)
at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:775)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:345)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1332)
at org.phenopackets.schema.validator.cli.ValidatorApplication.main(ValidatorApplication.java:22)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:108)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88)
org.phenopackets.schema.validator.core.except.PhenopacketValidatorRuntimeException: Could not find input json file "/home/mmoldes/Documents/EGA/bioteam/pheno_test/phenopacket-validator/validator-cli/target/validate"
at org.phenopackets.schema.validator.core.PhenopacketValidator.additionalValidation(PhenopacketValidator.java:66)
at org.phenopackets.schema.validator.core.PhenopacketValidator.(PhenopacketValidator.java:58)
at org.phenopackets.schema.validator.cli.ValidateCommand.call(ValidateCommand.java:45)
at org.phenopackets.schema.validator.cli.ValidateCommand.call(ValidateCommand.java:17)
at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
at picocli.CommandLine.access$1300(CommandLine.java:145)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2352)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2346)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2311)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
at picocli.CommandLine.execute(CommandLine.java:2078)
at org.phenopackets.schema.validator.cli.ValidatorApplicationRunner.run(ValidatorApplicationRunner.java:32)
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:791)
at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:775)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:345)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1332)
at org.phenopackets.schema.validator.cli.ValidatorApplication.main(ValidatorApplication.java:22)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:108)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88)
2021-12-02 14:54:07.850 INFO 33200 --- [ main] o.p.s.v.cli.ValidatorApplication : APPLICATION FINISHED

@julesjacobsen
Copy link
Contributor

julesjacobsen commented Dec 2, 2021

Hi @MauricioMoldes! Sorry, this validator project has been merged with the phenopacket-tools. If you checkout the develop branch - https://github.com/phenopackets/phenopacket-tools/tree/develop and build it then this is how you'd go about trying the validator:

wget https://zenodo.org/record/3905420/files/phenopackets.zip?download=1
unzip phenopackets.zip
# validate all files in a directory
java -jar phenotools-cli-0.0.2-SNAPSHOT.jar validate ./phenopackets/*
# alternatively for a single file
java -jar phenotools-cli-0.0.2-SNAPSHOT.jar validate ./phenopackets/Abdul_Wahab-2016-GCDH-Patient_5.json

This is all still a bit of a work-in-progress.

@MauricioMoldes
Copy link
Author

Wonderfull! Thank you @julesjacobsen

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