You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Thilo Goetz (JIRA)" <ui...@incubator.apache.org> on 2009/07/23 17:25:14 UTC

[jira] Commented: (UIMA-1352) java.lang.ClassCastException using find() with a SET index

    [ https://issues.apache.org/jira/browse/UIMA-1352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12734616#action_12734616 ] 

Thilo Goetz commented on UIMA-1352:
-----------------------------------

Pablo, remind me to buy you a beer next time I see you.  I found the bug, it's way down in the index implementation, where one int looks like any other.

> java.lang.ClassCastException using find() with a SET index
> ----------------------------------------------------------
>
>                 Key: UIMA-1352
>                 URL: https://issues.apache.org/jira/browse/UIMA-1352
>             Project: UIMA
>          Issue Type: Bug
>          Components: Core Java Framework
>    Affects Versions: 2.2.2
>         Environment: Linux openSUSE 10.2
>            Reporter: Pablo D.
>            Assignee: Thilo Goetz
>         Attachments: uima_test.zip
>
>
> It is not possible to use the FSIndex.find() method when the indexing strategy is a SET.
> A java.lang.ClassCastException is thrown.
> For example:
> FSIndex idx = aJCas.getJFSIndexRepository().getIndex("idx_SET");
> while (doSomething) {
>    MyFeatureStructure myFs = new MyFeatureStructure(aJCas);
>    myFs.setMyFeature(value);
>    myFs.addToIndexes();
>  
>    // Try to recover from index    
>    MyFeatureStructure otherFs = (MyFeatureStructure)idx.find(myFs);  // ClassCastException !!!!
>    ...
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.