Re: TypePriorities configured in the descriptor of an aggregate engine are not added in uima-as

2017-08-24 Thread Jaroslaw Cwiklik
Nelson, I was able to recreate this problem and am working on a fix now.
Jerry

On Wed, Aug 16, 2017 at 3:39 PM, nelson rivera 
wrote:

> Jerry, i understand and wait. Thanks for your attention.
>
> 2017-08-16 15:09 GMT-04:00, Jaroslaw Cwiklik :
> > Nelson, I need more time to look into this. Quite busy at a moment.
> Unless
> > someone else wants to jump in here I will address the problem when I am
> > done with current work load,
> >
> > Jerry
> >
> > On Mon, Aug 14, 2017 at 4:36 PM, Jaroslaw Cwiklik 
> > wrote:
> >
> >> Thanks, I will try to test this scenario and get back to ya.
> >>
> >> Jerry
> >>
> >> On Mon, Aug 14, 2017 at 4:27 PM, nelson rivera <
> nelsonriver...@gmail.com>
> >> wrote:
> >>
> >>> Yes, that is happening
> >>>
> >>> 2017-08-14 15:40 GMT-04:00, Jaroslaw Cwiklik :
> >>> > Please confirm that this is happening:
> >>> >
> >>> > 1) You deploy an aggregate and specify TypePriorities in aggregate
> >>> analysis
> >>> > engine descriptor.
> >>> > 2) After uima-as client initilizes, you call client's
> >>> > public ProcessingResourceMetaData getMetaData();
> >>> > 3) You check the returned meta and the type priorities are missing
> >>> >
> >>> > You are observing correct behavior when you declare type priorities
> in
> >>> > a delegate analysis engine descriptor of the aggregate
> >>> >
> >>> > Jerry
> >>> >
> >>> > On Fri, Aug 11, 2017 at 12:12 PM, nelson rivera <
> >>> nelsonriver...@gmail.com>
> >>> > wrote:
> >>> >
> >>> >> i have configured a priorityList in the descriptor of my aggregate
> >>> >> engine, with the objetive of use correctly subiterator() function in
> >>> >> my client code over the result CAS.
> >>> >>
> >>> >> After deploy the aggregate in uima-as, in my client code that
> >>> >> consumes
> >>> >> de uima-as service aggregate to check the priorityList configured i
> >>> >> use the instruccion
> >>> >> uimaAsynchronousEngine.getMetaData().getTypePriorities(); and not
> >>> >> appear the priority configured. This does that the use of
> subiterator
> >>> >> not have the expected behavior in the uima-as client.
> >>> >>
> >>> >> If the configuration of priorityList is made in the descriptor of
> one
> >>> >> of the delegate of the aggregate, then if the instruccion
> >>> >> uimaAsynchronousEngine.getMetaData().getTypePriorities()   in
> client
> >>> >> code shows the priorityList configured and then the  behavior is the
> >>> >> expected.
> >>> >>
> >>> >
> >>>
> >>
> >>
> >
>


Re: Type system commit race condition when maven builds jar(?)

2017-08-24 Thread Andrew Trice
The issue arose from using the Maven Assembly Plugin to naively build an 
executable jar with uimaFit components. Files supplied by different 
dependencies overwrote each other during packaging and some types could not be 
detected at runtime. The uimaFit documentation has this issue recorded in 
chapter 9: 
https://uima.apache.org/d/uimafit-current/tools.uimafit.book.html#ugr.tools.uimafit.packaging
 
.
 We resolved the issue using the Maven Shade Plugin as shown in the document.

Thanks,

