Re: Broken conections after ACTIVEMQ restart

2016-09-21 Thread nelson rivera
I'm using UIMA-AS 2.8.1, any idea that what happen?

2016-09-21 16:09 GMT-04:00, Jaroslaw Cwiklik :
> Which version of UIMA-AS are you using?
>
> -Jerry
>
> On Wed, Sep 21, 2016 at 3:42 PM, nelson rivera 
> wrote:
>
>> When start ActiveMQ and deploys an annotator as service, processing is
>> executed correctly, but  when the broker is stopped and subsequently
>> restarted. UIMA-AS log show the lines below  and after this the api
>> client uima-as is not notified in the listener when a cas is
>> processed, any more.
>> can help me?:
>>
>> 02:08:25.570 - 14:
>> org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerCont
>> ainer.onException:
>> ADVERTENCIA: Service: Aggregate Cluster Analyzer Runtime Exception
>> 02:08:25.570 - 14:
>> org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerCont
>> ainer.onException:
>> ADVERTENCIA: Jms Listener Failed. Endpoint: XClusterAnalyzerAggregate
>> Managed By: tcp://localhost:61616 Reason: javax.jms.JMSException:
>> java.io.EOFException
>> 02:08:25.570 - 14:
>> org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerContainer.
>> handleListenerSetupFailure:
>> ADVERTENCIA: Uima AS Service:Aggregate Cluster Analyzer Listener
>> Unable To Connect To Broker: tcp://localhost:61616 Retrying ...
>> QueueFailure: ADVERTENCIA: Jms Listener Failed. Endpoint:
>> temp-queue://ID:localhost-H81-M1-33610-1474481197190-1:1:1 Managed By:
>> tcp://localhost:61616 Reason: javax.jms.JMSException:
>> java.io.EOFException
>> 02:09:02.222 - 14:
>> org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerContainer.
>> handleListenerSetupFailure:
>> ADVERTENCIA: Uima AS Service:Aggregate Cluster Analyzer Listener
>> Established Connection to Broker: tcp://localhost:61616
>>
>> 02:09:02.317 - 14:
>> org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerCont
>> ainer.onException:
>> ADVERTENCIA: Service: Aggregate Cluster Analyzer Runtime Exception
>> 02:09:02.317 - 14:
>> org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerCont
>> ainer.onException:
>> ADVERTENCIA: Jms Listener Failed. Endpoint: XClusterAnalyzerAggregate
>> Managed By: tcp://localhost:61616 Reason:
>> org.apache.activemq.ConnectionClosedException: The connection is
>> already closed02:09:02.356 - 15:
>> org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerCont
>> ainer.onException:
>> ADVERTENCIA: Service: Aggregate Cluster Analyzer Runtime Exception
>> 02:09:02.357 - 15:
>> org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerCont
>> ainer.onException:
>> ADVERTENCIA: Jms Listener Failed. Endpoint: XClusterAnalyzerAggregate
>> Managed By: tcp://localhost:61616 Reason:
>> javax.jms.IllegalStateException: The Consumer is closed.
>>
>


Re: Broken conections after ACTIVEMQ restart

2016-09-21 Thread Jaroslaw Cwiklik
Which version of UIMA-AS are you using?

-Jerry

On Wed, Sep 21, 2016 at 3:42 PM, nelson rivera 
wrote:

> When start ActiveMQ and deploys an annotator as service, processing is
> executed correctly, but  when the broker is stopped and subsequently
> restarted. UIMA-AS log show the lines below  and after this the api
> client uima-as is not notified in the listener when a cas is
> processed, any more.
> can help me?:
>
> 02:08:25.570 - 14:
> org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerCont
> ainer.onException:
> ADVERTENCIA: Service: Aggregate Cluster Analyzer Runtime Exception
> 02:08:25.570 - 14:
> org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerCont
> ainer.onException:
> ADVERTENCIA: Jms Listener Failed. Endpoint: XClusterAnalyzerAggregate
> Managed By: tcp://localhost:61616 Reason: javax.jms.JMSException:
> java.io.EOFException
> 02:08:25.570 - 14:
> org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerContainer.
> handleListenerSetupFailure:
> ADVERTENCIA: Uima AS Service:Aggregate Cluster Analyzer Listener
> Unable To Connect To Broker: tcp://localhost:61616 Retrying ...
> QueueFailure: ADVERTENCIA: Jms Listener Failed. Endpoint:
> temp-queue://ID:localhost-H81-M1-33610-1474481197190-1:1:1 Managed By:
> tcp://localhost:61616 Reason: javax.jms.JMSException:
> java.io.EOFException
> 02:09:02.222 - 14:
> org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerContainer.
> handleListenerSetupFailure:
> ADVERTENCIA: Uima AS Service:Aggregate Cluster Analyzer Listener
> Established Connection to Broker: tcp://localhost:61616
>
> 02:09:02.317 - 14:
> org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerCont
> ainer.onException:
> ADVERTENCIA: Service: Aggregate Cluster Analyzer Runtime Exception
> 02:09:02.317 - 14:
> org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerCont
> ainer.onException:
> ADVERTENCIA: Jms Listener Failed. Endpoint: XClusterAnalyzerAggregate
> Managed By: tcp://localhost:61616 Reason:
> org.apache.activemq.ConnectionClosedException: The connection is
> already closed02:09:02.356 - 15:
> org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerCont
> ainer.onException:
> ADVERTENCIA: Service: Aggregate Cluster Analyzer Runtime Exception
> 02:09:02.357 - 15:
> org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerCont
> ainer.onException:
> ADVERTENCIA: Jms Listener Failed. Endpoint: XClusterAnalyzerAggregate
> Managed By: tcp://localhost:61616 Reason:
> javax.jms.IllegalStateException: The Consumer is closed.
>


