I just checked the code for setting Strings using JCas, and it seems you've stumbled onto a bug ... The generated JCas code uses low level string access APIs into the CAS and those do not include the
invalid-range checking for strings with allowed types.

We'll put in a defect to fix this in an upcoming release (probably on Apache).

Can you work around this for now?

-Marshall

Marshall Schor wrote:
Ekaterina Buyko wrote:
<snip>I do not get any exceptions. My process method attends in the catch block the IndexOutOfBoundsException.
What kind of exception should be thrown in the described case?
You should be getting a CASRuntimeException, with the message:
Error setting string value: string "{0}" is not valid for a value of type "{1}".

with appropriate substitutions for {0} and {1}. Can you try catching that exception?
-Marshall



Reply via email to