one thing that would help track this down is a small isolated test case. Do you think uima-as is needed? I'm wondering if a simple test case which generated 17 views and then tried to serialize would show the failure...
If you could supply a small test case that showed the failure so we could reproduce it, that would enable a rapid resolution. -Marshall On 2/9/2017 3:58 PM, Marshall Schor wrote: > The line throwing the null pointer exception is : > > cas.getView(sofaNum).getSofaRef() > > So the NPE is either the cas is null, or the getView(sofaNum) is returning > null. > > I'm not sure what the best way is to debug this... > > -Marshall > > > > > On 2/9/2017 12:42 PM, nelson rivera wrote: >> I have a aggregate service uima-as, at the end of aggregate the cas to >> return is composed of as many views as the number of input files, each >> view with annotations of processing. >> With a number of input documents less than 15 the processing is >> successful always, >> but if the number of documents is greater than 15, i get a >> NullPointerException at the aggregate service trying to serialize the >> cas, not in the processing of AE aggregate. >> the logs of aggregate service: >> >> 11:51:38.815 - 42: >> cu.datys.xinetica.uima.core.MergerInViewCasMultipler.hasNext(285): >> INFO: HasNext false >> 11:51:38.875 - 44: >> org.apache.uima.uimacpp.UimacppAnalysisComponent.log(396): INFO: : >> XClusterAnalyzer::process --- OK >> 11:51:39.145 - 45: >> org.apache.uima.aae.controller.AggregateAnalysisEngineController_impl.replyToClient: >> WARNING: Service: XClusterAnalyzerAggregate Runtime Exception >> 11:51:39.145 - 45: >> org.apache.uima.aae.controller.AggregateAnalysisEngineController_impl.replyToClient: >> WARNING: >> org.apache.uima.aae.error.AsynchAEException: >> org.apache.uima.UIMARuntimeException >> at >> org.apache.uima.adapter.jms.activemq.JmsOutputChannel.getSerializedCas(JmsOutputChannel.java:1265) >> at >> org.apache.uima.adapter.jms.activemq.JmsOutputChannel.sendReply(JmsOutputChannel.java:800) >> at >> org.apache.uima.aae.controller.AggregateAnalysisEngineController_impl.sendReplyToRemoteClient(AggregateAnalysisEngineController_impl.java:2173) >> at >> org.apache.uima.aae.controller.AggregateAnalysisEngineController_impl.replyToClient(AggregateAnalysisEngineController_impl.java:2342) >> at >> org.apache.uima.aae.controller.AggregateAnalysisEngineController_impl.finalStep(AggregateAnalysisEngineController_impl.java:1862) >> at >> org.apache.uima.aae.controller.AggregateAnalysisEngineController_impl.executeFlowStep(AggregateAnalysisEngineController_impl.java:2489) >> at >> org.apache.uima.aae.controller.AggregateAnalysisEngineController_impl.process(AggregateAnalysisEngineController_impl.java:1271) >> at >> org.apache.uima.aae.handler.HandlerBase.invokeProcess(HandlerBase.java:118) >> at >> org.apache.uima.aae.handler.input.ProcessResponseHandler.cancelTimerAndProcess(ProcessResponseHandler.java:117) >> at >> org.apache.uima.aae.handler.input.ProcessResponseHandler.handleProcessResponseWithCASReference(ProcessResponseHandler.java:485) >> at >> org.apache.uima.aae.handler.input.ProcessResponseHandler.handle(ProcessResponseHandler.java:767) >> at >> org.apache.uima.aae.handler.HandlerBase.delegate(HandlerBase.java:149) >> at >> org.apache.uima.aae.handler.input.ProcessRequestHandler_impl.handle(ProcessRequestHandler_impl.java:1113) >> at >> org.apache.uima.aae.spi.transport.vm.UimaVmMessageListener.onMessage(UimaVmMessageListener.java:107) >> at >> org.apache.uima.aae.spi.transport.vm.UimaVmMessageDispatcher$1.run(UimaVmMessageDispatcher.java:70) >> at >> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) >> at >> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) >> at >> org.apache.uima.aae.UimaAsThreadFactory$1.run(UimaAsThreadFactory.java:132) >> at java.lang.Thread.run(Thread.java:745) >> Caused by: org.apache.uima.UIMARuntimeException >> at >> org.apache.uima.cas.impl.XmiCasSerializer.serialize(XmiCasSerializer.java:420) >> at >> org.apache.uima.cas.impl.XmiCasSerializer.serialize(XmiCasSerializer.java:385) >> at >> org.apache.uima.aae.UimaSerializer.serializeCasToXmi(UimaSerializer.java:145) >> at >> org.apache.uima.adapter.jms.activemq.JmsOutputChannel.serializeCAS(JmsOutputChannel.java:251) >> at >> org.apache.uima.adapter.jms.activemq.JmsOutputChannel.getSerializedCas(JmsOutputChannel.java:1250) >> ... 18 more >> Caused by: java.lang.NullPointerException >> at >> org.apache.uima.cas.impl.CasSerializerSupport$CasDocSerializer.getSofaAddr(CasSerializerSupport.java:454) >> at >> org.apache.uima.cas.impl.CasSerializerSupport$CasDocSerializer.writeViewsCommons(CasSerializerSupport.java:465) >> at >> org.apache.uima.cas.impl.XmiCasSerializer$XmiDocSerializer.writeViews(XmiCasSerializer.java:572) >> at >> org.apache.uima.cas.impl.CasSerializerSupport$CasDocSerializer.serialize(CasSerializerSupport.java:441) >> at >> org.apache.uima.cas.impl.XmiCasSerializer.serialize(XmiCasSerializer.java:415) >> ... 22 more >> >
