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 Parker (JIRA)" <de...@uima.apache.org> on 2016/05/03 18:37:13 UTC
[jira] [Commented] (UIMA-4915) NullPointerException in
CasSerializerSupport when called from JsonCasSerializer and features
reference the cas:NULL element
[ https://issues.apache.org/jira/browse/UIMA-4915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15269011#comment-15269011 ]
Philip Parker commented on UIMA-4915:
-------------------------------------
The stack trace is as follows:
Caused by: java.lang.NullPointerException
at org.apache.uima.cas.impl.CasSerializerSupport$CasDocSerializer.enqueueCommon(CasSerializerSupport.java:693)
at org.apache.uima.cas.impl.CasSerializerSupport$CasDocSerializer.enqueueCommon(CasSerializerSupport.java:646)
at org.apache.uima.cas.impl.CasSerializerSupport$CasDocSerializer.enqueue(CasSerializerSupport.java:728)
at org.apache.uima.cas.impl.CasSerializerSupport$CasDocSerializer.enqueueFeatures(CasSerializerSupport.java:853)
at org.apache.uima.cas.impl.CasSerializerSupport$CasDocSerializer.enqueue(CasSerializerSupport.java:733)
at org.apache.uima.cas.impl.CasSerializerSupport$CasDocSerializer.enqueueFeatures(CasSerializerSupport.java:900)
at org.apache.uima.cas.impl.CasSerializerSupport$CasDocSerializer.enqueueFeaturesOfFSs(CasSerializerSupport.java:641)
at org.apache.uima.cas.impl.CasSerializerSupport$CasDocSerializer.enqueueFeaturesOfIndexed(CasSerializerSupport.java:631)
at org.apache.uima.cas.impl.CasSerializerSupport$CasDocSerializer.serialize(CasSerializerSupport.java:417)
at org.apache.uima.json.JsonCasSerializer.serialize(JsonCasSerializer.java:318)
> 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)