Re: trying to understand an example in the Ruta manual

2016-09-21 Thread Peter Klügl
Hi,


Am 20.09.2016 um 21:51 schrieb Bonnie MacKellar:
> Hi,
>
> Just getting back to this since I was off at a conference. Thanks again for
> the details. This is realy helpful. I beleive that Ruta 2.5 is not yet out,
> right?

Yes, 2.5.0 is not yet release, but it will be soon, hopefully.

>
> As convenient as this rule seems
> "(?i).*(must be (?:receiving|undergoing|using) (.*) for) (.*)" ->
> R3Dot1CurrentPurposeConstraint ("group1" = 2, "group2" = 3);
>
> I do need to be able to distinguish between group1 and group2 in a Java
> program that walks through the features. If they are both plain
> Annotations, I am assuming I would not be able to do that, so the first
> setup is probably still best.   Thanks for all your help

Just wanted to mention that you can distinguish between both since they
are in different features.

Best,

Peter

> Bonnie MacKellar
>
> On Thu, Sep 15, 2016 at 7:32 AM, Peter Klügl 
> wrote:
>
>> Hi,
>>
>>
>> Am 14.09.2016 um 22:58 schrieb Bonnie MacKellar:
>>> OK, thanks.  I played around a little bit today with my own rules
>>>
>>> DECLARE Group1;
>>> DECLARE Group2;
>>> DECLARE R3Dot1CurrentPurposeConstraint(Annotation group1, Annotation
>>> group2);
>>>
>>> BLOCK(eachEC) EC{}{
>>> "(?i).*(must be (?:receiving|undergoing|using) (.*) for) (.*)" ->
>>> R3Dot1CurrentPurposeConstraint,2=Group1, 3=Group2;
>>> "(?i).*(ongoing (.*(?:therapy|treatment).*) for) (.*)" ->
>>> R3Dot1CurrentPurposeConstraint;
>>> }
>>>
>>> I want to end up with the text marked by Group1 to be the value for the
>>> group1 feature in R3Dot1CurrentPurposeConstraint (and likewise group2),
>> but
>>> I couldn't find a way to do it in my rules above, so I added this
>>>
>>> R3Dot1CurrentPurposeConstraint {->
>>> R3Dot1CurrentPurposeConstraint.group1=Group1,
>>> R3Dot1CurrentPurposeConstraint.group2=Group2};
>>>
>>> It appears to work on a small test case. Does that seem correct to you?
>> Is
>>> there a better way to do this, preferably right in the rules with the
>>> regular expressions?
>> Yes, this looks correct to me and it should do what you want, if there
>> is only exactly one annotation of each type (Group1 and Group2) within
>> the current R3Dot1CurrentPurposeConstraint annotation, or if only the
>> first one matters. And if the is no sequential dependency between Group1
>> and Group2, e.g., Group1 must occur before Group2. This should be the
>> case in your example.
>> I personally prefer labels more and more, especially because they become
>> even more powerful in ruta 2.5.0. Which is the best way to assign
>> features depends on the specific situation. The examples in my last mail
>> have all their advantages.
>>
>> I personally would write the rule this way (but this will work only in
>> 2.5.0):
>> c:R3Dot1CurrentPurposeConstraint{-> c.group1 = Group1, c.group2 = Group2};
>>
>> Here, the annotation R3Dot1CurrentPurposeConstraint in the action part
>> does not need to be resolved by the given type, but the annotation that
>> was matched by the type of the rule element is directly used. If there
>> are two R3Dot1CurrentPurposeConstraint annotations with the same
>> offsets, your rule would cause problems.
>>
>>
>> You can also assign the features directly in a simple regex rule, but
>> regex rules do not on given annotations at all but only on text. So if
>> you replace your rule with:
>>
>> "(?i).*(must be (?:receiving|undergoing|using) (.*) for) (.*)" ->
>> R3Dot1CurrentPurposeConstraint ("group1" = 2, "group2" = 3),
>> 2=Group1, 3=Group2;
>>
>> the two features of the created R3Dot1CurrentPurposeConstraint
>> annotation will be filled with annotations. However, these annotations
>> are of type Annotation and not Group1 and Group2. If you do not care
>> about the actual type of the annotation, e.g., because you won't use
>> additional features. You can simple write
>>
>> "(?i).*(must be (?:receiving|undergoing|using) (.*) for) (.*)" ->
>> R3Dot1CurrentPurposeConstraint ("group1" = 2, "group2" = 3);
>>
>> else you need an additional rule based on annotations like above.
>>
>>> Also, why did you declare your features as Annotation rather than
>> Employee
>>> and Employer?
>>> DECLARE EmplRelation (Annotation employee, Annotation employer);
>>>
>>> I imitated this, but to me  it would seem better to use
>>> DECLARE EmplRelation (Employee employee, Employer employer);
>>> I am sure there is a good reason for this, but I don't see it!
>> Nope, there was no good reason :-)
>>
>> It just did not matter for the example.
>>
>> When I explain these examples, I normally also explain the situation
>> when there are no Employer and Employee annotations but only Person
>> annotations. Then, only a subset of the rules will work, e.g., GATHER,
>> annotation variables, labels. In this case, I would not need to modify
>> the declare statement.
>>
>> Best,
>>
>> Peter
>>
>>
>>
>>> Thanks, this cleared up some amount of confusion
>>>
>>> Bonnie MacKellar
>>>
>>>