You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Jerry Cwiklik (JIRA)" <ui...@incubator.apache.org> on 2009/09/21 15:42:16 UTC
[jira] Created: (UIMA-1580) Synchronize AsynchAECasManager
initialize() method to fix NPE while merging type systems
Synchronize AsynchAECasManager initialize() method to fix NPE while merging type systems
----------------------------------------------------------------------------------------
Key: UIMA-1580
URL: https://issues.apache.org/jira/browse/UIMA-1580
Project: UIMA
Issue Type: Bug
Components: Async Scaleout
Reporter: Jerry Cwiklik
Fix For: 2.3AS
A NPE exception occurs intermittently while merging type systems. There seems to be a race condition where multiple threads attempt to initialize cas pools. The result is an exception that looks like this:
org.apache.uima.aae.error.AsynchAEException: java.lang.NullPointerException
at org.apache.uima.aae.controller.AggregateAnalysisEngineController_impl.mergeTypeSystem(AggregateAnalysisEngineController_impl.java:2430)
at org.apache.uima.aae.handler.input.MetadataResponseHandler_impl.handle(MetadataResponseHandler_impl.java:140)
at org.apache.uima.aae.handler.input.MetadataRequestHandler_impl.handle(MetadataRequestHandler_impl.java:78)
at org.apache.uima.aae.handler.HandlerBase.delegate(HandlerBase.java:149)
at org.apache.uima.aae.handler.input.ProcessResponseHandler.handle(ProcessResponseHandler.java:664)
at org.apache.uima.aae.handler.HandlerBase.delegate(HandlerBase.java:149)
at org.apache.uima.aae.handler.input.ProcessRequestHandler_impl.handle(ProcessRequestHandler_impl.java:951)
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$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
at org.apache.uima.resource.CasDefinition.<init>(CasDefinition.java:66)
at org.apache.uima.resource.impl.CasManager_impl.getCasDefinition(CasManager_impl.java:94)
at org.apache.uima.resource.impl.CasManager_impl.createNewCas(CasManager_impl.java:196)
at org.apache.uima.util.CasPool.fillPool(CasPool.java:319)
at org.apache.uima.util.CasPool.<init>(CasPool.java:191)
at org.apache.uima.resource.impl.CasManager_impl.defineCasPool(CasManager_impl.java:174)
at org.apache.uima.resource.impl.CasManager_impl.defineCasPool(CasManager_impl.java:161)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (UIMA-1580) Synchronize AsynchAECasManager
initialize() method to fix NPE while merging type systems
Posted by "Jerry Cwiklik (JIRA)" <ui...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/UIMA-1580?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jerry Cwiklik closed UIMA-1580.
-------------------------------
Resolution: Fixed
Assignee: Jerry Cwiklik
Fixes a NPE in the AsynchAECasManager initialize() method. There is a single shared instance of this class in a jvm and multiple UIMA AS services use it to create cas pools during initialization. Within the initialize() method there is a call to the core's cas manager defineCasPool() which is not thread safe and this is where NPE occured. Modified the AsynchAECasManager to synchronize the initialize() method to serialize access to the defineCasPool() method.
> Synchronize AsynchAECasManager initialize() method to fix NPE while merging type systems
> ----------------------------------------------------------------------------------------
>
> Key: UIMA-1580
> URL: https://issues.apache.org/jira/browse/UIMA-1580
> Project: UIMA
> Issue Type: Bug
> Components: Async Scaleout
> Reporter: Jerry Cwiklik
> Assignee: Jerry Cwiklik
> Fix For: 2.3AS
>
>
> A NPE exception occurs intermittently while merging type systems. There seems to be a race condition where multiple threads attempt to initialize cas pools. The result is an exception that looks like this:
> org.apache.uima.aae.error.AsynchAEException: java.lang.NullPointerException
> at org.apache.uima.aae.controller.AggregateAnalysisEngineController_impl.mergeTypeSystem(AggregateAnalysisEngineController_impl.java:2430)
> at org.apache.uima.aae.handler.input.MetadataResponseHandler_impl.handle(MetadataResponseHandler_impl.java:140)
> at org.apache.uima.aae.handler.input.MetadataRequestHandler_impl.handle(MetadataRequestHandler_impl.java:78)
> at org.apache.uima.aae.handler.HandlerBase.delegate(HandlerBase.java:149)
> at org.apache.uima.aae.handler.input.ProcessResponseHandler.handle(ProcessResponseHandler.java:664)
> at org.apache.uima.aae.handler.HandlerBase.delegate(HandlerBase.java:149)
> at org.apache.uima.aae.handler.input.ProcessRequestHandler_impl.handle(ProcessRequestHandler_impl.java:951)
> 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$Worker.runTask(ThreadPoolExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:619)
> Caused by: java.lang.NullPointerException
> at org.apache.uima.resource.CasDefinition.<init>(CasDefinition.java:66)
> at org.apache.uima.resource.impl.CasManager_impl.getCasDefinition(CasManager_impl.java:94)
> at org.apache.uima.resource.impl.CasManager_impl.createNewCas(CasManager_impl.java:196)
> at org.apache.uima.util.CasPool.fillPool(CasPool.java:319)
> at org.apache.uima.util.CasPool.<init>(CasPool.java:191)
> at org.apache.uima.resource.impl.CasManager_impl.defineCasPool(CasManager_impl.java:174)
> at org.apache.uima.resource.impl.CasManager_impl.defineCasPool(CasManager_impl.java:161)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.