Andrew
> On Aug 23, 2017, at 2:06 PM, Jean-Karlo Accetta  
> wrote:
> 
> Hi Marshall,
> 
> I work with Andrew. Thanks for the reply, this definitely helps!
> 
> Best regards,
> J.K. Accetta
> 
> 
> 
> On 8/23/17 8:50 AM, Marshall Schor wrote:
>> Hi,
>> 
>> Those two listing of the type system appear to show that the *working* 
>> version
>> does not have cTakes, and the *failing* version has cTakes.
>> 
>> Any ideas why this might be so?
>> 
>> The stack trace appears to show that the "FileSystemCollectionReader" class 
>> is
>> running the getNext method, and that is attempting to create an instance of 
>> the
>> JCas class   com.clinacuity.deid.annotations.DocumentInformationAnnotation.
>> 
>> The error message indicates that whatever causes the class
>> com.clinacuity.deid.annotations.DocumentInformationAnnotation to be "loaded" 
>> &
>> "initialized" by Java's class loader is happening before the type system has
>> been committed.
>> 
>> It seems that the FileSystemCollectionReader is being run in some separate
>> thread.  If your system design is permitting this to happen in a race with
>> another thread which is setting up the type system and committing it, you 
>> could
>> get this error.  The fact that a big type system might take longer to set up
>> might account for why that one fails (the shorter one wins the race).
>> 
>> Of course, for reliable operation, the race must be eliminated; a fix would 
>> be
>> to delay starting threads that depend on the type system, until the type 
>> system
>> has been committed.
>> 
>> Does this help?
>> 
>> -Marshall
>> 
>> 
>> 
>> On 8/18/2017 8:55 AM, Andrew Trice wrote:
>>> I am working with UIMA-Alpha02 and am currently trying to build a jar to 
>>> make a standalone application. (not pear because we want our users to have 
>>> just the JDK and not require ecilpse or UIMA) In many cases we use maven to 
>>> build and package the jar and it runs fine. Other times the jar is broken 
>>> so that the pipeline will always fail with this stacktrace:
>>>  2017-08-17 14:53:54 [ERROR] DeidRunnerController.203: Throwing
>>> java.lang.ExceptionInInitializerError: null
>>> at 
>>> com.clinacuity.deid.ae.FileSystemCollectionReader.getNext(FileSystemCollectionReader.java:105)
>>>  ~[deid-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?]
>>> at com.clinacuity.deid.ae.DeidPipeline.execute(DeidPipeline.java:109) 
>>> ~[deid-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?]
>>> at 
>>> com.clinacuity.deid.gui.DeidPipelineTask.call(DeidPipelineTask.java:41) 
>>> ~[deid-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?]
>>> at 
>>> com.clinacuity.deid.gui.DeidPipelineTask.call(DeidPipelineTask.java:9) 
>>> ~[deid-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?]
>>> at javafx.concurrent.Task$TaskCallable.call(Task.java:1423) 
>>> ~[jfxrt.jar:?]
>>> at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
>>> ~[?:1.8.0_121]
>>> at java.lang.Thread.run(Thread.java:745) ~[?:1.8.0_121]
>>> Caused by: org.apache.uima.cas.CASRuntimeException: A JCas class field 
>>> "documentType" is being initialized by non-framework (user) code before 
>>> Type System Commit for a type system with a corresponding type. Either 
>>> change the user load code to not do initialize, or to defer it until after 
>>> the type system commit.
>>> at 
>>> org.apache.uima.cas.impl.TypeSystemImpl.getAdjustedFeatureOffset(TypeSystemImpl.java:2564)
>>>  ~[deid-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?]
>>> at 
>>> com.clinacuity.deid.annotations.DocumentInformationAnnotation.(DocumentInformationAnnotation.java:23)
>>>  ~[deid-0.0.1-SNAPSHOT-jar-with-dependencies.jar:?]
>>> ... 7 more
>>> 
>>> I logged the JCas type system before this error occurs with this command: 
>>> jCas.getTypeSystem(), when it *passes* it shows the type system as this:
>>> 
>>> TypeSystem: Type System <2,016,464,189>:
>>>   uima.cas.TOP: super: 
>>> uima.cas.Integer: super: uima.cas.TOP
>>> uima.cas.Float: super: uima.cas.TOP
>>> uima.cas.String: super: uima.cas.TOP
>>> uima.cas.ArrayBase: super: uima.cas.TOP
>>> uima.cas.ListBase: super: uima.cas.TOP
>>> uima.cas.Boolean: super: uima.cas.TOP
>>> uima.cas.Byte: super: uima.cas.TOP
>>> uima.cas.Short: super: uima.cas.TOP
>>> uima.cas.Long: super: uima.cas.TOP
>>> uima.cas.Double: super: uima.cas.TOP
>>> uima.cas.Sofa: