[ https://issues.apache.org/jira/browse/UIMA-4915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15269593#comment-15269593 ]
Marshall Schor commented on UIMA-4915: -------------------------------------- I took a look at the code, and it looks like perhaps the CAS has gotten corrupted. Here's my analysis; numbers in parenthesis refer to line numbers; I'm using the current "trunk" version of the code which I think matches what you're running, because the stacktrace line numbers match exactly. enqueueFeaturesOfFSs (641) calls : enqueueFeatures. In line 861, that method iterates over all the features, and gets the feature value in line 870. In line 871 and 2 it tests this value for null, and if found, skips further processing for this feature value. So, going beyond here, the feature value is not null. Processing continues to line 900, where it calls enqueueFeatures (727). At this point featVal cannot be null (line 871 tested for this). Line 728 calls enqueueCommon; this calls enequeueCommon (653) with an additional param in line 646. The first line of that gets a typeCode for the non-null feature value. This must be non- 0 unless there's something that's corrupted the CAS. There's an assert statement that checks for this: on line 656. Can you rerun with asserts enabled, and see if this one pops? (JVM param -ea ). > NullPointerException in CasSerializerSupport when called from > JsonCasSerializer and features reference the cas:NULL element > --------------------------------------------------------------------------------------------------------------------------- > > Key: UIMA-4915 > URL: https://issues.apache.org/jira/browse/UIMA-4915 > Project: UIMA > Issue Type: Bug > Components: Core Java Framework > Affects Versions: 2.7.0SDK, 2.8.1SDK > Environment: All > Reporter: Philip Parker > > When serializing a CAS, if there are references to the NULL element > (<cas:NULL xmi:id="0"/>) in the features for an annotation, a > NullPointerException is thrown at line 693 of CasSerializerSupport. It > appears that the ll_getTypeForCode(0) returns null, resulting in a > NullPointerException when the "getName()" method is called on the return > object. > The same CAS can successfully be serialized to XML using the XmlCasSerializer. -- This message was sent by Atlassian JIRA (v6.3.4#6332)