Search Mailing List Archives

Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[bioontology-support] JAVA IOException code 414 URL too long, with get call

Mona Salem monasalem123 at
Wed Feb 26 10:42:50 PST 2014

Hi All
I have used the from github repository.  I have changed it
a bit, so to pass parameters generated in another class of my code.
(I am calling the AnnotateText.stringToAnnotate method from my code.  I am
passing the String abstractinfo.)

public class AnnotateText {

    static final String REST_URL = "";
    static final String API_KEY = "";
    static final ObjectMapper mapper = new ObjectMapper();

    public static void stringToAnnotate(String abstractinfo) throws
Exception {
        String textToAnnotate = URLEncoder.encode(abstractinfo "UTF-8");

        // Get just annotations only
        JsonNode annotations = jsonToNode(get(REST_URL +
"/annotator?ontologies=NCIT&text=" + textToAnnotate));

After reading the get, 
        JsonNode annotations = jsonToNode(get(REST_URL +
"/annotator?ontologies=NCIT&text=" + textToAnnotate));

I get the 414 URL too long error.
How long can text be when I read with get; ie what is the max length?  Are
you changing this portion of code to POST instead?

Thanks for any help on this
Mona Nafoosi
G6G Consulting Group
Santa Monica CA

More information about the bioontology-support mailing list