Hi Sean,
The code was:
JsonCasSerializer jcs = new
JsonCasSerializer();
jcs.setPrettyPrint(true); // do some configuration
StringWriter sw = new StringWriter();
jcs.serialize(jcas.getCas(), sw); // serialize into sw
and the error was:
Exception in thread "main" java.lang.NoSuchMethodError:
org.apache.uima.cas.impl.TypeImpl.getSuperType()Lorg/apache/uima/cas/impl/TypeImpl;
at
org.apache.uima.json.JsonCasSerializer$JsonDocSerializer.collectUsedSubtypes(JsonCasSerializer.java:842)
at
org.apache.uima.json.JsonCasSerializer$JsonDocSerializer.serializeJsonLdContext(JsonCasSerializer.java:731)
at
org.apache.uima.json.JsonCasSerializer$JsonDocSerializer.writeFeatureStructures(JsonCasSerializer.java:545)
at
org.apache.uima.cas.impl.CasSerializerSupport$CasDocSerializer.serialize(CasSerializerSupport.java:439)
at
org.apache.uima.json.JsonCasSerializer.serialize(JsonCasSerializer.java:337)
at
org.apache.uima.json.JsonCasSerializer.serialize(JsonCasSerializer.java:318)
at
org.apache.uima.json.JsonCasSerializer.serialize(JsonCasSerializer.java:308)
at Main.result(Main.java:62)
at Main.main(Main.java:96)
-----Original Message-----
From: Finan, Sean [mailto:[email protected]]
Sent: Tuesday, June 06, 2017 8:37 PM
To: [email protected]
Subject: RE: jcas to json error
Hi Avanish,
I think that Apache email services do not allow markups, embedded images or
attachments. Your images didn't come through for me. Can you paste the code
as text? If it is online somewhere public (e.g. github) you can add a link to
the repository for people to inspect.
Thanks,
Sean
From: Kumar, Avanish [mailto:[email protected]]
Sent: Tuesday, June 06, 2017 10:24 AM
To: [email protected]
Subject: jcas to json error
Hi,
I am trying to get the output in Json. I tried it by doing it like this:
But got errors. Can anyone please tell me what is wrong with this code.
[cid:[email protected]]
[cid:[email protected]]
This e-mail, including attachments, may include confidential and/or proprietary
information, and may be used only by the person or entity to which it is
addressed. If the reader of this e-mail is not the intended recipient or his or
her authorized agent, the reader is hereby notified that any dissemination,
distribution or copying of this e-mail is prohibited. If you have received this
e-mail in error, please notify the sender by replying to this message and
delete this e-mail immediately.
This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity
to which it is addressed. If the reader of this e-mail is not the intended
recipient or his or her authorized agent, the reader is hereby notified
that any dissemination, distribution or copying of this e-mail is
prohibited. If you have received this e-mail in error, please notify the
sender by replying to this message and delete this e-mail immediately.