uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mario Gazzo <mario.ga...@gmail.com>
Subject Re: Injecting nested resources using UIMA fit
Date Fri, 22 May 2015 15:32:02 GMT
Yes, I am using the uimaFIT base classes but I will try to reproduce it in a micro sample application
as soon as possible and post it here.

> On 22 May 2015, at 17:04 , Richard Eckart de Castilho <rec@apache.org> wrote:
> I am not sure that I have ever tested nested resources on readers;
> certainly, I have never tested them on flow controllers - only on AEs.
> Anyway - are you using the uimaFIT base-classes for readers and flow
> controllers - those that call ExternalResourceInitializer.initialize(...)
> in their initialize(...) methods?
> Can you provide some example code?
> Cheers,
> -- Richard
> On 22.05.2015, at 16:59, Mario Gazzo <mario.gazzo@gmail.com> wrote:
>> I have some trouble with initialising some nested resource with UIMA fit. I have
followed the approach described in the section “Resources implementing SharedResourceObject”.
I just have a resource B that uses resource A and a collection reader and a flow control that
use both A and B but I get "mandatory resource A not set on resource B” illegal state exception.
I use the @ExternalResource annotations to get them injected and I used ExternalResourceFactory.bindExternalResource
with A and B on the collection reader and flow control descriptions when creating my aggregate.
It works if B is not dependent on A but as soon I add the dependency then it breaks. I also
tried to explicitly use ExternalResourceFactory.bindExternalResource on A to B but that caused
null pointer exception in ExternalResourceFactory when trying to bind to the collection reader
right after.
>> I would appreciate any ideas about what I might be doing wrong.
>> Cheers
>> Mario

View raw message