Hi again, I have once again switched my local environment to a UIMA v3 mode:
- UIMA SDK v3 (3.0.1-beta-SNAPSHOT v3 branch) - uimaFIT (3.0.0-SNAPSHOT v3 branch) - DKPro Core (2.0.x branch) - WebAnno (feature/issue1115-uimav3 branch) Last time, I ran into trouble because the IDs loaded from serialized CAS files were no longer accessible. I programmatically set "uima.default_v2_id_references" to "true" during startup now to avoid that. But what seems to be happening even before getting there is that I run again in JCas <-> Type System problems. When a user opens a document for annotation in WebAnno, WebAnno loads the serialized CAS (CasCompleteSerializer), serializes the CAS into a byte array (compressed form 6), creates a new CAS with the current type system definition, and deserializes the data again into that CAS. The idea is that the lenient loading of the compressed form 6 allows a) new types / features to be added in that way b) unreachable FSes to be garbage collected So, it is not an uncommon case here that the data stored with the CasCompleteSerializer used a different type system than the CAs into which it is loaded - and in fact it can be the case that the data stored with the CasCompleteSerializer had used different JCas wrappers at the time then what is available at the time of loading the data again. Afaik in there should be no truely incompatible changes in the type system though - i.e. only new features / types were added; no features were removed. Still, I get a lot of this type of error: > org.apache.uima.cas.CASRuntimeException: The JCas cannot be initialized. The > following errors occurred: > In JCAS class > "de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.morph.MorphologicalFeatures", > UIMA field > "de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.morph.MorphologicalFeatures:verbForm" > was set up when this class was previously loaded and initialized, to have an > adjusted offset of "-1" but now the feature has a different adjusted offset > of "5"; this may be due to something else other than type system commit > actions loading and initializing the JCas class, or to having a different > non-compatible type system for this class, trying to use a common JCas cover > class, which is not supported. > <snip> > at > org.apache.uima.cas.impl.FSClassRegistry.reportErrors(FSClassRegistry.java:870) > ~[classes/:?] > at > org.apache.uima.cas.impl.FSClassRegistry.loadJCasForTSandClassLoader(FSClassRegistry.java:342) > ~[classes/:?] > at > org.apache.uima.cas.impl.FSClassRegistry.getGeneratorsForClassLoader(FSClassRegistry.java:904) > ~[classes/:?] > at > org.apache.uima.cas.impl.TypeSystemImpl.getGeneratorsForClassLoader(TypeSystemImpl.java:2651) > ~[classes/:?] > at > org.apache.uima.cas.impl.TypeSystemImpl.commit(TypeSystemImpl.java:1393) > ~[classes/:?] > at org.apache.uima.cas.impl.CASImpl.commitTypeSystem(CASImpl.java:1607) > ~[classes/:?] > at > org.apache.uima.util.CasCreationUtils.doCreateCas(CasCreationUtils.java:614) > ~[classes/:?] > at > org.apache.uima.util.CasCreationUtils.createCas(CasCreationUtils.java:362) > ~[classes/:?] > at > org.apache.uima.util.CasCreationUtils.createCas(CasCreationUtils.java:313) > ~[classes/:?] > at > org.apache.uima.fit.factory.JCasFactory.createJCas(JCasFactory.java:147) > ~[classes/:?] > at > de.tudarmstadt.ukp.clarin.webanno.api.dao.AnnotationSchemaServiceImpl.upgradeCas(AnnotationSchemaServiceImpl.java:640) > ~[classes/:?] I have the feeling that this is what happens: 1) a CasCompleteSerialized-CAS is loaded - it was created at a time when the MorphologicalFeatures did not yet have a feature called "verbForm". 2) I create a new JCas, now using a type system description where MorphologicalFeatures includes the "verbForm" feature At step 2, the above error seems to be triggered. I actually do not even get to the point where I would temporarily serialize into form 6 and back. The code already crashes when trying to set up the target task with the updated type system. Any ideas? Cheers, -- Richard
