Thank you very much.
I have found that there was a logical error with indefinite loop in my code.
thank you all for your prompt response

On Sun, May 27, 2012 at 7:43 PM, Marshall Schor <[email protected]> wrote:

> please force a stack trace dump in Java once it is "hung" in the last
> line, and see if that helps you figure out what's going on.  If you wish,
> you can post the stack trace in a reply for others to help look at it.
>
> See http://java.sun.com/developer/**technicalArticles/Programming/**
> Stacktrace/<http://java.sun.com/developer/technicalArticles/Programming/Stacktrace/>for
>  info on how to get Sun/Oracle Java to do this.
>
> -Marshall
>
>
>
>
> On 5/27/2012 11:21 AM, Seid Muhie wrote:
>
>> I mean it just wait there forever.
>> yes I tried debugging, but it didn't pass that line. it just waits there
>> without exceptions.
>>
>> On Sun, May 27, 2012 at 5:06 PM, Thilo Goetz<[email protected]>  wrote:
>>
>>  On 27/05/12 16:59, Seid Muhie wrote:
>>>
>>>> Dear Thilo Goetz
>>>> Thank you for your response
>>>>
>>>> I have aleardy tried different ways of reading text file with different
>>>> encodings.
>>>>
>>>> For example using commons IO FileUtils class, I tried as follows
>>>>
>>>> ............
>>>> String document = FileUtils.file2String(**inputFile, "UTF-8");
>>>> tcas.setDocumentText(document)**;
>>>> tae.process(tcas);
>>>>                    ......
>>>>
>>>> It again stuck at process() method. It seems the problem is with that
>>>>
>>> method
>>>
>>> What do you mean, stuck at?  Have you tried debugging to see
>>> what it's doing?
>>>
>>>  thank you very mucb
>>>>
>>>> On Sun, May 27, 2012 at 8:42 AM, Thilo Goetz<[email protected]>  wrote:
>>>>
>>>>  On 26/05/12 23:13, Seid Muhie wrote:
>>>>>
>>>>>> dear all
>>>>>> I have Unicode document I want to process.
>>>>>> Following the tutorial at
>>>>>> this<http://www.ibm.com/**developerworks/webservices/**
>>>>>> tutorials/ws-uima/<http://www.ibm.com/developerworks/webservices/tutorials/ws-uima/>
>>>>>>
>>>>> ,
>>>>
>>>>> the code stucks at the last line.
>>>>>>
>>>>>>                         File taeDescriptor = new
>>>>>> File("desc\\**DateAnnotatorAEDescriptor.xml"**);
>>>>>> File inputFile = new File("data\\document1.txt");
>>>>>> XMLInputSource in = new XMLInputSource(taeDescriptor);
>>>>>> ResourceSpecifier specifier =
>>>>>> UIMAFramework.getXMLParser().**parseResourceSpecifier(in);
>>>>>> AnalysisEngine tae = UIMAFramework.**produceAnalysisEngine(**
>>>>>> specifier);
>>>>>> CAS tcas = tae.newCAS();
>>>>>> FileInputStream fis = new FileInputStream(inputFile);
>>>>>> byte[] contents = new byte[(int) inputFile.length()];
>>>>>> fis.read(contents);
>>>>>> fis.close();
>>>>>> String document = new String(contents);
>>>>>> tcas.setDocumentText(document)**;
>>>>>> *tae.process(tcas);*
>>>>>>
>>>>>> thank you.
>>>>>>
>>>>>>  Please check the web on how to read in a text file with
>>>>> a specific encoding.  An easy way is to use commons io.
>>>>>
>>>>> --Thilo
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>


-- 
Seid M.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dream bright, success will follow!
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Reply via email to