You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Philip Ogren (JIRA)" <ui...@incubator.apache.org> on 2007/06/21 19:22:26 UTC
[jira] Created: (UIMA-464) ClassCastException thrown when using
subiterator and moveTo()
ClassCastException thrown when using subiterator and moveTo()
-------------------------------------------------------------
Key: UIMA-464
URL: https://issues.apache.org/jira/browse/UIMA-464
Project: UIMA
Issue Type: Bug
Components: Core Java Framework
Affects Versions: 2.1
Environment: N/A
Reporter: Philip Ogren
I am having difficulty with using the FSIterator returned by the AnnotationIndex.subiterator(AnnotationFS) method.
The following is a code fragment:
AnnotationIndex annotationIndex = jCas.getAnnotationIndex(tokenType);
FSIterator tokenIterator = annotationIndex.subiterator(sentenceAnnotation);
tokenIterator.moveTo(tokenAnnotation);
Here is the relevant portion of the stack trace:
java.lang.ClassCastException: edu.colorado.cslr.dessert.types.Token
at java.util.Collections.indexedBinarySearch(Unknown Source)
at java.util.Collections.binarySearch(Unknown Source)
at org.apache.uima.cas.impl.Subiterator.moveTo(Subiterator.java:224)
If I change the second line to the following, then I do not have any problems with an exception being thrown.
FSIterator tokenIterator = annotationIndex.iterator();
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (UIMA-464) ClassCastException thrown when using
subiterator and moveTo()
Posted by "Thilo Goetz (JIRA)" <ui...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/UIMA-464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thilo Goetz updated UIMA-464:
-----------------------------
Fix Version/s: 2.2
> ClassCastException thrown when using subiterator and moveTo()
> -------------------------------------------------------------
>
> Key: UIMA-464
> URL: https://issues.apache.org/jira/browse/UIMA-464
> Project: UIMA
> Issue Type: Bug
> Components: Core Java Framework
> Affects Versions: 2.1
> Environment: N/A
> Reporter: Philip Ogren
> Assignee: Thilo Goetz
> Fix For: 2.2
>
> Attachments: UIMA-464.zip
>
>
> I am having difficulty with using the FSIterator returned by the AnnotationIndex.subiterator(AnnotationFS) method.
> The following is a code fragment:
> AnnotationIndex annotationIndex = jCas.getAnnotationIndex(tokenType);
> FSIterator tokenIterator = annotationIndex.subiterator(sentenceAnnotation);
> tokenIterator.moveTo(tokenAnnotation);
> Here is the relevant portion of the stack trace:
> java.lang.ClassCastException: edu.colorado.cslr.dessert.types.Token
> at java.util.Collections.indexedBinarySearch(Unknown Source)
> at java.util.Collections.binarySearch(Unknown Source)
> at org.apache.uima.cas.impl.Subiterator.moveTo(Subiterator.java:224)
> If I change the second line to the following, then I do not have any problems with an exception being thrown.
> FSIterator tokenIterator = annotationIndex.iterator();
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Work started: (UIMA-464) ClassCastException thrown when
using subiterator and moveTo()
Posted by "Thilo Goetz (JIRA)" <ui...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/UIMA-464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Work on UIMA-464 started by Thilo Goetz.
> ClassCastException thrown when using subiterator and moveTo()
> -------------------------------------------------------------
>
> Key: UIMA-464
> URL: https://issues.apache.org/jira/browse/UIMA-464
> Project: UIMA
> Issue Type: Bug
> Components: Core Java Framework
> Affects Versions: 2.1
> Environment: N/A
> Reporter: Philip Ogren
> Assignee: Thilo Goetz
> Fix For: 2.2
>
> Attachments: UIMA-464.zip
>
>
> I am having difficulty with using the FSIterator returned by the AnnotationIndex.subiterator(AnnotationFS) method.
> The following is a code fragment:
> AnnotationIndex annotationIndex = jCas.getAnnotationIndex(tokenType);
> FSIterator tokenIterator = annotationIndex.subiterator(sentenceAnnotation);
> tokenIterator.moveTo(tokenAnnotation);
> Here is the relevant portion of the stack trace:
> java.lang.ClassCastException: edu.colorado.cslr.dessert.types.Token
> at java.util.Collections.indexedBinarySearch(Unknown Source)
> at java.util.Collections.binarySearch(Unknown Source)
> at org.apache.uima.cas.impl.Subiterator.moveTo(Subiterator.java:224)
> If I change the second line to the following, then I do not have any problems with an exception being thrown.
> FSIterator tokenIterator = annotationIndex.iterator();
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (UIMA-464) ClassCastException thrown when using
subiterator and moveTo()
Posted by "Thilo Goetz (JIRA)" <ui...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/UIMA-464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thilo Goetz closed UIMA-464.
----------------------------
Resolution: Fixed
Ouch. This code has been in there for years, apparently never executed. Thanks for reporting this and submitting the test case.
> ClassCastException thrown when using subiterator and moveTo()
> -------------------------------------------------------------
>
> Key: UIMA-464
> URL: https://issues.apache.org/jira/browse/UIMA-464
> Project: UIMA
> Issue Type: Bug
> Components: Core Java Framework
> Affects Versions: 2.1
> Environment: N/A
> Reporter: Philip Ogren
> Assignee: Thilo Goetz
> Fix For: 2.2
>
> Attachments: UIMA-464.zip
>
>
> I am having difficulty with using the FSIterator returned by the AnnotationIndex.subiterator(AnnotationFS) method.
> The following is a code fragment:
> AnnotationIndex annotationIndex = jCas.getAnnotationIndex(tokenType);
> FSIterator tokenIterator = annotationIndex.subiterator(sentenceAnnotation);
> tokenIterator.moveTo(tokenAnnotation);
> Here is the relevant portion of the stack trace:
> java.lang.ClassCastException: edu.colorado.cslr.dessert.types.Token
> at java.util.Collections.indexedBinarySearch(Unknown Source)
> at java.util.Collections.binarySearch(Unknown Source)
> at org.apache.uima.cas.impl.Subiterator.moveTo(Subiterator.java:224)
> If I change the second line to the following, then I do not have any problems with an exception being thrown.
> FSIterator tokenIterator = annotationIndex.iterator();
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (UIMA-464) ClassCastException thrown when using
subiterator and moveTo()
Posted by "Thilo Goetz (JIRA)" <ui...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/UIMA-464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12506987 ]
Thilo Goetz commented on UIMA-464:
----------------------------------
Thanks, I'll look into this.
> ClassCastException thrown when using subiterator and moveTo()
> -------------------------------------------------------------
>
> Key: UIMA-464
> URL: https://issues.apache.org/jira/browse/UIMA-464
> Project: UIMA
> Issue Type: Bug
> Components: Core Java Framework
> Affects Versions: 2.1
> Environment: N/A
> Reporter: Philip Ogren
> Assignee: Thilo Goetz
> Attachments: UIMA-464.zip
>
>
> I am having difficulty with using the FSIterator returned by the AnnotationIndex.subiterator(AnnotationFS) method.
> The following is a code fragment:
> AnnotationIndex annotationIndex = jCas.getAnnotationIndex(tokenType);
> FSIterator tokenIterator = annotationIndex.subiterator(sentenceAnnotation);
> tokenIterator.moveTo(tokenAnnotation);
> Here is the relevant portion of the stack trace:
> java.lang.ClassCastException: edu.colorado.cslr.dessert.types.Token
> at java.util.Collections.indexedBinarySearch(Unknown Source)
> at java.util.Collections.binarySearch(Unknown Source)
> at org.apache.uima.cas.impl.Subiterator.moveTo(Subiterator.java:224)
> If I change the second line to the following, then I do not have any problems with an exception being thrown.
> FSIterator tokenIterator = annotationIndex.iterator();
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (UIMA-464) ClassCastException thrown when using
subiterator and moveTo()
Posted by "Philip Ogren (JIRA)" <ui...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/UIMA-464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Philip Ogren updated UIMA-464:
------------------------------
Attachment: UIMA-464.zip
Please see README in the top level of the directory.
If there is something I could have done to make this fit better into your regression test suite, then please let me know.
> ClassCastException thrown when using subiterator and moveTo()
> -------------------------------------------------------------
>
> Key: UIMA-464
> URL: https://issues.apache.org/jira/browse/UIMA-464
> Project: UIMA
> Issue Type: Bug
> Components: Core Java Framework
> Affects Versions: 2.1
> Environment: N/A
> Reporter: Philip Ogren
> Attachments: UIMA-464.zip
>
>
> I am having difficulty with using the FSIterator returned by the AnnotationIndex.subiterator(AnnotationFS) method.
> The following is a code fragment:
> AnnotationIndex annotationIndex = jCas.getAnnotationIndex(tokenType);
> FSIterator tokenIterator = annotationIndex.subiterator(sentenceAnnotation);
> tokenIterator.moveTo(tokenAnnotation);
> Here is the relevant portion of the stack trace:
> java.lang.ClassCastException: edu.colorado.cslr.dessert.types.Token
> at java.util.Collections.indexedBinarySearch(Unknown Source)
> at java.util.Collections.binarySearch(Unknown Source)
> at org.apache.uima.cas.impl.Subiterator.moveTo(Subiterator.java:224)
> If I change the second line to the following, then I do not have any problems with an exception being thrown.
> FSIterator tokenIterator = annotationIndex.iterator();
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (UIMA-464) ClassCastException thrown when using
subiterator and moveTo()
Posted by "Thilo Goetz (JIRA)" <ui...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/UIMA-464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thilo Goetz reassigned UIMA-464:
--------------------------------
Assignee: Thilo Goetz
> ClassCastException thrown when using subiterator and moveTo()
> -------------------------------------------------------------
>
> Key: UIMA-464
> URL: https://issues.apache.org/jira/browse/UIMA-464
> Project: UIMA
> Issue Type: Bug
> Components: Core Java Framework
> Affects Versions: 2.1
> Environment: N/A
> Reporter: Philip Ogren
> Assignee: Thilo Goetz
> Attachments: UIMA-464.zip
>
>
> I am having difficulty with using the FSIterator returned by the AnnotationIndex.subiterator(AnnotationFS) method.
> The following is a code fragment:
> AnnotationIndex annotationIndex = jCas.getAnnotationIndex(tokenType);
> FSIterator tokenIterator = annotationIndex.subiterator(sentenceAnnotation);
> tokenIterator.moveTo(tokenAnnotation);
> Here is the relevant portion of the stack trace:
> java.lang.ClassCastException: edu.colorado.cslr.dessert.types.Token
> at java.util.Collections.indexedBinarySearch(Unknown Source)
> at java.util.Collections.binarySearch(Unknown Source)
> at org.apache.uima.cas.impl.Subiterator.moveTo(Subiterator.java:224)
> If I change the second line to the following, then I do not have any problems with an exception being thrown.
> FSIterator tokenIterator = annotationIndex.iterator();
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.