Skip to content

Error from example code #2

Description

@amrapalijz

When I run the example at: https://github.com/ncbo/ncbo_rest_sample_code/blob/master/java/src/AnnotateText.java
I get the error
java.io.FileNotFoundException: http://data.bioontology.org/ontologies/MP/classes/http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FMPATH_359
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1835)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1440)
at AnnotateText.get(AnnotateText.java:96)
at AnnotateText.printAnnotations(AnnotateText.java:49)
at AnnotateText.main(AnnotateText.java:26)
com.fasterxml.jackson.databind.JsonMappingException: No content to map due to end-of-input
at [Source: java.io.StringReader@30c7da1e; line: 1, column: 1]
at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:164)
at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:2836)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:2778)
at com.fasterxml.jackson.databind.ObjectMapper.readTree(ObjectMapper.java:1659)
at AnnotateText.jsonToNode(AnnotateText.java:74)
at AnnotateText.printAnnotations(AnnotateText.java:49)
at AnnotateText.main(AnnotateText.java:26)
Class details
Exception in thread "main" java.lang.NullPointerException
at AnnotateText.printAnnotations(AnnotateText.java:51)
at AnnotateText.main(AnnotateText.java:26)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions