On Feb 19, 2008 5:22 PM, John Cabral <[EMAIL PROTECTED]> wrote: > I am trying to pass the URI of the file I want to process to my > engine. The code that I am using works as expected when I extract > the text from a text document and add it to a CAS using its > setDocumentText() method. What is the proper set of methods that need > to be called when sending just the URI? This is the basic code that I > am using: > > AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier); > CAS cas = ae.newCAS(); > MimetypesFileTypeMap mimetypeMap = new MimetypesFileTypeMap (); > cas.setSofaDataURI(inputFileURI, mimetypeMap.getContentType(inputFileURI)); > > At the last line I get this error (this is the complete trace): > > java.lang.ArrayIndexOutOfBoundsException: -1 >
The method cas.setSofaDataURI(String, String) is not throwing the exception here. Looks to me like access to an empty map is doing it. Eddie
