uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Spico Florin <spicoflo...@gmail.com>
Subject Re: java.lang.NullPointerException when running fast client
Date Thu, 09 Feb 2012 13:49:38 GMT
On Thu, Feb 9, 2012 at 3:41 PM, Spico Florin <spicoflorin@gmail.com> wrote:

>
> Hello!
>   My UIMA AS client is using UimaAsynchronousEngine for sending messages
> to a UIMA pipeline. If the process of sending is fast (with 100 ms delay or
> without any delay) the attached exception(java.lang.NullPointerException
> and org.xml.sax.SAXException: Error classifying FS type.) is thrown. Please
> advice. Thank you.
>   Regards,
>  Florin
>
> My code is:
>
>
> //constructor
> Client() {
>    cas = CasCreationUtils.createCas(uimaTypeDescriptors);
> }
>
> //main method
> main() {
>   Client client = new Client();
>  for (int i = 0; i < 100000; i++) {
>             System.out.println("Sending message #"+i);
>             client.sendToUIMA("Test message:"+i);
>             Thread.sleep(100);
>    }
> }
>
>  public void sendToUIMA(String msg) throws Exception {
>         JCas jcas = cas.getJCas();
>         jcas.reset();
>         jcas.setDocumentText(msg);
>         uimaEEEngine.sendCAS(jcas.getCas());
>
>
>     }
>
>
> Exception 1:
>
> org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl$2
> onMessage
> WARNING:
> java.lang.NullPointerException
>     at
> org.apache.uima.cas.impl.XmiCasDeserializer$XmiCasDeserializerHandler.handleFeature(XmiCasDeserializer.java:769)
>     at
> org.apache.uima.cas.impl.XmiCasDeserializer$XmiCasDeserializerHandler.readFS(XmiCasDeserializer.java:734)
>     at
> org.apache.uima.cas.impl.XmiCasDeserializer$XmiCasDeserializerHandler.readFS(XmiCasDeserializer.java:509)
>     at
> org.apache.uima.cas.impl.XmiCasDeserializer$XmiCasDeserializerHandler.startElement(XmiCasDeserializer.java:391)
>     at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown
> Source)
>     at
> org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown
> Source)
>     at
> org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
> Source)
>     at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
> Source)
>     at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
> Source)
>     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>     at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>     at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>     at
> org.apache.uima.aae.UimaSerializer.deserializeCasFromXmi(UimaSerializer.java:191)
>     at
> org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl.deserialize(BaseUIMAAsynchronousEngineCommon_impl.java:1613)
>     at
> org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl.deserializeCAS(BaseUIMAAsynchronousEngineCommon_impl.java:1646)
>     at
> org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl.deserializeAndCompleteProcessingReply(BaseUIMAAsynchronousEngineCommon_impl.java:1883)
>     at
> org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl.handleProcessReply(BaseUIMAAsynchronousEngineCommon_impl.java:1208)
>     at
> org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl$2.run(BaseUIMAAsynchronousEngineCommon_impl.java:1714)
>     at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>     at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>     at java.lang.Thread.run(Thread.java:722)
>

Exception 2:
Exception in thread "main" org.apache.uima.resource.ResourceProcessException
    at
org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl.sendCAS(BaseUIMAAsynchronousEngineCommon_impl.java:854)
    at
org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl.sendCAS(BaseUIMAAsynchronousEngineCommon_impl.java:885)
    at
com.siemens.scr.usi.mi.uima.connector.UIMAPipelineConnector.sendToUIMA(UIMAPipelineConnector.java:327)
    at
com.siemens.scr.usi.mi.uima.connector.UIMAPipelineConnector.main(UIMAPipelineConnector.java:391)
Caused by: org.xml.sax.SAXException: Error classifying FS type.
    at
org.apache.uima.cas.impl.XmiCasSerializer$XmiCasDocSerializer.encodeFS(XmiCasSerializer.java:784)
    at
org.apache.uima.cas.impl.XmiCasSerializer$XmiCasDocSerializer.encodeIndexed(XmiCasSerializer.java:700)
    at
org.apache.uima.cas.impl.XmiCasSerializer$XmiCasDocSerializer.serialize(XmiCasSerializer.java:268)
    at
org.apache.uima.cas.impl.XmiCasSerializer$XmiCasDocSerializer.access$700(XmiCasSerializer.java:108)
    at
org.apache.uima.cas.impl.XmiCasSerializer.serialize(XmiCasSerializer.java:1539)
    at
org.apache.uima.aae.UimaSerializer.serializeCasToXmi(UimaSerializer.java:136)
    at
org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl.serializeCAS(BaseUIMAAsynchronousEngineCommon_impl.java:260)
    at
org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl.sendCAS(BaseUIMAAsynchronousEngineCommon_impl.java:779)
    ... 3 more
Feb 09, 2012 8:45:57 AM
org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl$2
onMessage
WARNING:
java.lang.IndexOutOfBoundsException: Index: 24, Size: 24
    at java.util.ArrayList.rangeCheck(ArrayList.java:604)
    at java.util.ArrayList.get(ArrayList.java:382)
    at
org.apache.uima.cas.impl.StringHeap.getStringForCode(StringHeap.java:150)
    at org.apache.uima.cas.impl.CASImpl.getStringValue(CASImpl.java:2001)
    at
org.apache.uima.cas.impl.XmiCasDeserializer$XmiCasDeserializerHandler.handleFeature(XmiCasDeserializer.java:870)
    at
org.apache.uima.cas.impl.XmiCasDeserializer$XmiCasDeserializerHandler.handleFeature(XmiCasDeserializer.java:796)
    at
org.apache.uima.cas.impl.XmiCasDeserializer$XmiCasDeserializerHandler.readFS(XmiCasDeserializer.java:734)
    at
org.apache.uima.cas.impl.XmiCasDeserializer$XmiCasDeserializerHandler.readFS(XmiCasDeserializer.java:497)
    at
org.apache.uima.cas.impl.XmiCasDeserializer$XmiCasDeserializerHandler.startElement(XmiCasDeserializer.java:391)
    at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown
Source)
    at
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown
Source)
    at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source)
    at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
    at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at
org.apache.uima.aae.UimaSerializer.deserializeCasFromXmi(UimaSerializer.java:191)
    at
org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl.deserialize(BaseUIMAAsynchronousEngineCommon_impl.java:1613)
    at
org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl.deserializeCAS(BaseUIMAAsynchronousEngineCommon_impl.java:1646)
    at
org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl.deserializeAndCompleteProcessingReply(BaseUIMAAsynchronousEngineCommon_impl.java:1883)
    at
org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl.handleProcessReply(BaseUIMAAsynchronousEngineCommon_impl.java:1208)
    at
org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl$2.run(BaseUIMAAsynchronousEngineCommon_impl.java:1714)
    at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message