Jaroslaw Cwiklik <uim...@...> writes:
> The CPM stopping is a consequence of an error while serializing a message
> into XCAS. Not sure exactly what causes that. As I understand it, your
> managed CP deployment failed but than process() method is called and an
> exception from a XCAS serializer is thrown. Can you describe the sequence
> that leads to this problem.

Hi Jaroslaw,

Sorry for the late reply - I got caught up with some other things at work in 
the past few days and was not able to experiment more with UIMA until recently.

Yes, I am still not able to deploy my CAS processors in managed mode.  I still
get the same error, that is, a failure in converting CAS object to CAS data
which then lead to the CPM and Vinci service stopping.  The log messages and 
the stack trace of the exceptions were in my previous posts.

I will try to describe what my application is doing and how I ran it in managed
mode.  Basically, the application is reading files the off disk and pass them 
to some text extractor tools to extract the text and write it to the disk.  
The application consists of:
 * A collection reader that reads files off the disk.
 * An aggregate Analysis Engine with two components/annotators - each component
is a text extractor tool.
 * A user-defined flow that controls the data flow between the components in
the aggregate analysis engine.
 * A main Java class that reads the XML CPE descriptor, creates a CPE object
and then initiates the processing ("cpe.process()").

As I explained before, if I configure my CPE descriptor to deploy the CAS
processors in integrated mode, everything works fine.  The collection reader
gets called to read the contents of files from the disk (i.e. getNext(CAS aCas)
is called), the annotators in the analysis engine get called to process the 
JCas object that contains the contents of the files read in by the collection 
reader (i.e. process(JCas aJCas) is called).

I was interested to deploy the CAS processors in managed mode, so:
 * I modified the XML CPE descriptor accordingly such that: deployment="local"
and the descriptor element is pointing to a Vinci service deployment descriptor.
 * I also added the runInSeparateProcess element as mentioned in the 
documentation.
 * However, when I ran the application, my CAS processors didn't get called at
all.  Instead, the CPM seemed to be caught in the loop because the service port
was not available.
 * Then, I did a little debugging and found that the vinci service
(VinciAnalysisEngineService_impl) failed to be started[*].
 * I figured that this was due to misconfiguration in the classpath in the
runInSeparateProcess element in my CPE descriptor.  I tried to fix it, but 
failed.
 * I tried to run the VNS and my vinci service from the command line (using
"startVNS.bat" and "startVinciService.bat" respectively) and they seemed to run
just fine.
 * I figured that I would just run my application (still with the CPE
descriptor configured to deploy the CAS processors in managed mode), let it loop
until it finds a service port, and then run my vinci service from the command
line (with "startVinciService.bat") to connect to the internal VNS started by my
application.
 * This is where I encounter the error of failing to convert CAS object to CAS
data which then lead to the CPM and Vinci service stopping.
 
Hope this makes sense and helps in debugging the problems.  Let me know if you
need more information.  FYI, my previous posts contain some other information
that may be useful (the log messages and stack trace of the exceptions thrown).

Also, are there any examples of applications/code that deploy CAS processors in
managed mode that I can use as a reference?

Thanks,
Hansen

[*] An exception should have been thrown in this case in my opinion, but 
instead UIMA seems to silently ignore this.  
See org.apache.uima.collection.impl.cpm.container.deployer.vinci
.VinciCasProcessorDeployer
line 551, where the Process object returned should have been used to check the
status of the spawned process.

Reply via email to