You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by Arun Tewatia <ar...@orkash.com> on 2011/02/02 14:01:02 UTC

Service not accepting repeated requests form client !!

Hi all,

I deployed a UIMA-AS service with 2 CAS Consumers
TokenDBCasConsumer and NEDCasConsumer_DB

Next i sent a request from client side, which reads input from a database server
and writes the results back. The output was fine for the first request. But when
i sent another request to the same service from same client. It didn't initialize
properly and stopped giving following error .....


Error on process CAS call to remote service:
org.apache.uima.aae.error.UimaEEServiceException:
org.apache.uima.aae.error.UimaAsDelegateException: ----> Controller:/UIMA_back
Received Exception  on CAS:-56fbce62:12de6651bfe:-7ffd From
Delegate:NEDCasConsumer_DB
	at
org.apache.uima.adapter.jms.activemq.JmsOutputChannel.sendReply(JmsOutputChanne
.java:1076)

Terminating Client...



If I try only one cas consumer TokenDBCasConsumer then everything works fine. I
tried sending simultaneous client requests to this service instance. Both client
requests run simultaneously fine until one of them finishes. As soon as one is
completed other request terminates abruptly giving same error as above.


What can be possible reason ? Am i missing something ?

Thanks !



Re: Service not accepting repeated requests form client !!

Posted by Eddie Epstein <ea...@gmail.com>.
Arun,

Can you try testing your aggregates using base UIMA tools, such as
runAE.sh (a command line tool) or documentAnalyzer.sh (a GUI tool).
Run the same set of input CASes as you have been doing with the
service.

Thansk,
Eddie

On Thu, Feb 3, 2011 at 1:27 AM, Arun Tewatia <ar...@orkash.com> wrote:
> Hi Eddie,
>
> Thanks for previous reply !
>
> As you said the code of two cas consumers needs to be thread safe if i run two
> client requests simultaneously. But in my first scenario, I send second request
> after the first request has finished successfully. In that case too i get the
> above mentioned error. Here the reason doesn't seem to cas consumers code.
>
>
> Thanks !
> Arun Tewatia
>
>
>
>
>

Re: Service not accepting repeated requests form client !!

Posted by Arun Tewatia <ar...@orkash.com>.
Hi Eddie,

Thanks for previous reply !

As you said the code of two cas consumers needs to be thread safe if i run two
client requests simultaneously. But in my first scenario, I send second request
after the first request has finished successfully. In that case too i get the
above mentioned error. Here the reason doesn't seem to cas consumers code.


Thanks !
Arun Tewatia





Re: Service not accepting repeated requests form client !!

Posted by Eddie Epstein <ea...@gmail.com>.
Ideally the aggregate deployed as a UIMA AS service was tested before
deployment. Assuming that works OK it is possible, depending on the
UIMA AS service deployment options, that the two CAS consumers are
running in separate threads but their code is not thread safe. For
example, both are accessing the same DB with a shared connection which
is closed by one them while the other is trying to use it.


On Wed, Feb 2, 2011 at 8:01 AM, Arun Tewatia <ar...@orkash.com> wrote:
> Hi all,
>
> I deployed a UIMA-AS service with 2 CAS Consumers
> TokenDBCasConsumer and NEDCasConsumer_DB
>
> Next i sent a request from client side, which reads input from a database server
> and writes the results back. The output was fine for the first request. But when
> i sent another request to the same service from same client. It didn't initialize
> properly and stopped giving following error .....
>
>
> Error on process CAS call to remote service:
> org.apache.uima.aae.error.UimaEEServiceException:
> org.apache.uima.aae.error.UimaAsDelegateException: ----> Controller:/UIMA_back
> Received Exception  on CAS:-56fbce62:12de6651bfe:-7ffd From
> Delegate:NEDCasConsumer_DB
>        at
> org.apache.uima.adapter.jms.activemq.JmsOutputChannel.sendReply(JmsOutputChanne
> .java:1076)
>
> Terminating Client...
>
>
>
> If I try only one cas consumer TokenDBCasConsumer then everything works fine. I
> tried sending simultaneous client requests to this service instance. Both client
> requests run simultaneously fine until one of them finishes. As soon as one is
> completed other request terminates abruptly giving same error as above.
>
>
> What can be possible reason ? Am i missing something ?
>
> Thanks !
>
>
>