monarch-initiative / owlsim-v3

Ontology Based Profile Matching
16 stars 5 forks source link

swagger is producing invalid json #33

Closed cmungall closed 7 years ago

cmungall commented 7 years ago

follow the istructios in the README, then try this http://localhost:8080/api/match/jaccard?id=http%3A%2F%2Fx.org%2Fheart-morphology&http%3A%2F%2Fx.org%2Fbrain-morphology

There was an error parsing the JSON document. The document may not be well-formed.
expected ':' after property name in object at line 1 column 3476
{"query":{"queryClassIds":["http://x.org/heart-morphology"],"filter":null,"limit":null,"referenceIndividualIds":null,"queryNegatedClassIds":[]},"matches":[{"matchId":"http://x.org/ind-heart-brain","matchLabel":"ind-heart-brain","rawScore":0.6666666666666666,"rank":1,"score":66.66666666666666,"significance":"NaN","percentageScore":67},{"matchId":"http://x.org/ind-heart-bone","matchLabel":"ind-heart-bone","rawScore":0.6666666666666666,"rank":1,"score":66.66666666666666,"significance":"NaN","percentageScore":67},{"matchId":"http://x.org/ind-heart-brain-bone","matchLabel":"ind-heart-brain-bone","rawScore":0.5,"rank":2,"score":50.0,"significance":"NaN","percentageScore":50},{"matchId":"http://x.org/ind-no-brain-phenotype","matchLabel":"ind-no-brain-phenotype","rawScore":0.5,"rank":2,"score":50.0,"significance":"NaN","percentageScore":50},{"matchId":"http://x.org/ind-unstated-phenotype","matchLabel":"ind-unstated-phenotype","rawScore":0.5,"rank":2,"score":50.0,"significance":"NaN","percentageScore":50},{"matchId":"http://x.org/ind-small-heart-small-brain","matchLabel":"ind-small-heart-small-brain","rawScore":0.4,"rank":3,"score":40.0,"significance":"NaN","percentageScore":40},{"matchId":"http://x.org/ind-big-heart-big-brain","matchLabel":"ind-big-heart-big-brain","rawScore":0.4,"rank":3,"score":40.0,"significance":"NaN","percentageScore":40},{"matchId":"http://x.org/ind-big-heart-small-brain","matchLabel":"ind-big-heart-small-brain","rawScore":0.4,"rank":3,"score":40.0,"significance":"NaN","percentageScore":40},{"matchId":"http://x.org/ind-small-heart-big-brain","matchLabel":"ind-small-heart-big-brain","rawScore":0.4,"rank":3,"score":40.0,"significance":"NaN","percentageScore":40},{"matchId":"http://x.org/ind-brain","matchLabel":"ind-brain","rawScore":0.3333333333333333,"rank":4,"score":33.33333333333333,"significance":"NaN","percentageScore":33},{"matchId":"http://x.org/ind-bone","matchLabel":"ind-bone","rawScore":0.3333333333333333,"rank":4,"score":33.33333333333333,"significance":"NaN","percentageScore":33},{"matchId":"http://x.org/ind-inc-all","matchLabel":"ind-inc-all","rawScore":0.2857142857142857,"rank":5,"score":28.57142857142857,"significance":"NaN","percentageScore":29},{"matchId":"http://x.org/ind-dec-all","matchLabel":"ind-dec-all","rawScore":0.2857142857142857,"rank":5,"score":28.57142857142857,"significance":"NaN","percentageScore":29},{"matchId":"http://x.org/ind-big-femur","matchLabel":"ind-big-femur","rawScore":0.2222222222222222,"rank":6,"score":22.22222222222222,"significance":"NaN","percentageScore":22},{"matchId":"http://x.org/ind-small-femur","matchLabel":"ind-small-femur","rawScore":0.2222222222222222,"rank":6,"score":22.22222222222222,"significance":"NaN","percentageScore":22}],"executionMetadata":{"timeStarted":1480717235611,"timeEnded":1480717235612,"duration":1},"methodMetadata":{"methodName":"jaccard"},"referenceMatches":{},"scores":{"windowSize":-1,"meanImpl":{"result":"NaN","n":0,"data":null},"geometricMeanImpl":{"result":"NaN","n":0,"sumLogImpl":{"n":0,"result":0.0,"data":null},"data":null},"kurtosisImpl":{"result":"NaN","n":0,"data":null},"maxImpl":{"n":0,"result":"NaN","data":null},"minImpl":{"n":0,"result":"NaN","data":null},"percentileImpl":{"kthSelector":{"pivotingStrategy"}}}}

this piece at the end is invalid

{"kthSelector":{"pivotingStrategy"}}
cmungall commented 7 years ago

Maybe related:

! com.fasterxml.jackson.databind.JsonMappingException: No serializer found for class org.apache.commons.math3.util.MedianOf3PivotingStrategy and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: org.monarchinitiative.owlsim.model.match.impl.MatchSetImpl["scores"]->org.apache.commons.math3.stat.descriptive.DescriptiveStatistics["percentileImpl"]->org.apache.commons.math3.stat.descriptive.rank.Percentile["kthSelector"]->org.apache.commons.math3.util.KthSelector["pivotingStrategy"])
! at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:275) ~[owlsim-services-3.0-SNAPSHOT.jar:na]
! at com.fasterxml.jackson.databind.SerializerProvider.mappingException(SerializerProvider.java:1109) ~[owlsim-services-3.0-SNAPSHOT.jar:na]