You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The JCas classes have an "offset" assigned to their features. When committing a type system, these offsets are set the first time a type system is committed and validated on subsequent type system commits. This can cause problems if the type systems contain different numbers of features for a given type.
To Reproduce
Steps to reproduce the behavior:
Define a type MySuper with a feature x
Define a type MySub with a feature z
Generate JCas classes for both
Load the type system description that defines the two types and add another feature y to MySuper
Create a new JCas instance that uses the type system description from step 4
Create a new JCas instance that uses the original type system description that does not contain y
This should generate an error like
Caused by: org.apache.uima.UIMA_IllegalStateException: Loaded JCas Type MySub has feature z with two different type systems having different offsets; this is not supported.
at org.apache.uima.cas.impl.FSClassRegistry.updateOrValidateAllCallSitesForJCasClass(FSClassRegistry.java:1662)
... 125 more
Expected behavior
When assigning feature offsets to be used in JCas classes, all features that are actually part of the JCas class should always be assigned first through the entire JCas class hierarchy. Offsets for features defined in the type system description but not in the JCas class should always be assigned afterwards. Features that are defined in the JCas class but not in the type system description should still get assigned an offset to ensure that their offset is not consumed by the time another type system is loaded that might include the feature.
Please complete the following information:
Version: 3.5.1
The text was updated successfully, but these errors were encountered:
Describe the bug
The JCas classes have an "offset" assigned to their features. When committing a type system, these offsets are set the first time a type system is committed and validated on subsequent type system commits. This can cause problems if the type systems contain different numbers of features for a given type.
To Reproduce
Steps to reproduce the behavior:
MySuper
with a featurex
MySub
with a featurez
y
toMySuper
y
Expected behavior
When assigning feature offsets to be used in JCas classes, all features that are actually part of the JCas class should always be assigned first through the entire JCas class hierarchy. Offsets for features defined in the type system description but not in the JCas class should always be assigned afterwards. Features that are defined in the JCas class but not in the type system description should still get assigned an offset to ensure that their offset is not consumed by the time another type system is loaded that might include the feature.
Please complete the following information:
The text was updated successfully, but these errors were encountered: