Hi Thilo,
Re Tong's comments: it's odd that we have the same
functionality twice, with different implementations.
I have no idea how that came about. However, looking
at the source code, the alternative should have
exactly the same problems.
Tong is right. "TypeSystemUtil.typeSystem2TypeSystemDescription(cas.getTypeSystem()).toXML;"
produces another XML type system then TypeSystem2Xml.
The creation of the CAS and the deserialization now works correctly with the type system from
TypeSystemUtil.
In my opinion TypeSystem2Xml is dispensable (if you want to avoid the
duplication in a future version).
For one TypeSystem2Xml is not even described in the current Javadocs, for another TypeSystemUtil is
much more the way the UIMA framework works.
Nevertheless, here is a bug report for TypeSystem2Xml:
https://issues.apache.org/jira/browse/UIMA-1388
Regards,
Kai