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