uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Eckart de Castilho <...@apache.org>
Subject Re: Injecting nested resources using UIMA fit
Date Sat, 23 May 2015 13:19:38 GMT
Mario, it appears as if the attachment didn't make it through. No idea
if the list filters it. I expect the code snippet is not too long,
so maybe you can paste it directly to the mail?

-- Richard

On 23.05.2015, at 11:53, Mario Gazzo <mario.gazzo@gmail.com> wrote:

> I attached a small Java example program that reproduces the problem using the simple
pipeline but the error is the same with CPE. We are still using UIMA 2.6 with uimaFIT 2.1.0
but I could reproduce it with UIMA 2.7.
> 
> You can vary the binding sequence to see how the error differs depending on whether resource
B is bound to resource A first or last. Also try to comment out the dependencies of B on A
and see that everything then works as expected.
> 
> Let me know if its just me doing something wrong ;)
> 
> Cheers
> Mario
> 
> 
> 
>> On 22 May 2015, at 17:32 , Mario Gazzo <mario.gazzo@gmail.com> wrote:
>> 
>> 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
>>> 
>> 
> 


Mime
View raw message