Uploaded image for project: 'UIMA'
  1. UIMA
  2. UIMA-1352

java.lang.ClassCastException using find() with a SET index

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.2
    • 2.3
    • Core Java Framework
    • None
    • Linux openSUSE 10.2

    Description

      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 !!!!
      ...
      }

      Attachments

        1. uima_test.zip
          31 kB
          Pablo D.

        Activity

          People

            twgoetz Thilo Goetz
            jirasag Pablo D.
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: