Jorn, I've added a new testcase that is based on what you've described your client does. It was added to the TestUimaASExtended.java in the uimaj-as-activemq project. The name of the testcase: testClientProcess(). I can send 100 CASes to a service with no problem. Can you check the source of the testcase and tell me how it differs from your code.
Thanks, Jerry On Wed, Sep 2, 2009 at 4:22 AM, Jörn Kottmann <kottm...@gmail.com> wrote: > Jaroslaw Cwiklik wrote: > >> Jorn, I took Burn's suggestion and removed a busy loop from the getCas(). >> Instead of waiting between retries I use a semaphore to signal >> availability of a CAS. Not sure what this hang is all about. Can you >> refresh >> all projects from the svn and try again. >> >> > The refresh removed a bunch of classes and updated the loop > from wait to semaphore. > > The application now fails non deterministic. > > Here is the piece of the loop in which it fails: > CAS cas = uimaAsEngine.getCAS(); > cas.setDocumentText(Bytes.toString(result.getRow())); > > There are two different erros I get, either > > Exception in thread "main" org.apache.uima.cas.CASRuntimeException: Data > for Sofa feature setLocalSofaData(String) has already been set. > at > org.apache.uima.cas.impl.SofaFSImpl.setLocalSofaData(SofaFSImpl.java:105) > at org.apache.uima.cas.impl.CASImpl.setSofaDataString(CASImpl.java:4102) > at org.apache.uima.cas.impl.CASImpl.setDocumentText(CASImpl.java:4087) > at Retag.main(Retag.java:89) > > or > > Exception in thread "main" java.lang.NullPointerException > at Retag.main(Retag.java:89) > > The second one appears to occur especially if there is a breakpoint at > getCas(). > > Jörn >