<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>uima-user@incubator.apache.org Archives</title>
<link rel="self" href="http://mail-archives.apache.org/mod_mbox/incubator-uima-user/?format=atom"/>
<link href="http://mail-archives.apache.org/mod_mbox/incubator-uima-user/"/>
<id>http://mail-archives.apache.org/mod_mbox/incubator-uima-user/</id>
<updated>2009-12-10T03:28:20Z</updated>
<entry>
<title>Re: Deserializing using an extended type system</title>
<author><name>Thilo Goetz &lt;twgoetz@gmx.de&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-uima-user/200912.mbox/%3c4B1F9F16.4030905@gmx.de%3e"/>
<id>urn:uuid:%3c4B1F9F16-4030905@gmx-de%3e</id>
<updated>2009-12-09T12:59:02Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On 12/8/2009 22:29, Anton Shuster wrote:
&gt; Hello all,
&gt; 
&gt; I read in the documentation that, in general, you have to use the same
&gt; type system for serializing and deserializing. However, it seems that
&gt; this requirement is not exact. I was able to do the following:
&gt; 
&gt; 1. set up a type system with type A containing feature A1, type B
&gt; containing feature B1, type C containing feature C1, and type D with
&gt; no features.
&gt; 2. process a document with an annotator that creates annotations of
&gt; type A, B, and C.
&gt; 3. serialize to a file
&gt; 4. modify the type system by adding a feature A2 to type A.
&gt; 5. deserialize from the file
&gt; 6. continue processing the document with another annotator that
&gt; creates annotations of type D.
&gt; 
&gt; My question is, how flexible is deserializing with respect to modified
&gt; type systems? I can't seem to find any documentation on this. In
&gt; particular, I'm interested in the following cases:
&gt; - types are added

I think that's fine.

&gt; - types are removed

That's fine as long as you have no annotions/FSs of that type
in the CAS you're deserializing.  If you do, you can specify
the "lenient" flag in the deserializer, see
http://incubator.apache.org/uima/downloads/releaseDocs/2.2.2-incubating/docs/api/org/apache/uima/cas/impl/XmiCasDeserializer.html#deserialize%28java.io.InputStream,%20org.apache.uima.cas.CAS,%20boolean%29

&gt; - features are added to some types

That's fine I think.

&gt; - features are removed from some types

If there are annotations/FSs in your CAS that use those features,
I believe that will result in a runtime exception.  Not even the
"lenient" flag will save you there.  Not 100% sure though, you
may want to try it out or look at the code.

--Thilo

&gt; 
&gt; Thanks for your help!
&gt; --Anton


</pre>
</div>
</content>
</entry>
<entry>
<title>Deserializing using an extended type system</title>
<author><name>Anton Shuster &lt;brainiac86@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-uima-user/200912.mbox/%3c3c77b7840912081329h3d0e792eq7b972e2c06232834@mail.gmail.com%3e"/>
<id>urn:uuid:%3c3c77b7840912081329h3d0e792eq7b972e2c06232834@mail-gmail-com%3e</id>
<updated>2009-12-08T21:29:24Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hello all,

I read in the documentation that, in general, you have to use the same
type system for serializing and deserializing. However, it seems that
this requirement is not exact. I was able to do the following:

1. set up a type system with type A containing feature A1, type B
containing feature B1, type C containing feature C1, and type D with
no features.
2. process a document with an annotator that creates annotations of
type A, B, and C.
3. serialize to a file
4. modify the type system by adding a feature A2 to type A.
5. deserialize from the file
6. continue processing the document with another annotator that
creates annotations of type D.

My question is, how flexible is deserializing with respect to modified
type systems? I can't seem to find any documentation on this. In
particular, I'm interested in the following cases:
- types are added
- types are removed
- features are added to some types
- features are removed from some types

Thanks for your help!
--Anton


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Comparison</title>
<author><name>ogjunk-uima@yahoo.com</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-uima-user/200912.mbox/%3c751441.52853.qm@web50304.mail.re2.yahoo.com%3e"/>
<id>urn:uuid:%3c751441-52853-qm@web50304-mail-re2-yahoo-com%3e</id>
<updated>2009-12-08T18:16:14Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
&gt;From what I know about UIMA, Lucene/Solr vs. UIMA comparison is an apples vs. oranges comparison.

A good number of free and commercial search solutions/frameworks/apps are mentioned here:

http://www.jroller.com/otis/entry/web_wide_and_enterprise_search


Otis--
Sematext -- http://sematext.com/ -- Solr - Lucene - Nutch



----- Original Message ----
&gt; From: ranganaths &lt;ranganath.s@excelindia.com&gt;
&gt; To: uima-user@incubator.apache.org
&gt; Sent: Mon, December 7, 2009 5:30:13 AM
&gt; Subject: Comparison
&gt; 
&gt; Hello,
&gt; 
&gt; 
&gt; 
&gt;         I am working on a project which requires the Indexing and searching
&gt; of huge volumes of documents, we also extend this simple keyword search in
&gt; the future to a semantic one. I have seen many frameworks like Lucene solr,
&gt; Apache UIMA and all. I wish to know, out of the two or if there is anything
&gt; else which can suit our needs. Thanks in advance.
&gt; 
&gt; 
&gt; 
&gt; Regards,
&gt; 
&gt; Ranganath S



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Exception thrown when deploying CAS Processors in managed mode</title>
<author><name>Jaroslaw Cwiklik &lt;uimaee@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-uima-user/200912.mbox/%3cfe44bdb90912081004n3b56d2fg85663a862184cc53@mail.gmail.com%3e"/>
<id>urn:uuid:%3cfe44bdb90912081004n3b56d2fg85663a862184cc53@mail-gmail-com%3e</id>
<updated>2009-12-08T18:04:54Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hansen, were you able to correct your configuration to launch managed Cas
Processor? You indicated that you were able to deploy it successfully from a
command line (un-managed mode). Just want to know if this is a bug in the
CPM or a setup problem.

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.

Jerry




On Thu, Dec 3, 2009 at 10:30 PM, Hansen Candrawinata &lt;
hansen.candrawinata@gmail.com&gt; wrote:

&gt; Some more information in case it helps - if I run the VNS from the command
&gt; line
&gt; with the "startVNS.bat" script, and connect my JodAndTika Vinci service, it
&gt; works fine, as shown by the log messages below:
&gt;
&gt; VinciAnalysisEngineService_impl: Starting Server with Socket Timeout:300000
&gt; [12/4/09 2:26 PM] Service JodAndTika starting on port 10013
&gt;
&gt; Thanks,
&gt; Hansen
&gt;
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>GATE: new version, new website, new manual, new commercial support</title>
<author><name>Hamish Cunningham &lt;hamish@dcs.shef.ac.uk&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-uima-user/200912.mbox/%3c20091208174710.903B43743DF@gateservice2.dcs.shef.ac.uk%3e"/>
<id>urn:uuid:%3c20091208174710-903B43743DF@gateservice2-dcs-shef-ac-uk%3e</id>
<updated>2009-12-08T17:47:10Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
GATE (http://gate.ac.uk/) news:

- release 5.1 of GATE Developer is now available, with lots of new
  features and integration of a number of important systems from 3rd
  parties (e.g. LingPipe, OpenNLP, OpenCalais, a revised UIMA
  connector); see http://gate.ac.uk/gate/doc/announce-5-1.html
- http://gate.ac.uk/ has had a face lift, and is now running on GATE
  Wiki
- the GATE User Guide has been revised and extended:
  http://gate.ac.uk/userguide/
- Ontotext (http://www.ontotext.com/) and Matrixware
  (http://www.matrixware.com/) now offer a new range of commercial
  support and custom development services

The 5.1 release highlights include:

- an entirely new ontology API from Johann Petrak of OFAI (the old
  one is still available but as a plugin)
- new benchmarking facilities for JAPE from Andrew Borthwick and
  colleagues at Intelius
- new quality assurance tools from Thomas Heitz and colleagues at
  Ontotext and Sheffield 
- a generic tagger integration framework from RenÃ© Witte of
  Concordia University
- several new code contributions from Ontotext, including a large
  knowledge base gazetteer and various plugin wrappers from Marin
  Nozchev, Georgi Georgiev and colleagues
- a revised and reordered user guide, amalgamated with the
  programmers' guide and other materials, and new screencams from
  Matrixware at http://gate.ac.uk/demos/developer-videos/
- Groovy support, application composition, section-by-section
  processing and lots of other bits and pieces
- new parallel text alignment tools from Sheffield

GATE has been supported by the EPSRC, BBSRC, AHRC, JISC, the EU and
commercial sponsors. To sponsor GATE see
http://gate.ac.uk/sponsor.html

The press release: http://gate.ac.uk/press/ or
http://www.shef.ac.uk/mediacentre/2009/1450.html

Coming soon: GATE Cloud, partly sponsored by http://www.larkc.eu/

2010 GATE events (http://gate.ac.uk/events.html):

- Sheffield, May 10-14, 2010: GATE intensive training course
- Malta, May 17-18, 2010: LREC "New Challenges for NLP
  Architectures" workshop
- Malta again, May 17-18, 2010: LREC "NLP and the Semantic Web"
  tutorial
- Vienna, May 31 2010: the 1st Information Retrieval Facility
  Conference: http://www.ir-facility.org/events/irf-conference/
'



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Annotation vs. FeatureStructure: CAS Consumer in Aggregate AE</title>
<author><name>Eric Riebling &lt;er1k@cs.cmu.edu&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-uima-user/200912.mbox/%3cloom.20091208T174250-178@post.gmane.org%3e"/>
<id>urn:uuid:%3cloom-20091208T174250-178@post-gmane-org%3e</id>
<updated>2009-12-08T16:49:36Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Eric Riebling &lt;er1k@...&gt; writes:

AHA!  All this can be fixed by simply obtaining a JCas representation of the CAS
in the CAS Consumer's processCas() method.  This is an oldie but goodie come
back to haunt me.  Yes for goodness sake, use a JCas, and things work so much
better. :)



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Implementing a Map as a custom feature for annotation</title>
<author><name>Marshall Schor &lt;msa@schor.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-uima-user/200912.mbox/%3c4B1E7D88.5040606@schor.com%3e"/>
<id>urn:uuid:%3c4B1E7D88-5040606@schor-com%3e</id>
<updated>2009-12-08T16:23:36Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>


Steven Bethard wrote:
&gt; On Sat, Dec 5, 2009 at 6:00 AM, Marshall Schor &lt;msa@schor.com&gt; wrote:
&gt;   
&gt;&gt; The UIMA CAS does not support storing Java Maps in the CAS.  Of course,
&gt;&gt; any individual annotator written in Java could use Java Maps, internally
&gt;&gt; within that annotator, as a Java object.  To put it into the CAS, you
&gt;&gt; would need to do some kind of "export" of it, into data structures the
&gt;&gt; CAS supports.
&gt;&gt;
&gt;&gt; One reason for this is to support a wider inter-operability: so that the
&gt;&gt; CAS you might produce could be sent to another annotator that was
&gt;&gt; written in C++, for instance (which UIMA does support).
&gt;&gt;     
&gt;
&gt; Are you saying that support for Maps can't be added to UIMA because of
&gt; interoperability concerns? Or just that since Maps aren't there now,
&gt; trying to use them will cause problems for interoperability?  It
&gt; certainly seems like UIMA could grow Map support - pretty much every
&gt; language has a map type of some sort: C++ STL map, Java HashMap, PHP
&gt; associative array, Python/Ruby dictionary, etc. Apache Thrift, for
&gt; example, supports exchange of all of these, cross-language:
&gt;
&gt;   http://wiki.apache.org/thrift/ThriftTypes
&gt;   

I was saying that Maps are not there now, and that if they are added,
they should be added in a way that preserves the basics of the UIMA idea
- supporting interoperability between Java and C++ being one of these ideas.

-Marshall
&gt; Steve
&gt;
&gt;   
&gt;&gt; Anton Shuster wrote:
&gt;&gt;     
&gt;&gt;&gt; Hello all,
&gt;&gt;&gt;
&gt;&gt;&gt; I tried my best to search for an answer to this topic but came up
&gt;&gt;&gt; short. I'm creating an Annotation type and I want to give it a feature
&gt;&gt;&gt; that is a Map (a HashMap or any other implementation).
&gt;&gt;&gt;
&gt;&gt;&gt; I looked through the documentation, but there is no information on
&gt;&gt;&gt; creating your own type such as this. All the documentation seems to
&gt;&gt;&gt; talk about is creating features which inherit the built-in types or
&gt;&gt;&gt; which inherit other features defined this way.
&gt;&gt;&gt;
&gt;&gt;&gt; Please let me know what's the right way to go about this.
&gt;&gt;&gt;
&gt;&gt;&gt; One usage scenario would be for annotating HTML tags. For example, an
&gt;&gt;&gt; HTML tag annotation could contain a label String and an attributes
&gt;&gt;&gt; Map. There are other scenarios as well, but this one is the most
&gt;&gt;&gt; obvious.
&gt;&gt;&gt;
&gt;&gt;&gt; Thanks for any help,
&gt;&gt;&gt; --Anton
&gt;&gt;&gt;
&gt;&gt;&gt;
&gt;&gt;&gt;
&gt;&gt;&gt;       
&gt;
&gt;
&gt;
&gt;   


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Annotation vs. FeatureStructure: CAS Consumer in Aggregate AE</title>
<author><name>Thilo Goetz &lt;twgoetz@gmx.de&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-uima-user/200912.mbox/%3c4B1E7C01.1040201@gmx.de%3e"/>
<id>urn:uuid:%3c4B1E7C01-1040201@gmx-de%3e</id>
<updated>2009-12-08T16:17:05Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On 12/8/2009 16:11, Eric Riebling wrote:
&gt; I'm running a UIMA-AS aggregate that consists of a single annotator, and a Base
&gt; UIMA Collection Reader and CAS Consumer.  I configure the annotator and CAS
&gt; Consumer as an Aggregate AE, and send it CASes using runRemoteAsyncAE,
&gt; specifying the Collection Reader.
&gt;
&gt; The CAS Consumer works fine with base UIMA, but when running it this way as
&gt; "pure UIMA-AS" it has trouble in the code which reads annotations out of the
&gt; CAS's AnnotationIndex.  Specifically, it gets a ClassCastException:
&gt;
&gt; Caused by: java.lang.ClassCastException: org.apache.uima.cas.impl.AnnotationImpl
&gt;
&gt; in the code that iterates through the AnnotationIndex:
&gt;
&gt; AnnotationIndex idx = (AnnotationIndex) aCAS.getAnnotationIndex( wordType );
&gt; Iterator&lt;Annotation&gt;  it = idx.iterator();
&gt; 		
&gt; // for each word
&gt; while ( it.hasNext() ) {
&gt;    Annotation a = (Annotation) it.next();
&gt;
&gt; I'm confused by a couple of points:
&gt;
&gt; 1.  How come the code works fine with base UIMA if there's a type casting issue
&gt;
&gt; 2.  Since the default type returned by the next() method of an annotation
&gt; iterator is normally a FeatureStructure, it seems that I should use
&gt; FeatureStructures, not Annotations.  How do I go about obtaining the same
&gt; information I would have gotten from Annotations, such as from
&gt; Annotation.getBegin(), Annotation.getCoveredText(), etc.?  Those methods are not
&gt; present on FeatureStructure, as far as I can tell.

I don't know the answer to your first question, that's
for the UIMA AS experts to answer.  To you second question:
an Annotation is a FeatureStructure with two int value
features, begin and end.  You can access those like any
other int valued features.  All the rest is just convenience.
So a.getCoveredText() for example is simply
cas.getDocumentText().substring(begin, end).

--Thilo


</pre>
</div>
</content>
</entry>
<entry>
<title>Annotation vs. FeatureStructure: CAS Consumer in Aggregate AE</title>
<author><name>Eric Riebling &lt;er1k@cs.cmu.edu&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-uima-user/200912.mbox/%3cloom.20091208T160945-281@post.gmane.org%3e"/>
<id>urn:uuid:%3cloom-20091208T160945-281@post-gmane-org%3e</id>
<updated>2009-12-08T15:11:06Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I'm running a UIMA-AS aggregate that consists of a single annotator, and a Base
UIMA Collection Reader and CAS Consumer.  I configure the annotator and CAS
Consumer as an Aggregate AE, and send it CASes using runRemoteAsyncAE,
specifying the Collection Reader.

The CAS Consumer works fine with base UIMA, but when running it this way as
"pure UIMA-AS" it has trouble in the code which reads annotations out of the
CAS's AnnotationIndex.  Specifically, it gets a ClassCastException:

Caused by: java.lang.ClassCastException: org.apache.uima.cas.impl.AnnotationImpl

in the code that iterates through the AnnotationIndex:

AnnotationIndex idx = (AnnotationIndex) aCAS.getAnnotationIndex( wordType ); 
Iterator&lt;Annotation&gt; it = idx.iterator();
		
// for each word
while ( it.hasNext() ) {
  Annotation a = (Annotation) it.next();

I'm confused by a couple of points:

1.  How come the code works fine with base UIMA if there's a type casting issue

2.  Since the default type returned by the next() method of an annotation
iterator is normally a FeatureStructure, it seems that I should use
FeatureStructures, not Annotations.  How do I go about obtaining the same
information I would have gotten from Annotations, such as from
Annotation.getBegin(), Annotation.getCoveredText(), etc.?  Those methods are not
present on FeatureStructure, as far as I can tell.



</pre>
</div>
</content>
</entry>
<entry>
<title>Comparison</title>
<author><name>&quot;ranganaths&quot; &lt;ranganath.s@excelindia.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-uima-user/200912.mbox/%3c20091207103002.897F1816044@nike.apache.org%3e"/>
<id>urn:uuid:%3c20091207103002-897F1816044@nike-apache-org%3e</id>
<updated>2009-12-07T10:30:13Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hello,

 

        I am working on a project which requires the Indexing and searching
of huge volumes of documents, we also extend this simple keyword search in
the future to a semantic one. I have seen many frameworks like Lucene solr,
Apache UIMA and all. I wish to know, out of the two or if there is anything
else which can suit our needs. Thanks in advance.

 

Regards,

Ranganath S



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Implementing a Map as a custom feature for annotation</title>
<author><name>Steven Bethard &lt;steven.bethard@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-uima-user/200912.mbox/%3cd11dcfba0912060010y3046bef2q447bbf61fbfb958e@mail.gmail.com%3e"/>
<id>urn:uuid:%3cd11dcfba0912060010y3046bef2q447bbf61fbfb958e@mail-gmail-com%3e</id>
<updated>2009-12-06T08:10:39Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On Sat, Dec 5, 2009 at 6:00 AM, Marshall Schor &lt;msa@schor.com&gt; wrote:
&gt; The UIMA CAS does not support storing Java Maps in the CAS. Â Of course,
&gt; any individual annotator written in Java could use Java Maps, internally
&gt; within that annotator, as a Java object. Â To put it into the CAS, you
&gt; would need to do some kind of "export" of it, into data structures the
&gt; CAS supports.
&gt;
&gt; One reason for this is to support a wider inter-operability: so that the
&gt; CAS you might produce could be sent to another annotator that was
&gt; written in C++, for instance (which UIMA does support).

Are you saying that support for Maps can't be added to UIMA because of
interoperability concerns? Or just that since Maps aren't there now,
trying to use them will cause problems for interoperability?  It
certainly seems like UIMA could grow Map support - pretty much every
language has a map type of some sort: C++ STL map, Java HashMap, PHP
associative array, Python/Ruby dictionary, etc. Apache Thrift, for
example, supports exchange of all of these, cross-language:

  http://wiki.apache.org/thrift/ThriftTypes

Steve

&gt; Anton Shuster wrote:
&gt;&gt; Hello all,
&gt;&gt;
&gt;&gt; I tried my best to search for an answer to this topic but came up
&gt;&gt; short. I'm creating an Annotation type and I want to give it a feature
&gt;&gt; that is a Map (a HashMap or any other implementation).
&gt;&gt;
&gt;&gt; I looked through the documentation, but there is no information on
&gt;&gt; creating your own type such as this. All the documentation seems to
&gt;&gt; talk about is creating features which inherit the built-in types or
&gt;&gt; which inherit other features defined this way.
&gt;&gt;
&gt;&gt; Please let me know what's the right way to go about this.
&gt;&gt;
&gt;&gt; One usage scenario would be for annotating HTML tags. For example, an
&gt;&gt; HTML tag annotation could contain a label String and an attributes
&gt;&gt; Map. There are other scenarios as well, but this one is the most
&gt;&gt; obvious.
&gt;&gt;
&gt;&gt; Thanks for any help,
&gt;&gt; --Anton
&gt;&gt;
&gt;&gt;
&gt;&gt;
&gt;



-- 
Where did you get that preposterous hypothesis?
Did Steve tell you that?
        --- The Hiphopopotamus


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Implementing a Map as a custom feature for annotation</title>
<author><name>Marshall Schor &lt;msa@schor.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-uima-user/200912.mbox/%3c4B1A6773.8080608@schor.com%3e"/>
<id>urn:uuid:%3c4B1A6773-8080608@schor-com%3e</id>
<updated>2009-12-05T14:00:19Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi Anton,

The UIMA CAS does not support storing Java Maps in the CAS.  Of course,
any individual annotator written in Java could use Java Maps, internally
within that annotator, as a Java object.  To put it into the CAS, you
would need to do some kind of "export" of it, into data structures the
CAS supports.

One reason for this is to support a wider inter-operability: so that the
CAS you might produce could be sent to another annotator that was
written in C++, for instance (which UIMA does support).

-Marshall

Anton Shuster wrote:
&gt; Hello all,
&gt;
&gt; I tried my best to search for an answer to this topic but came up
&gt; short. I'm creating an Annotation type and I want to give it a feature
&gt; that is a Map (a HashMap or any other implementation).
&gt;
&gt; I looked through the documentation, but there is no information on
&gt; creating your own type such as this. All the documentation seems to
&gt; talk about is creating features which inherit the built-in types or
&gt; which inherit other features defined this way.
&gt;
&gt; Please let me know what's the right way to go about this.
&gt;
&gt; One usage scenario would be for annotating HTML tags. For example, an
&gt; HTML tag annotation could contain a label String and an attributes
&gt; Map. There are other scenarios as well, but this one is the most
&gt; obvious.
&gt;
&gt; Thanks for any help,
&gt; --Anton
&gt;
&gt;
&gt;   


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Implementing a Map as a custom feature for annotation</title>
<author><name>Roberto Franchini &lt;ro.franchini@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-uima-user/200912.mbox/%3c63e2e4460912050446k77078994kaab146dce8467a8c@mail.gmail.com%3e"/>
<id>urn:uuid:%3c63e2e4460912050446k77078994kaab146dce8467a8c@mail-gmail-com%3e</id>
<updated>2009-12-05T12:46:24Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On Sat, Dec 5, 2009 at 1:55 AM, Anton Shuster &lt;brainiac86@gmail.com&gt; wrote:
&gt; Hello all,
&gt;
&gt; I tried my best to search for an answer to this topic but came up
&gt; short. I'm creating an Annotation type and I want to give it a feature
&gt; that is a Map (a HashMap or any other implementation).
&gt;
&gt; I looked through the documentation, but there is no information on
&gt; creating your own type such as this. All the documentation seems to
&gt; talk about is creating features which inherit the built-in types or
&gt; which inherit other features defined this way.
&gt;
&gt; Please let me know what's the right way to go about this.
&gt;
&gt; One usage scenario would be for annotating HTML tags. For example, an
&gt; HTML tag annotation could contain a label String and an attributes
&gt; Map. There are other scenarios as well, but this one is the most
&gt; obvious.
&gt;

Take a look ad the TikaAnnotator and the FsVariables in the sandbox.
In the first one you can find code and type sytem useful  for
annotating markup tags. In the latter show a way to implement maps
using annotations.
R.F.
-- 
Roberto Franchini
http://www.celi.it
http://www.blogmeter.it
http://www.memesphere.it
Tel +39.011.562.71.15
jabber:ro.franchini@gmail.com skype:ro.franchini


</pre>
</div>
</content>
</entry>
<entry>
<title>Implementing a Map as a custom feature for annotation</title>
<author><name>Anton Shuster &lt;brainiac86@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-uima-user/200912.mbox/%3c3c77b7840912041655t53331af1mf1fc54c06c33ee0b@mail.gmail.com%3e"/>
<id>urn:uuid:%3c3c77b7840912041655t53331af1mf1fc54c06c33ee0b@mail-gmail-com%3e</id>
<updated>2009-12-05T00:55:58Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hello all,

I tried my best to search for an answer to this topic but came up
short. I'm creating an Annotation type and I want to give it a feature
that is a Map (a HashMap or any other implementation).

I looked through the documentation, but there is no information on
creating your own type such as this. All the documentation seems to
talk about is creating features which inherit the built-in types or
which inherit other features defined this way.

Please let me know what's the right way to go about this.

One usage scenario would be for annotating HTML tags. For example, an
HTML tag annotation could contain a label String and an attributes
Map. There are other scenarios as well, but this one is the most
obvious.

Thanks for any help,
--Anton


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Tips for a beginner</title>
<author><name>Thilo Goetz &lt;twgoetz@gmx.de&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-uima-user/200912.mbox/%3c4B18C3E4.8050607@gmx.de%3e"/>
<id>urn:uuid:%3c4B18C3E4-8050607@gmx-de%3e</id>
<updated>2009-12-04T08:10:12Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Rogan Creswick wrote:
&gt; On Thu, Dec 3, 2009 at 8:19 PM, Marshall Schor &lt;msa@schor.com&gt; wrote:
&gt;&gt; PEARs are both a packaging, and an "isolation" capability.
&gt;&gt;
&gt;&gt; Packaging:  You get to zip up together potentially many components in an
&gt;&gt; aggregate, including the JARs, and the classpaths, so that others can
&gt;&gt; use the component.
&gt;&gt;
&gt;&gt; Isolation: If your Pear uses a particular version of some Jars, included
&gt;&gt; in your PEAR package, UIMA runs these with an isolated class loader so
&gt;&gt; that your versions of the Jars are kept isolated from other versions of
&gt;&gt; the same Jars that might also be present in the rest of the system.
&gt;&gt;
&gt; 
&gt; Does anyone know how the Annotator Parameters / Resources play into
&gt; PEAR packaging?
&gt; 
&gt; I have a need for "configurable" PEARs: For example, machine learning
&gt; algorithms that are self-contained in the PEAR, produce an agreed upon
&gt; annotation, and can be parameterized with different knowledge bases.
&gt; 
&gt; The goal is to reuse one PEAR to handle multiple data sets, or perform
&gt; a similar test task with assorted sets of training data.  Since the
&gt; implementation of the algorithm is separable from the training /
&gt; knowledge base, it just makes sense to maintain that separation at the
&gt; UIMA level too.
&gt; 
&gt; I've managed to hack around the UIMA API for parameters (which don't
&gt; seem to work for PEAR packaging) but the result is a bit fragile, and
&gt; quite difficult to debug.  In particular, overridden parameters in
&gt; aggregate annotators don't seem to "override" the component's
&gt; parameter defaults at runtime -- as far as I can tell, this takes
&gt; effect when the PEAR is packaged.
&gt; 
&gt; Thanks!
&gt; Rogan

This should be fixed in the current development version and the
(now really soon) upcoming release, see
http://issues.apache.org/jira/browse/UIMA-1107

--Thilo

&gt; 
&gt; 
&gt; 
&gt;&gt; This isolation may not be what you want, though. For more typical
&gt;&gt; component assembly, you put components together without Pear isolation,
&gt;&gt; using "plain" components and building normal aggregations of these.  In
&gt;&gt; this approach, you have to insure that any Jars used by the components
&gt;&gt; are at the same level.
&gt;&gt;
&gt;&gt; When you're all done, you can deliver the resulting aggregate as a Pear,
&gt;&gt; if that is reasonable in your scenario, to others.
&gt;&gt;
&gt;&gt; HTH.   -Marshall
&gt;&gt;
&gt;&gt; William Colen wrote:
&gt;&gt;&gt; Hello,
&gt;&gt;&gt;
&gt;&gt;&gt; We are moving our Brazilian Portuguese annotators (sentence detector,
&gt;&gt;&gt; tokenizer, tagger, parser) to UIMA. We have different implementations of
&gt;&gt;&gt; some annotators: some were created using OpenNLP, others where written from
&gt;&gt;&gt; scratch.
&gt;&gt;&gt; We would like to have .PEARs for each annotator, so in the applications we
&gt;&gt;&gt; would change the annotators easily. Also we don't want to have duplicated
&gt;&gt;&gt; resources (mostly dictionaries, and the UIMA typesystem descriptor), so we
&gt;&gt;&gt; need a way to share.
&gt;&gt;&gt;
&gt;&gt;&gt; The first thing we did was to create the UIMA wrappers and descriptors. They
&gt;&gt;&gt; are ready and we were able to create a UIMA application that uses the
&gt;&gt;&gt; annotators (but we had to put all the code and descriptors in only one
&gt;&gt;&gt; Eclipse project. No .pear yet).
&gt;&gt;&gt;
&gt;&gt;&gt; Now we are splitting the projects in smaller ones. For instance, we create
&gt;&gt;&gt; only one TypeSystem.xml and would like every project to use it. So I created
&gt;&gt;&gt; a simple .pear with the TypeSystem.xml.
&gt;&gt;&gt; After that I created another pear for the sentence detector, but I couldn't
&gt;&gt;&gt; import the TypeSystem.xml of the first pear. The only way to do that was
&gt;&gt;&gt; using the relative path or if I put the TypeSystem.xml inside the JAR file
&gt;&gt;&gt; of the first pear, and import it using classpath.
&gt;&gt;&gt; Do you know a better way to do that?
&gt;&gt;&gt;
&gt;&gt;&gt; Latter I'll have to do the same with the dictionaries. I'm not sure if the
&gt;&gt;&gt; best approach is to create a .pear only for it. Will it work?
&gt;&gt;&gt;
&gt;&gt;&gt; Thanks
&gt;&gt;&gt; William
&gt;&gt;&gt;
&gt;&gt;&gt;



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Tips for a beginner</title>
<author><name>Rogan Creswick &lt;creswick@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-uima-user/200912.mbox/%3cc834ec80912032241n7fc3923flbdebd2c13f0bb1f6@mail.gmail.com%3e"/>
<id>urn:uuid:%3cc834ec80912032241n7fc3923flbdebd2c13f0bb1f6@mail-gmail-com%3e</id>
<updated>2009-12-04T06:41:47Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On Thu, Dec 3, 2009 at 8:19 PM, Marshall Schor &lt;msa@schor.com&gt; wrote:
&gt;
&gt; PEARs are both a packaging, and an "isolation" capability.
&gt;
&gt; Packaging:  You get to zip up together potentially many components in an
&gt; aggregate, including the JARs, and the classpaths, so that others can
&gt; use the component.
&gt;
&gt; Isolation: If your Pear uses a particular version of some Jars, included
&gt; in your PEAR package, UIMA runs these with an isolated class loader so
&gt; that your versions of the Jars are kept isolated from other versions of
&gt; the same Jars that might also be present in the rest of the system.
&gt;

Does anyone know how the Annotator Parameters / Resources play into
PEAR packaging?

I have a need for "configurable" PEARs: For example, machine learning
algorithms that are self-contained in the PEAR, produce an agreed upon
annotation, and can be parameterized with different knowledge bases.

The goal is to reuse one PEAR to handle multiple data sets, or perform
a similar test task with assorted sets of training data.  Since the
implementation of the algorithm is separable from the training /
knowledge base, it just makes sense to maintain that separation at the
UIMA level too.

I've managed to hack around the UIMA API for parameters (which don't
seem to work for PEAR packaging) but the result is a bit fragile, and
quite difficult to debug.  In particular, overridden parameters in
aggregate annotators don't seem to "override" the component's
parameter defaults at runtime -- as far as I can tell, this takes
effect when the PEAR is packaged.

Thanks!
Rogan



&gt; This isolation may not be what you want, though. For more typical
&gt; component assembly, you put components together without Pear isolation,
&gt; using "plain" components and building normal aggregations of these.  In
&gt; this approach, you have to insure that any Jars used by the components
&gt; are at the same level.
&gt;
&gt; When you're all done, you can deliver the resulting aggregate as a Pear,
&gt; if that is reasonable in your scenario, to others.
&gt;
&gt; HTH.   -Marshall
&gt;
&gt; William Colen wrote:
&gt;&gt; Hello,
&gt;&gt;
&gt;&gt; We are moving our Brazilian Portuguese annotators (sentence detector,
&gt;&gt; tokenizer, tagger, parser) to UIMA. We have different implementations of
&gt;&gt; some annotators: some were created using OpenNLP, others where written from
&gt;&gt; scratch.
&gt;&gt; We would like to have .PEARs for each annotator, so in the applications we
&gt;&gt; would change the annotators easily. Also we don't want to have duplicated
&gt;&gt; resources (mostly dictionaries, and the UIMA typesystem descriptor), so we
&gt;&gt; need a way to share.
&gt;&gt;
&gt;&gt; The first thing we did was to create the UIMA wrappers and descriptors. They
&gt;&gt; are ready and we were able to create a UIMA application that uses the
&gt;&gt; annotators (but we had to put all the code and descriptors in only one
&gt;&gt; Eclipse project. No .pear yet).
&gt;&gt;
&gt;&gt; Now we are splitting the projects in smaller ones. For instance, we create
&gt;&gt; only one TypeSystem.xml and would like every project to use it. So I created
&gt;&gt; a simple .pear with the TypeSystem.xml.
&gt;&gt; After that I created another pear for the sentence detector, but I couldn't
&gt;&gt; import the TypeSystem.xml of the first pear. The only way to do that was
&gt;&gt; using the relative path or if I put the TypeSystem.xml inside the JAR file
&gt;&gt; of the first pear, and import it using classpath.
&gt;&gt; Do you know a better way to do that?
&gt;&gt;
&gt;&gt; Latter I'll have to do the same with the dictionaries. I'm not sure if the
&gt;&gt; best approach is to create a .pear only for it. Will it work?
&gt;&gt;
&gt;&gt; Thanks
&gt;&gt; William
&gt;&gt;
&gt;&gt;
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Tips for a beginner</title>
<author><name>Marshall Schor &lt;msa@schor.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-uima-user/200912.mbox/%3c4B188DE9.7050704@schor.com%3e"/>
<id>urn:uuid:%3c4B188DE9-7050704@schor-com%3e</id>
<updated>2009-12-04T04:19:53Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi William,

PEARs are both a packaging, and an "isolation" capability. 

Packaging:  You get to zip up together potentially many components in an
aggregate, including the JARs, and the classpaths, so that others can
use the component.

Isolation: If your Pear uses a particular version of some Jars, included
in your PEAR package, UIMA runs these with an isolated class loader so
that your versions of the Jars are kept isolated from other versions of
the same Jars that might also be present in the rest of the system.

This isolation may not be what you want, though. For more typical
component assembly, you put components together without Pear isolation,
using "plain" components and building normal aggregations of these.  In
this approach, you have to insure that any Jars used by the components
are at the same level.

When you're all done, you can deliver the resulting aggregate as a Pear,
if that is reasonable in your scenario, to others.

HTH.   -Marshall

William Colen wrote:
&gt; Hello,
&gt;
&gt; We are moving our Brazilian Portuguese annotators (sentence detector,
&gt; tokenizer, tagger, parser) to UIMA. We have different implementations of
&gt; some annotators: some were created using OpenNLP, others where written from
&gt; scratch.
&gt; We would like to have .PEARs for each annotator, so in the applications we
&gt; would change the annotators easily. Also we don't want to have duplicated
&gt; resources (mostly dictionaries, and the UIMA typesystem descriptor), so we
&gt; need a way to share.
&gt;
&gt; The first thing we did was to create the UIMA wrappers and descriptors. They
&gt; are ready and we were able to create a UIMA application that uses the
&gt; annotators (but we had to put all the code and descriptors in only one
&gt; Eclipse project. No .pear yet).
&gt;
&gt; Now we are splitting the projects in smaller ones. For instance, we create
&gt; only one TypeSystem.xml and would like every project to use it. So I created
&gt; a simple .pear with the TypeSystem.xml.
&gt; After that I created another pear for the sentence detector, but I couldn't
&gt; import the TypeSystem.xml of the first pear. The only way to do that was
&gt; using the relative path or if I put the TypeSystem.xml inside the JAR file
&gt; of the first pear, and import it using classpath.
&gt; Do you know a better way to do that?
&gt;
&gt; Latter I'll have to do the same with the dictionaries. I'm not sure if the
&gt; best approach is to create a .pear only for it. Will it work?
&gt;
&gt; Thanks
&gt; William
&gt;
&gt;   


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Exception thrown when deploying CAS Processors in managed mode</title>
<author><name>Hansen Candrawinata &lt;hansen.candrawinata@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-uima-user/200912.mbox/%3cloom.20091204T042809-79@post.gmane.org%3e"/>
<id>urn:uuid:%3cloom-20091204T042809-79@post-gmane-org%3e</id>
<updated>2009-12-04T03:30:53Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Some more information in case it helps - if I run the VNS from the command line
with the "startVNS.bat" script, and connect my JodAndTika Vinci service, it
works fine, as shown by the log messages below:

VinciAnalysisEngineService_impl: Starting Server with Socket Timeout:300000
[12/4/09 2:26 PM] Service JodAndTika starting on port 10013

Thanks,
Hansen



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Exception thrown when deploying CAS Processors in managed mode</title>
<author><name>Hansen Candrawinata &lt;hansen.candrawinata@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-uima-user/200912.mbox/%3cloom.20091204T032754-349@post.gmane.org%3e"/>
<id>urn:uuid:%3cloom-20091204T032754-349@post-gmane-org%3e</id>
<updated>2009-12-04T03:04:58Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Okay, I did some debugging, traced through the UIMA source code, and found the
likely cause, that is, the VinciAnalysisEngineService_impl failed to be 
started.  This is most likely due to misconfiguration in my classpath[*], so I
started the service manually from the command line, and it was looking good for
a second, but then it suddenly stopped due to a shutdown request.  Here are the
log messages printed out in the console:

VinciAnalysisEngineService_impl: Starting Server with Socket Timeout:300000
[12/4/09 1:26 PM] Service JodAndTika starting on port 10001
[12/4/09 1:26 PM] Pooledcount: 1 busyCount: 0
[12/4/09 1:26 PM](VinciServer.shutdown()) Accepted shutdown request: Shutting
Down the Vinci Analysis Engine Service
04/12/2009 1:26:12 PM
org.apache.uima.adapter.vinci.VinciAnalysisEngineService_impl stop(315)
INFO: Shutting Down the Vinci Analysis Engine Service
[12/4/09 1:26 PM](VinciServer.shutdown()) Accepted shutdown request: Shutting
Down the Vinci Analysis Engine Service

[*] 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.VinciCasProcessorDe
ployer
line 551, where the Process object returned should have been used to check the
status of the spawned process.

--

The CPE seemed to indicate that there was an error when converting CAS container
to CAS data, as shown below:

04/12/2009 1:26:09 PM
org.apache.uima.collection.impl.cpm.container.deployer.vns.LocalVNS initialize
INFO: The CPM is about to test its VNS port 9005 for availability. (Thread 
Name: BaseCPMImpl-Thread) 
04/12/2009 1:26:09 PM
org.apache.uima.collection.impl.cpm.container.deployer.vns.LocalVNS initialize
INFO: The service port 9005 is available on localhost. (Thread Name: 
BaseCPMImpl-Thread) 
04/12/2009 1:26:09 PM
org.apache.uima.collection.impl.cpm.container.deployer.vns.LocalVNS initialize
INFO: The CPM VNS activity started on port 9005. (Thread Name: BaseCPMImpl-
Thread)
04/12/2009 1:26:09 PM
org.apache.uima.collection.impl.cpm.container.deployer.vns.LocalVNS process
INFO: The CPM VNS thread started. (Thread Name: VNS-Thread) VNS Port: 9005 
04/12/2009 1:26:09 PM
org.apache.uima.collection.impl.cpm.container.deployer.vinci.VinciCasProcessorDe
ployer initialize
INFO: The next port  was retrieved from the service port queue. (Thread Name: 
BaseCPMImpl-Thread)
04/12/2009 1:26:09 PM
org.apache.uima.collection.impl.cpm.container.deployer.vinci.VinciCasProcessorDe
ployer initialize
INFO: The service port is not available yet. There are 5000 retries left to
acquire the port. (Thread Name: BaseCPMImpl-Thread) 
&lt;snipped&gt;
04/12/2009 1:26:11 PM
org.apache.uima.collection.impl.cpm.container.deployer.vinci.VinciCasProcessorDe
ployer initialize
INFO: The service port is not available yet. There are 4984 retries left to 
acquire the port. (Thread Name: BaseCPMImpl-Thread) 
[12/4/09 1:26 PM] Pooledcount: 1 busyCount: 0
04/12/2009 1:26:11 PM
org.apache.uima.collection.impl.cpm.container.deployer.vns.LocalVNS initialize
INFO: The service port 10001 is available on localhost. (Thread Name: 
PooledThread#0) 
04/12/2009 1:26:11 PM 
org.apache.uima.collection.impl.cpm.container.deployer.vns.LocalVNS initialize
INFO: The service port 10001 is available on localhost. (Thread Name: 
PooledThread#0) 
04/12/2009 1:26:11 PM 
org.apache.uima.collection.impl.cpm.container.deployer.vinci.VinciCasProcessorDe
ployer initialize
INFO: The next port 10001 was retrieved from the service port queue. (Thread
Name: BaseCPMImpl-Thread)
04/12/2009 1:26:11 PM
org.apache.uima.collection.impl.cpm.container.deployer.vns.LocalVNS initialize
INFO: The service port 10002 is available on localhost. (Thread Name: 
BaseCPMImpl-Thread) 
04/12/2009 1:26:11 PM 
org.apache.uima.collection.impl.cpm.container.deployer.vns.LocalVNS initialize
INFO: The service port 10002 is available on localhost. (Thread Name: 
BaseCPMImpl-Thread) 
 ** initializationComplete
org.apache.uima.UIMARuntimeException
	at 
org.apache.uima.collection.impl.CasConverter.casContainerToCasData(CasConverter.
java:146)
	at 
org.apache.uima.collection.impl.cpm.engine.ProcessingUnit.processNext(Processing
Unit.java:795)
	at 
org.apache.uima.collection.impl.cpm.engine.ProcessingUnit.run(ProcessingUnit.jav
a:577)
Caused by: XCASParsingException: Error parsing XCAS from source &lt;unknown&gt; at 
line &lt;unknown&gt;, column &lt;unknown&gt;: expected text but found element: &lt;i&gt;.
	at 
org.apache.uima.cas_data.impl.XCasToCasDataSaxHandler.createException(XCasToCasD
ataSaxHandler.java:451)
	at 
org.apache.uima.cas_data.impl.XCasToCasDataSaxHandler.createException(XCasToCasD
ataSaxHandler.java:473)
	at 
org.apache.uima.cas_data.impl.XCasToCasDataSaxHandler.startElement(XCasToCasData
SaxHandler.java:161)
	at 
org.apache.uima.cas.impl.XCASSerializer$XCASDocSerializer.startElement(XCASSeria
lizer.java:327)
	at 
org.apache.uima.cas.impl.XCASSerializer$XCASDocSerializer.encodePrimitiveTypeArr
ayFS(XCASSerializer.java:542)
	at 
org.apache.uima.cas.impl.XCASSerializer$XCASDocSerializer.encodeFS(XCASSerialize
r.java:505)
	at 
org.apache.uima.cas.impl.XCASSerializer$XCASDocSerializer.encodeQueued(XCASSeria
lizer.java:407)
	at 
org.apache.uima.cas.impl.XCASSerializer$XCASDocSerializer.serialize(XCASSerializ
er.java:272)
	at 
org.apache.uima.cas.impl.XCASSerializer$XCASDocSerializer.access$500(XCASSeriali
zer.java:62)
	at 
org.apache.uima.cas.impl.XCASSerializer.serialize(XCASSerializer.java:919)
	at 
org.apache.uima.cas.impl.XCASSerializer.serialize(XCASSerializer.java:896)
	at 
org.apache.uima.cas.impl.XCASSerializer.serialize(XCASSerializer.java:878)
	at 
org.apache.uima.collection.impl.CasConverter.casContainerToCasData(CasConverter.
java:142)
	... 2 more
04/12/2009 1:26:12 PM org.apache.uima.collection.impl.cpm.engine.ProcessingUnit 
process
SEVERE: The container JodAndTika returned the following error message: null 
(Thread Name: [Procesing Pipeline#1 Thread]::) 
04/12/2009 1:26:12 PM org.apache.uima.collection.impl.cpm.engine.ProcessingUnit 
maybeLogSevereException(2499)
SEVERE: Thread: [Procesing Pipeline#1 Thread]::, message: null
org.apache.uima.UIMARuntimeException
	at 
org.apache.uima.collection.impl.CasConverter.casContainerToCasData(CasConverter.
java:146)
	at 
org.apache.uima.collection.impl.cpm.engine.ProcessingUnit.processNext(Processing
Unit.java:795)
	at 
org.apache.uima.collection.impl.cpm.engine.ProcessingUnit.run(ProcessingUnit.jav
a:577)
Caused by: XCASParsingException: Error parsing XCAS from source &lt;unknown&gt; at 
line &lt;unknown&gt;, column &lt;unknown&gt;: expected text but found element: &lt;i&gt;.
	at 
org.apache.uima.cas_data.impl.XCasToCasDataSaxHandler.createException(XCasToCasD
ataSaxHandler.java:451)
	at 
org.apache.uima.cas_data.impl.XCasToCasDataSaxHandler.createException(XCasToCasD
ataSaxHandler.java:473)
	at 
org.apache.uima.cas_data.impl.XCasToCasDataSaxHandler.startElement(XCasToCasData
SaxHandler.java:161)
	at 
org.apache.uima.cas.impl.XCASSerializer$XCASDocSerializer.startElement(XCASSeria
lizer.java:327)
	at 
org.apache.uima.cas.impl.XCASSerializer$XCASDocSerializer.encodePrimitiveTypeArr
ayFS(XCASSerializer.java:542)
	at 
org.apache.uima.cas.impl.XCASSerializer$XCASDocSerializer.encodeFS(XCASSerialize
r.java:505)
	at 
org.apache.uima.cas.impl.XCASSerializer$XCASDocSerializer.encodeQueued(XCASSeria
lizer.java:407)
	at 
org.apache.uima.cas.impl.XCASSerializer$XCASDocSerializer.serialize(XCASSerializ
er.java:272)
	at 
org.apache.uima.cas.impl.XCASSerializer$XCASDocSerializer.access$500(XCASSeriali
zer.java:62)
	at 
org.apache.uima.cas.impl.XCASSerializer.serialize(XCASSerializer.java:919)
	at 
org.apache.uima.cas.impl.XCASSerializer.serialize(XCASSerializer.java:896)
	at 
org.apache.uima.cas.impl.XCASSerializer.serialize(XCASSerializer.java:878)
	at 
org.apache.uima.collection.impl.CasConverter.casContainerToCasData(CasConverter.
java:142)
	... 2 more
 ** entityProcessComplete
04/12/2009 1:26:12 PM 
org.apache.uima.collection.impl.cpm.container.ProcessingContainer_Impl process
SEVERE: The CPM stopped because the configured error threshold 0 was exceeded. 
(Thread Name: [Procesing Pipeline#1 Thread]::) Component Name: JodAndTika 
04/12/2009 1:26:12 PM org.apache.uima.collection.impl.cpm.engine.ProcessingUnit 
process
SEVERE: The CPM is terminating. The current component is JodAndTika. (Thread 
Name: [Procesing Pipeline#1 Thread]::) 
04/12/2009 1:26:12 PM org.apache.uima.collection.impl.cpm.engine.ProcessingUnit 
process
WARNING: The CPM cannot be stopped by force. The current container is 
JodAndTika. (Thread Name: [Procesing Pipeline#1 Thread]::) Reason: The CAS 
processor JodAndTika is configured to stop the CPM when excessive errors are 
encountered.  (Thread Name: [Procesing Pipeline#1 Thread]::)
04/12/2009 1:26:12 PM org.apache.uima.collection.impl.cpm.engine.ProcessingUnit 
maybeLogSevereException(2499)
SEVERE: Thread: [Procesing Pipeline#1 Thread]::, message: 
org.apache.uima.collection.base_cpm.AbortCPMException: 
	at 
org.apache.uima.collection.impl.cpm.container.ProcessingContainer_Impl.increment
CasProcessorErrors(ProcessingContainer_Impl.java:802)
	at 
org.apache.uima.collection.impl.cpm.engine.ProcessingUnit.processNext(Processing
Unit.java:1038)
	at 
org.apache.uima.collection.impl.cpm.engine.ProcessingUnit.run(ProcessingUnit.jav
a:577)
04/12/2009 1:26:12 PM org.apache.uima.collection.impl.cpm.engine.CPMEngine 
process
INFO: The collection reader thread state is: 1004 (Thread Name: [Procesing 
Pipeline#1 Thread]::) 
04/12/2009 1:26:12 PM org.apache.uima.collection.impl.cpm.engine.CPMEngine 
process
INFO: The CPM processing unit is 0 and processing state 2003. (Thread Name:
[Procesing Pipeline#1 Thread]::)
04/12/2009 1:26:12 PM org.apache.uima.collection.impl.cpm.engine.CPMEngine 
process
INFO: The application stopped the CPM. (Thread Name: [Procesing Pipeline#1
Thread]::)
04/12/2009 1:26:12 PM org.apache.uima.collection.impl.cpm.engine.CPMEngine 
process
INFO: The CPM engine is stopping. An end-of-file token is added to the worker 
queue. (Thread Name: [Procesing Pipeline#1 Thread]::) Forced stop: true
04/12/2009 1:26:12 PM 
org.apache.uima.collection.impl.cpm.container.deployer.vns.LocalVNS process
INFO: The CPM VNS received a request to stop. (Thread Name: CPMEngine Thread) 
[12/4/09 1:26 PM] Interrupting pooled thread: 0
[12/4/09 1:26 PM] interrupted
[12/4/09 1:26 PM] pooled thread exit
04/12/2009 1:26:12 PM 
org.apache.uima.collection.impl.cpm.container.deployer.vns.LocalVNS process
INFO: The CPM VNS activity stopped. (Thread Name: CPMEngine Thread) 
04/12/2009 1:26:12 PM 
org.apache.uima.collection.impl.cpm.container.deployer.VinciTAP 
collectionProcessComplete(1199)
INFO:  Sending COLLECTION PROCESS COMPLETE TO Service
&lt;vinci:FRAME xmlns:vinci="http://uima.apache.org/vinci/FrameSpec/"&gt;
   &lt;vinci:COMMAND&gt;CollectionProcessComplete&lt;/vinci:COMMAND&gt;
&lt;/vinci:FRAME&gt;

04/12/2009 1:26:12 PM 
org.apache.uima.collection.impl.cpm.container.deployer.VinciTAP process
INFO: The service application stopped. (Thread Name: CPMEngine Thread) Service 
Host: 127.0.0.1 Service Port: 10001 CMD: &lt;vinci:FRAME 
xmlns:vinci="http://uima.apache.org/vinci/FrameSpec/"&gt;
   &lt;vinci:COMMAND&gt;Shutdown&lt;/vinci:COMMAND&gt;
&lt;/vinci:FRAME&gt;

04/12/2009 1:26:14 PM 
org.apache.uima.collection.impl.cpm.container.deployer.vns.LocalVNS process
INFO: The CPM VNS received a request to stop. (Thread Name: BaseCPMImpl-Thread) 
 ** aborted
04/12/2009 1:26:14 PM 
org.apache.uima.collection.impl.cpm.container.deployer.vns.LocalVNS process
INFO: The CPM VNS activity stopped. (Thread Name: BaseCPMImpl-Thread)

--

Thanks,
Hansen

PS. Is there anyway to bypass the 80 line characters limit?  It makes it really
hard to post stack traces of exceptions.



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Exception thrown when deploying CAS Processors in managed mode</title>
<author><name>Hansen Candrawinata &lt;hansen.candrawinata@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-uima-user/200912.mbox/%3cloom.20091204T005643-944@post.gmane.org%3e"/>
<id>urn:uuid:%3cloom-20091204T005643-944@post-gmane-org%3e</id>
<updated>2009-12-04T00:52:33Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi Marshall,

Marshall Schor &lt;msa@...&gt; writes:
&gt; In reading the documentation
&gt;
(http://incubator.apache.org/uima/downloads/releaseDocs/2.2.2-incubating/docs/html/references/references.html#ugr.ref.xml.cpe_descriptor.descriptor.cas_processors.individual
&gt; ) it indicates that the "managed" mode (indicated by specifying "local"
&gt; as the deployment option) requires that the "CAS Processor descriptor
&gt; referenced in the |&lt;descriptor&gt;| element must be a Vinci /Service
&gt; Deployment Descriptor/, which configures a CAS Processor for deployment
&gt; as a Vinci service (see Section 3.6, "Working with Remote Services"
&gt;
&lt;http://incubator.apache.org/uima/downloads/releaseDocs/2.2.2-incubating/docs/html/tutorials_and_users_guides/tutorials_and_users_guides.html#ugr.tug.application.remote_services&gt;
&gt; in UIMA Tutorial and Developers' Guides)."
&gt; 
&gt; So, that I think is the source of the problem.

Thanks for replying.  Sorry, I missed that part of the documentation.  (I was
too eager to learn fast!)

However, I am still not able to deploy my CAS Processor in managed mode.  I
followed the instructions and changed the CAS Processor descriptor in my CPE
descriptor to be a Vinci service deployment descriptor and then run the CPE code
(cpe.process()), but my CAS Processor wasn't not called at all.  Instead, the
CPM seemed to be stuck for not being able to find the service port.  Here is the
snippet of the log messages:

04/12/2009 10:45:30 AM
org.apache.uima.collection.impl.cpm.container.deployer.vns.LocalVNS initialize
INFO: The CPM is about to test its VNS port 9005 for availability. (Thread Name:
BaseCPMImpl-Thread) 
04/12/2009 10:45:30 AM
org.apache.uima.collection.impl.cpm.container.deployer.vns.LocalVNS initialize
INFO: The service port 9005 is available on localhost. (Thread Name:
BaseCPMImpl-Thread) 
04/12/2009 10:45:30 AM
org.apache.uima.collection.impl.cpm.container.deployer.vns.LocalVNS initialize
INFO: The CPM VNS activity started on port 9005. (Thread Name: BaseCPMImpl-
Thread)
04/12/2009 10:45:30 AM
org.apache.uima.collection.impl.cpm.container.deployer.vns.LocalVNS process
INFO: The CPM VNS thread started. (Thread Name: VNS-Thread) VNS Port: 9005 
04/12/2009 10:45:30 AM
org.apache.uima.collection.impl.cpm.container.deployer.vinci.VinciCasProcessorDe
ployer
initialize
INFO: The next port  was retrieved from the service port queue. (Thread Name:
BaseCPMImpl-Thread)
04/12/2009 10:45:30 AM
org.apache.uima.collection.impl.cpm.container.deployer.vinci.VinciCasProcessorDe
ployer
initialize
INFO: The service port is not available yet. There are 5000 retries left to
acquire the port. (Thread Name: BaseCPMImpl-Thread) 
04/12/2009 10:45:31 AM
org.apache.uima.collection.impl.cpm.container.deployer.vinci.VinciCasProcessorDe
ployer
initialize
INFO: The service port is not available yet. There are 4999 retries left to
acquire the port. (Thread Name: BaseCPMImpl-Thread) 
04/12/2009 10:45:31 AM
org.apache.uima.collection.impl.cpm.container.deployer.vinci.VinciCasProcessorDe
ployer
initialize
INFO: The service port is not available yet. There are 4998 retries left to
acquire the port. (Thread Name: BaseCPMImpl-Thread) 
04/12/2009 10:45:31 AM
org.apache.uima.collection.impl.cpm.container.deployer.vinci.VinciCasProcessorDe
ployer
initialize
...

Perhaps I haven't really understood how Vinci works and how it should be used to
deploy a CAS processor in managed mode, so I would like to clarify a few things:
When deploying a CAS processor in managed mode, the corresponding CAS processor
descriptor in a CPE descriptor has to reference a Vinci Service Deployment
Descriptor.  Then, what is the next step?
a. Can I now run "cpe.process()"?  Or
b. I need to manually start the VNS with "startVNS.bat", deploy my CAS processor
as a Vinci service with "startVinciService.bat", and then run "cpe.process()"?

My understanding is it is (a) because a managed deployment mode means that the
CPE will use its internal VNS to start the CAS processor.  Is this correct?  But
as I said, when I tried (a) the CPE was stuck in a retry loop because of not
being able to find the service port (as shown by the log messages above).

In case it's relevant, here is my Vinci service descriptor referenced in the CPE
descriptor:

&lt;deployment name="JOD and TIKA Annotator Service"&gt;
  &lt;service name="JodAndTika" provider="vinci"&gt;
    &lt;parameter name="resourceSpecifierPath"
value="H:\ttsrc\javasoe\documentconversion\desc\JodAndTika.xml"/&gt;
    &lt;parameter name="numInstances" value="1"/&gt;
  &lt;/service&gt;
&lt;/deployment&gt;

Thanks,
Hansen



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Exception thrown when deploying CAS Processors in managed mode</title>
<author><name>Marshall Schor &lt;msa@schor.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-uima-user/200912.mbox/%3c4B17D8E5.3090504@schor.com%3e"/>
<id>urn:uuid:%3c4B17D8E5-3090504@schor-com%3e</id>
<updated>2009-12-03T15:27:33Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi Hansen,

In reading the documentation
(http://incubator.apache.org/uima/downloads/releaseDocs/2.2.2-incubating/docs/html/references/references.html#ugr.ref.xml.cpe_descriptor.descriptor.cas_processors.individual
) it indicates that the "managed" mode (indicated by specifying "local"
as the deployment option) requires that the "CAS Processor descriptor
referenced in the |&lt;descriptor&gt;| element must be a Vinci /Service
Deployment Descriptor/, which configures a CAS Processor for deployment
as a Vinci service (see Section 3.6, "Working with Remote Services"
&lt;http://incubator.apache.org/uima/downloads/releaseDocs/2.2.2-incubating/docs/html/tutorials_and_users_guides/tutorials_and_users_guides.html#ugr.tug.application.remote_services&gt;
in UIMA Tutorial and Developers' Guides)."

So, that I think is the source of the problem.

-Marshall

Hansen Candrawinata wrote:
&gt; My CAS processors works fine when deployed in integrated mode, but not when 
&gt; deployed in managed mode.   
&gt;
&gt; The following exception was thrown instead (notice the path in the exception
&gt; message is referring to a directory instead of a file - no idea where the path
&gt; came from and how to it was formulated to become like that):
&gt;
&gt; org.apache.uima.util.InvalidXMLException: Invalid descriptor at 
&gt; file:/H:/ttsrc/javasoe/documentconversion.
&gt; 	at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:193)
&gt; 	at
&gt; org.apache.uima.util.impl.XMLParser_impl.parseResourceSpecifier(XMLParser_impl.j
&gt; ava:365)
&gt; 	at
&gt; org.apache.uima.util.impl.XMLParser_impl.parseResourceSpecifier(XMLParser_impl.j
&gt; ava:346)
&gt; 	at
&gt; org.apache.uima.collection.impl.cpm.container.CPEFactory.getSpecifier(CPEFactory
&gt; .java:809)
&gt; 	at
&gt; org.apache.uima.collection.impl.cpm.engine.CPMEngine.isMultipleDeploymentAllowed
&gt; (CPMEngine.java:900)
&gt; 	at
&gt; org.apache.uima.collection.impl.cpm.engine.CPMEngine.isParallizable(CPMEngine.ja
&gt; va:973)
&gt; 	at
&gt; org.apache.uima.collection.impl.cpm.engine.CPMEngine.classifyCasProcessors(CPMEn
&gt; gine.java:1104)
&gt; 	at
&gt; org.apache.uima.collection.impl.cpm.engine.CPMEngine.deployCasProcessors(CPMEngi
&gt; ne.java:1469)
&gt; 	at org.apache.uima.collection.impl.cpm.BaseCPMImpl.run(BaseCPMImpl.java:458)
&gt; 	at java.lang.Thread.run(Thread.java:619)
&gt; Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
&gt; 	at
&gt; com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXPa
&gt; rser.java:1231)
&gt; 	at
&gt; com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXPar
&gt; serImpl.java:522)
&gt; 	at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:176)
&gt; 	... 9 more
&gt;  ** aborted
&gt;
&gt; --
&gt;
&gt; My CPE descriptor looks like the following:
&gt;
&gt; &lt;?xml version="1.0" encoding="UTF-8"?&gt;
&gt; &lt;cpeDescription xmlns="http://uima.apache.org/resourceSpecifier"&gt;
&gt;     &lt;collectionReader&gt;
&gt;         &lt;collectionIterator&gt;
&gt;             &lt;descriptor&gt;
&gt;                 &lt;import location="FileSystemCollectionReader.xml"/&gt;
&gt;             &lt;/descriptor&gt;
&gt;             &lt;configurationParameterSettings&gt;
&gt;                 &lt;nameValuePair&gt;
&gt;                     &lt;name&gt;InputDirectory&lt;/name&gt;
&gt;                     &lt;value&gt;
&gt;                         &lt;string&gt;H:\ttsrc\testingdocssmall&lt;/string&gt;
&gt;                     &lt;/value&gt;
&gt;                 &lt;/nameValuePair&gt;
&gt;             &lt;/configurationParameterSettings&gt;
&gt;         &lt;/collectionIterator&gt;
&gt;     &lt;/collectionReader&gt;
&gt;     &lt;casProcessors casPoolSize="3" processingUnitThreadCount="1"&gt;
&gt;         &lt;casProcessor deployment="local" name="JodAndTika"&gt;
&gt;             &lt;descriptor&gt;
&gt;                 &lt;import location="JodAndTika.xml"/&gt;
&gt;             &lt;/descriptor&gt;
&gt; 		    &lt;runInSeparateProcess&gt;
&gt; 		      &lt;exec dir="." executable="java"&gt;
&gt; 		        &lt;env key="CLASSPATH" 
&gt; 		          value="src;
&gt; 		                 C:\Program Files\apache-uima-2.2.2\lib\uima-
&gt; core.jar;
&gt; 		                 C:\Program Files\apache-uima-2.2.2\lib\uima-
&gt; cpe.jar;
&gt; 		                 C:\Program Files\apache-uima-2.2.2\lib\uima-
&gt; examples.jar;
&gt; 		                 C:\Program Files\apache-uima-2.2.2\lib\uima-
&gt; adapter-vinci.jar;
&gt; 		                 C:\Program Files\apache-uima-2.2.2
&gt; \lib\jVinci.jar"/&gt;
&gt; 		        &lt;arg&gt;-DLOG=C:/Temp/service.log&lt;/arg&gt;
&gt;                
&gt; &lt;arg&gt;org.apache.uima.reference_impl.collection.service.vinci.VinciAnalysisEngine
&gt; rService_impl&lt;/arg&gt;
&gt; 		        &lt;arg&gt;${descriptor}&lt;/arg&gt;
&gt; 		      &lt;/exec&gt;
&gt; 		    &lt;/runInSeparateProcess&gt;
&gt;             &lt;deploymentParameters/&gt;
&gt;             &lt;errorHandling&gt;
&gt;                 &lt;errorRateThreshold action="terminate" value="0/1000"/&gt;
&gt;                 &lt;maxConsecutiveRestarts action="terminate" value="30"/&gt;
&gt;                 &lt;timeout max="100000" default="-1"/&gt;
&gt;             &lt;/errorHandling&gt;
&gt;             &lt;checkpoint batch="10000" time="1000ms"/&gt;
&gt;         &lt;/casProcessor&gt;
&gt;     &lt;/casProcessors&gt;
&gt;     &lt;cpeConfig&gt;
&gt;         &lt;numToProcess&gt;-1&lt;/numToProcess&gt;
&gt;         &lt;deployAs&gt;immediate&lt;/deployAs&gt;
&gt;         &lt;checkpoint batch="0" time="300000ms"/&gt;
&gt;         &lt;timerImpl/&gt;
&gt;     &lt;/cpeConfig&gt;
&gt; &lt;/cpeDescription&gt;
&gt;
&gt; If I change the value of the "deployment" attribute to 'integrated' and then
&gt; remove the "runInSeparateProcess" element, everything works fine.
&gt;
&gt; --
&gt;
&gt; And here is my "JodAndTika" aggregate analysis engine descriptor:
&gt;
&gt; &lt;?xml version="1.0" encoding="UTF-8"?&gt;
&gt; &lt;analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier"&gt;
&gt;   &lt;frameworkImplementation&gt;org.apache.uima.java&lt;/frameworkImplementation&gt;
&gt;   &lt;primitive&gt;false&lt;/primitive&gt;
&gt;   &lt;delegateAnalysisEngineSpecifiers&gt;
&gt;     &lt;delegateAnalysisEngine key="Tika"&gt;
&gt;       &lt;import location="Tika.xml"/&gt;
&gt;     &lt;/delegateAnalysisEngine&gt;
&gt;     &lt;delegateAnalysisEngine key="JodConverter"&gt;
&gt;       &lt;import location="JodConverter.xml"/&gt;
&gt;     &lt;/delegateAnalysisEngine&gt;
&gt;   &lt;/delegateAnalysisEngineSpecifiers&gt;
&gt;   &lt;flowController key="MyFlowController"&gt;
&gt;     &lt;import location="MyFlowController.xml"/&gt;
&gt;   &lt;/flowController&gt;
&gt;   &lt;analysisEngineMetaData&gt;
&gt;     &lt;name&gt;JodAndTika&lt;/name&gt;
&gt;     &lt;description/&gt;
&gt;     &lt;version&gt;1.0&lt;/version&gt;
&gt;     &lt;vendor/&gt;
&gt;     &lt;configurationParameters searchStrategy="none"/&gt;
&gt;     &lt;configurationParameterSettings/&gt;
&gt;     &lt;flowConstraints&gt;
&gt;       &lt;fixedFlow&gt;
&gt;         &lt;node&gt;JodConverter&lt;/node&gt;
&gt;         &lt;node&gt;Tika&lt;/node&gt;
&gt;       &lt;/fixedFlow&gt;
&gt;     &lt;/flowConstraints&gt;
&gt;     &lt;typePriorities/&gt;
&gt;     &lt;fsIndexCollection/&gt;
&gt;     &lt;capabilities&gt;
&gt;       &lt;capability&gt;
&gt;         &lt;inputs/&gt;
&gt;         &lt;outputs&gt;
&gt;           &lt;type
&gt; allAnnotatorFeatures="true"&gt;com.mycompany.documentconversion.Document&lt;/type&gt;
&gt;         &lt;/outputs&gt;
&gt;         &lt;languagesSupported/&gt;
&gt;       &lt;/capability&gt;
&gt;     &lt;/capabilities&gt;
&gt;     &lt;operationalProperties&gt;
&gt;       &lt;modifiesCas&gt;true&lt;/modifiesCas&gt;
&gt;       &lt;multipleDeploymentAllowed&gt;true&lt;/multipleDeploymentAllowed&gt;
&gt;       &lt;outputsNewCASes&gt;false&lt;/outputsNewCASes&gt;
&gt;     &lt;/operationalProperties&gt;
&gt;   &lt;/analysisEngineMetaData&gt;
&gt;   &lt;resourceManagerConfiguration/&gt;
&gt; &lt;/analysisEngineDescription&gt;
&gt;
&gt; --
&gt;
&gt; Let me know if you need more information.
&gt;
&gt; Thanks,
&gt; Hansen
&gt;
&gt;
&gt;
&gt;   


</pre>
</div>
</content>
</entry>
<entry>
<title>Tips for a beginner</title>
<author><name>William Colen &lt;william.colen@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-uima-user/200912.mbox/%3c7444f22f0912030701m766fe30cx36859ac253eb2c06@mail.gmail.com%3e"/>
<id>urn:uuid:%3c7444f22f0912030701m766fe30cx36859ac253eb2c06@mail-gmail-com%3e</id>
<updated>2009-12-03T15:01:46Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hello,

We are moving our Brazilian Portuguese annotators (sentence detector,
tokenizer, tagger, parser) to UIMA. We have different implementations of
some annotators: some were created using OpenNLP, others where written from
scratch.
We would like to have .PEARs for each annotator, so in the applications we
would change the annotators easily. Also we don't want to have duplicated
resources (mostly dictionaries, and the UIMA typesystem descriptor), so we
need a way to share.

The first thing we did was to create the UIMA wrappers and descriptors. They
are ready and we were able to create a UIMA application that uses the
annotators (but we had to put all the code and descriptors in only one
Eclipse project. No .pear yet).

Now we are splitting the projects in smaller ones. For instance, we create
only one TypeSystem.xml and would like every project to use it. So I created
a simple .pear with the TypeSystem.xml.
After that I created another pear for the sentence detector, but I couldn't
import the TypeSystem.xml of the first pear. The only way to do that was
using the relative path or if I put the TypeSystem.xml inside the JAR file
of the first pear, and import it using classpath.
Do you know a better way to do that?

Latter I'll have to do the same with the dictionaries. I'm not sure if the
best approach is to create a .pear only for it. Will it work?

Thanks
William


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: PEAR Packaging Maven Plugin</title>
<author><name>William Colen &lt;william.colen@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-uima-user/200912.mbox/%3c7444f22f0912030534w1f467eadp89538afec186d3fd@mail.gmail.com%3e"/>
<id>urn:uuid:%3c7444f22f0912030534w1f467eadp89538afec186d3fd@mail-gmail-com%3e</id>
<updated>2009-12-03T13:34:11Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Thank you!

To build the PearPackagingMavenPlugin I added a dummy scm configuration to
override any other configuration.

  &lt;scm&gt;
    &lt;connection&gt;scm:svn:http://127.0.0.1/svn/my-project&lt;/connection&gt;
    &lt;developerConnection&gt;scm:svn:https://127.0.0.1/svn/my-project&lt;/developerConnection&gt;
    &lt;tag&gt;HEAD&lt;/tag&gt;
    &lt;url&gt;http://127.0.0.1/websvn/my-project&lt;/url&gt;
  &lt;/scm&gt;


With that I could execute "mvn install" and now I'm able to use the plugin.

On Wed, Dec 2, 2009 at 3:44 AM, Rogan Creswick &lt;creswick@gmail.com&gt; wrote:

&gt; On Tue, Dec 1, 2009 at 9:25 PM, Marshall Schor &lt;msa@schor.com&gt; wrote:
&gt; &gt;&gt; 1. I tried to perform a mvn install in PearPackagingMavenPlugin source
&gt; but
&gt; &gt;&gt; got the following error:
&gt; &gt;&gt;
&gt; &gt;&gt; java.lang.NullPointerException: The scm url cannot be null.
&gt; &gt;&gt;
&gt;
&gt; I've experienced that one.  If I remember correctly, it's actually a
&gt; red herring, and doesn't have anything to do with the scm url.  I'm
&gt; guessing (based on what parts of my local uimaj pom I have commented
&gt; out) that it's part of the Distribution Management configuration, but
&gt; I can't say for sure.
&gt; &gt;&gt;
&gt; &gt;&gt; 2. After that I tried to use the compiled version, but I got another
&gt; error:
&gt; &gt;&gt; [INFO] Internal error in the plugin manager executing goal
&gt; &gt;&gt; 'org.apache.uima:PearPackagingMavenPlugin:2.2.2-incubating:package':
&gt; Unable
&gt; &gt;&gt; to find the mojo
&gt; &gt;&gt; 'org.apache.uima:PearPackagingMavenPlugin:2.2.2-incubating:package' in
&gt; the
&gt; &gt;&gt; plugin 'org.apache.uima:PearPackagingMavenPlugin'
&gt; &gt;&gt; org/apache/uima/pear/tools/PackageCreatorException
&gt; &gt;&gt;
&gt;
&gt; I've had this sort of thing happen because maven gets hungup somehow
&gt; after it's tried and failed to satisfy a dependency.  (I can't say
&gt; it's exactly the same... I'm running from memory.)  Something ends up
&gt; stuck in ~/.m2/repository that prevents subsequent queries from
&gt; working correctly.  Anyhow, try (manually) deleting the
&gt; PearPackagingMavenPlugin directory tree from your ~/.m2 directory and
&gt; try again.
&gt;
&gt; --Rogan
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Exception thrown when deploying CAS Processors in managed mode</title>
<author><name>Hansen Candrawinata &lt;hansen.candrawinata@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-uima-user/200912.mbox/%3cloom.20091203T070748-358@post.gmane.org%3e"/>
<id>urn:uuid:%3cloom-20091203T070748-358@post-gmane-org%3e</id>
<updated>2009-12-03T06:07:58Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
My CAS processors works fine when deployed in integrated mode, but not when 
deployed in managed mode.   

The following exception was thrown instead (notice the path in the exception
message is referring to a directory instead of a file - no idea where the path
came from and how to it was formulated to become like that):

org.apache.uima.util.InvalidXMLException: Invalid descriptor at 
file:/H:/ttsrc/javasoe/documentconversion.
	at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:193)
	at
org.apache.uima.util.impl.XMLParser_impl.parseResourceSpecifier(XMLParser_impl.j
ava:365)
	at
org.apache.uima.util.impl.XMLParser_impl.parseResourceSpecifier(XMLParser_impl.j
ava:346)
	at
org.apache.uima.collection.impl.cpm.container.CPEFactory.getSpecifier(CPEFactory
.java:809)
	at
org.apache.uima.collection.impl.cpm.engine.CPMEngine.isMultipleDeploymentAllowed
(CPMEngine.java:900)
	at
org.apache.uima.collection.impl.cpm.engine.CPMEngine.isParallizable(CPMEngine.ja
va:973)
	at
org.apache.uima.collection.impl.cpm.engine.CPMEngine.classifyCasProcessors(CPMEn
gine.java:1104)
	at
org.apache.uima.collection.impl.cpm.engine.CPMEngine.deployCasProcessors(CPMEngi
ne.java:1469)
	at org.apache.uima.collection.impl.cpm.BaseCPMImpl.run(BaseCPMImpl.java:458)
	at java.lang.Thread.run(Thread.java:619)
Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
	at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXPa
rser.java:1231)
	at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXPar
serImpl.java:522)
	at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:176)
	... 9 more
 ** aborted

--

My CPE descriptor looks like the following:

&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;cpeDescription xmlns="http://uima.apache.org/resourceSpecifier"&gt;
    &lt;collectionReader&gt;
        &lt;collectionIterator&gt;
            &lt;descriptor&gt;
                &lt;import location="FileSystemCollectionReader.xml"/&gt;
            &lt;/descriptor&gt;
            &lt;configurationParameterSettings&gt;
                &lt;nameValuePair&gt;
                    &lt;name&gt;InputDirectory&lt;/name&gt;
                    &lt;value&gt;
                        &lt;string&gt;H:\ttsrc\testingdocssmall&lt;/string&gt;
                    &lt;/value&gt;
                &lt;/nameValuePair&gt;
            &lt;/configurationParameterSettings&gt;
        &lt;/collectionIterator&gt;
    &lt;/collectionReader&gt;
    &lt;casProcessors casPoolSize="3" processingUnitThreadCount="1"&gt;
        &lt;casProcessor deployment="local" name="JodAndTika"&gt;
            &lt;descriptor&gt;
                &lt;import location="JodAndTika.xml"/&gt;
            &lt;/descriptor&gt;
		    &lt;runInSeparateProcess&gt;
		      &lt;exec dir="." executable="java"&gt;
		        &lt;env key="CLASSPATH" 
		          value="src;
		                 C:\Program Files\apache-uima-2.2.2\lib\uima-
core.jar;
		                 C:\Program Files\apache-uima-2.2.2\lib\uima-
cpe.jar;
		                 C:\Program Files\apache-uima-2.2.2\lib\uima-
examples.jar;
		                 C:\Program Files\apache-uima-2.2.2\lib\uima-
adapter-vinci.jar;
		                 C:\Program Files\apache-uima-2.2.2
\lib\jVinci.jar"/&gt;
		        &lt;arg&gt;-DLOG=C:/Temp/service.log&lt;/arg&gt;
               
&lt;arg&gt;org.apache.uima.reference_impl.collection.service.vinci.VinciAnalysisEngine
rService_impl&lt;/arg&gt;
		        &lt;arg&gt;${descriptor}&lt;/arg&gt;
		      &lt;/exec&gt;
		    &lt;/runInSeparateProcess&gt;
            &lt;deploymentParameters/&gt;
            &lt;errorHandling&gt;
                &lt;errorRateThreshold action="terminate" value="0/1000"/&gt;
                &lt;maxConsecutiveRestarts action="terminate" value="30"/&gt;
                &lt;timeout max="100000" default="-1"/&gt;
            &lt;/errorHandling&gt;
            &lt;checkpoint batch="10000" time="1000ms"/&gt;
        &lt;/casProcessor&gt;
    &lt;/casProcessors&gt;
    &lt;cpeConfig&gt;
        &lt;numToProcess&gt;-1&lt;/numToProcess&gt;
        &lt;deployAs&gt;immediate&lt;/deployAs&gt;
        &lt;checkpoint batch="0" time="300000ms"/&gt;
        &lt;timerImpl/&gt;
    &lt;/cpeConfig&gt;
&lt;/cpeDescription&gt;

If I change the value of the "deployment" attribute to 'integrated' and then
remove the "runInSeparateProcess" element, everything works fine.

--

And here is my "JodAndTika" aggregate analysis engine descriptor:

&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier"&gt;
  &lt;frameworkImplementation&gt;org.apache.uima.java&lt;/frameworkImplementation&gt;
  &lt;primitive&gt;false&lt;/primitive&gt;
  &lt;delegateAnalysisEngineSpecifiers&gt;
    &lt;delegateAnalysisEngine key="Tika"&gt;
      &lt;import location="Tika.xml"/&gt;
    &lt;/delegateAnalysisEngine&gt;
    &lt;delegateAnalysisEngine key="JodConverter"&gt;
      &lt;import location="JodConverter.xml"/&gt;
    &lt;/delegateAnalysisEngine&gt;
  &lt;/delegateAnalysisEngineSpecifiers&gt;
  &lt;flowController key="MyFlowController"&gt;
    &lt;import location="MyFlowController.xml"/&gt;
  &lt;/flowController&gt;
  &lt;analysisEngineMetaData&gt;
    &lt;name&gt;JodAndTika&lt;/name&gt;
    &lt;description/&gt;
    &lt;version&gt;1.0&lt;/version&gt;
    &lt;vendor/&gt;
    &lt;configurationParameters searchStrategy="none"/&gt;
    &lt;configurationParameterSettings/&gt;
    &lt;flowConstraints&gt;
      &lt;fixedFlow&gt;
        &lt;node&gt;JodConverter&lt;/node&gt;
        &lt;node&gt;Tika&lt;/node&gt;
      &lt;/fixedFlow&gt;
    &lt;/flowConstraints&gt;
    &lt;typePriorities/&gt;
    &lt;fsIndexCollection/&gt;
    &lt;capabilities&gt;
      &lt;capability&gt;
        &lt;inputs/&gt;
        &lt;outputs&gt;
          &lt;type
allAnnotatorFeatures="true"&gt;com.mycompany.documentconversion.Document&lt;/type&gt;
        &lt;/outputs&gt;
        &lt;languagesSupported/&gt;
      &lt;/capability&gt;
    &lt;/capabilities&gt;
    &lt;operationalProperties&gt;
      &lt;modifiesCas&gt;true&lt;/modifiesCas&gt;
      &lt;multipleDeploymentAllowed&gt;true&lt;/multipleDeploymentAllowed&gt;
      &lt;outputsNewCASes&gt;false&lt;/outputsNewCASes&gt;
    &lt;/operationalProperties&gt;
  &lt;/analysisEngineMetaData&gt;
  &lt;resourceManagerConfiguration/&gt;
&lt;/analysisEngineDescription&gt;

--

Let me know if you need more information.

Thanks,
Hansen



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: PEAR Packaging Maven Plugin</title>
<author><name>Rogan Creswick &lt;creswick@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-uima-user/200912.mbox/%3cc834ec80912012144x4887f4ebu38dfefa5058fd118@mail.gmail.com%3e"/>
<id>urn:uuid:%3cc834ec80912012144x4887f4ebu38dfefa5058fd118@mail-gmail-com%3e</id>
<updated>2009-12-02T05:44:47Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On Tue, Dec 1, 2009 at 9:25 PM, Marshall Schor &lt;msa@schor.com&gt; wrote:
&gt;&gt; 1. I tried to perform a mvn install in PearPackagingMavenPlugin source but
&gt;&gt; got the following error:
&gt;&gt;
&gt;&gt; java.lang.NullPointerException: The scm url cannot be null.
&gt;&gt;

I've experienced that one.  If I remember correctly, it's actually a
red herring, and doesn't have anything to do with the scm url.  I'm
guessing (based on what parts of my local uimaj pom I have commented
out) that it's part of the Distribution Management configuration, but
I can't say for sure.
&gt;&gt;
&gt;&gt; 2. After that I tried to use the compiled version, but I got another error:
&gt;&gt; [INFO] Internal error in the plugin manager executing goal
&gt;&gt; 'org.apache.uima:PearPackagingMavenPlugin:2.2.2-incubating:package': Unable
&gt;&gt; to find the mojo
&gt;&gt; 'org.apache.uima:PearPackagingMavenPlugin:2.2.2-incubating:package' in the
&gt;&gt; plugin 'org.apache.uima:PearPackagingMavenPlugin'
&gt;&gt; org/apache/uima/pear/tools/PackageCreatorException
&gt;&gt;

I've had this sort of thing happen because maven gets hungup somehow
after it's tried and failed to satisfy a dependency.  (I can't say
it's exactly the same... I'm running from memory.)  Something ends up
stuck in ~/.m2/repository that prevents subsequent queries from
working correctly.  Anyhow, try (manually) deleting the
PearPackagingMavenPlugin directory tree from your ~/.m2 directory and
try again.

--Rogan


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: PEAR Packaging Maven Plugin</title>
<author><name>Marshall Schor &lt;msa@schor.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-uima-user/200912.mbox/%3c4B15FA64.6040703@schor.com%3e"/>
<id>urn:uuid:%3c4B15FA64-6040703@schor-com%3e</id>
<updated>2009-12-02T05:25:56Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi William,

William Colen wrote:
&gt; Hi, Marshall,
&gt;
&gt; Thanks for pointing where to find the documentation. Now I could move a
&gt; little bit more.
&gt; Now I have other issues.
&gt;
&gt; 1. I tried to perform a mvn install in PearPackagingMavenPlugin source but
&gt; got the following error:
&gt;
&gt; java.lang.NullPointerException: The scm url cannot be null.
&gt;   

I've never seen that message.  I don't know what causes it...  A quick
web-search found this message with maven - 1 - but I presume you're
using the latest Maven or something close to that, right?

What source did you use (e.g., 2.2.2 source distribution, the current
SVN / trunk or tag?)?

&gt;     at
&gt; org.apache.maven.scm.manager.AbstractScmManager.makeScmRepository(AbstractScmManager.java:181)
&gt;     at
&gt; org.codehaus.mojo.build.CreateMojo.getScmRepository(CreateMojo.java:722)
&gt;     at org.codehaus.mojo.build.CreateMojo.getScmBranch(CreateMojo.java:593)
&gt;     at org.codehaus.mojo.build.CreateMojo.execute(CreateMojo.java:452)
&gt;     at
&gt; org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
&gt;     at
&gt; org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
&gt;     at
&gt; org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
&gt;     at
&gt; org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
&gt;     at
&gt; org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
&gt;     at
&gt; org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
&gt;     at
&gt; org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
&gt;     at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
&gt;     at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
&gt;     at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
&gt;     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
&gt;     at
&gt; sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
&gt;     at
&gt; sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
&gt;     at java.lang.reflect.Method.invoke(Method.java:585)
&gt;     at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
&gt;     at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
&gt;     at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
&gt;     at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
&gt;
&gt; 2. After that I tried to use the compiled version, but I got another error:
&gt; [INFO] Internal error in the plugin manager executing goal
&gt; 'org.apache.uima:PearPackagingMavenPlugin:2.2.2-incubating:package': Unable
&gt; to find the mojo
&gt; 'org.apache.uima:PearPackagingMavenPlugin:2.2.2-incubating:package' in the
&gt; plugin 'org.apache.uima:PearPackagingMavenPlugin'
&gt; org/apache/uima/pear/tools/PackageCreatorException
&gt;   

I've never seen this error, either...  Which compiled version did you
install?  Did you install it to your local maven repository?
Do you have your maven set up to search the apache incubator repository
(located at http://people.apache.org/repo/m2-incubating-repository) for
needed uima dependencies?
Sorry not to be more helpful...  -Marshall
&gt; Do you know what I'm missing?
&gt;
&gt; Thank you,
&gt; William
&gt;
&gt;
&gt; On Mon, Nov 30, 2009 at 8:08 PM, Marshall Schor &lt;msa@schor.com&gt; wrote:
&gt;
&gt;   
&gt;&gt; William Colen wrote:
&gt;&gt;     
&gt;&gt;&gt; Is the PEAR Packaging Maven Plugin working?
&gt;&gt;&gt;       
&gt;&gt; I think so.  We're using the 2.3.0 (not yet released version) to build
&gt;&gt; things for the 2.3.0 upcoming release.
&gt;&gt;     
&gt;&gt;&gt;  Couldn't access the
&gt;&gt;&gt; documentation at
&gt;&gt;&gt; http://incubator.apache.org/uima/sandbox.html#pear.maven.task
&gt;&gt;&gt;       
&gt;&gt; The link is broken, as you have observed (not sure it ever was
&gt;&gt; working...).  It looks like the documentation build for this is not
&gt;&gt; saved in SVN, but it is available as part of the binary download for it
&gt;&gt; (it is included in the 2.2.2 Sandbox distribution release, available
&gt;&gt; from here:
&gt;&gt;
&gt;&gt; http://incubator.apache.org/uima/downloads.cgi#Latest%20Official%20Releases
&gt;&gt;
&gt;&gt;   Go to the part of the page labeled: UIMA Annotator Addons &amp; Simple
&gt;&gt; Server &amp; Pear packaging tools to get it.
&gt;&gt;
&gt;&gt;     
&gt;&gt;&gt; , also couldn't
&gt;&gt;&gt; make it work using the usage example at
&gt;&gt;&gt; http://incubator.apache.org/uima/doc-uima-pears.html
&gt;&gt;&gt;
&gt;&gt;&gt;       
&gt;&gt; Can you say what is going wrong?
&gt;&gt;
&gt;&gt;
&gt;&gt;     
&gt;&gt;&gt; Thanks,
&gt;&gt;&gt; William
&gt;&gt;&gt;
&gt;&gt;&gt;
&gt;&gt;&gt;       
&gt;
&gt;   


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: PEAR Packaging Maven Plugin</title>
<author><name>William Colen &lt;william.colen@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-uima-user/200912.mbox/%3c7444f22f0912011342k5a9bfb6bm509ac4a80cd6f370@mail.gmail.com%3e"/>
<id>urn:uuid:%3c7444f22f0912011342k5a9bfb6bm509ac4a80cd6f370@mail-gmail-com%3e</id>
<updated>2009-12-01T21:42:39Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi, Marshall,

Thanks for pointing where to find the documentation. Now I could move a
little bit more.
Now I have other issues.

1. I tried to perform a mvn install in PearPackagingMavenPlugin source but
got the following error:

java.lang.NullPointerException: The scm url cannot be null.
    at
org.apache.maven.scm.manager.AbstractScmManager.makeScmRepository(AbstractScmManager.java:181)
    at
org.codehaus.mojo.build.CreateMojo.getScmRepository(CreateMojo.java:722)
    at org.codehaus.mojo.build.CreateMojo.getScmBranch(CreateMojo.java:593)
    at org.codehaus.mojo.build.CreateMojo.execute(CreateMojo.java:452)
    at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
    at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
    at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
    at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
    at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
    at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
    at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
    at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
    at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

2. After that I tried to use the compiled version, but I got another error:
[INFO] Internal error in the plugin manager executing goal
'org.apache.uima:PearPackagingMavenPlugin:2.2.2-incubating:package': Unable
to find the mojo
'org.apache.uima:PearPackagingMavenPlugin:2.2.2-incubating:package' in the
plugin 'org.apache.uima:PearPackagingMavenPlugin'
org/apache/uima/pear/tools/PackageCreatorException

Do you know what I'm missing?

Thank you,
William


On Mon, Nov 30, 2009 at 8:08 PM, Marshall Schor &lt;msa@schor.com&gt; wrote:

&gt;
&gt;
&gt; William Colen wrote:
&gt; &gt; Is the PEAR Packaging Maven Plugin working?
&gt;
&gt; I think so.  We're using the 2.3.0 (not yet released version) to build
&gt; things for the 2.3.0 upcoming release.
&gt; &gt;  Couldn't access the
&gt; &gt; documentation at
&gt; &gt; http://incubator.apache.org/uima/sandbox.html#pear.maven.task
&gt;
&gt; The link is broken, as you have observed (not sure it ever was
&gt; working...).  It looks like the documentation build for this is not
&gt; saved in SVN, but it is available as part of the binary download for it
&gt; (it is included in the 2.2.2 Sandbox distribution release, available
&gt; from here:
&gt;
&gt; http://incubator.apache.org/uima/downloads.cgi#Latest%20Official%20Releases
&gt;
&gt;   Go to the part of the page labeled: UIMA Annotator Addons &amp; Simple
&gt; Server &amp; Pear packaging tools to get it.
&gt;
&gt; &gt; , also couldn't
&gt; &gt; make it work using the usage example at
&gt; &gt; http://incubator.apache.org/uima/doc-uima-pears.html
&gt; &gt;
&gt;
&gt; Can you say what is going wrong?
&gt;
&gt;
&gt; &gt; Thanks,
&gt; &gt; William
&gt; &gt;
&gt; &gt;
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>NYC Search &amp; Discovery Meetup</title>
<author><name>Otis Gospodnetic &lt;otis_gospodnetic@yahoo.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-uima-user/200912.mbox/%3c858380.66889.qm@web50306.mail.re2.yahoo.com%3e"/>
<id>urn:uuid:%3c858380-66889-qm@web50306-mail-re2-yahoo-com%3e</id>
<updated>2009-12-01T20:39:08Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hello,

For those living in or near NYC, you may be interested in joining (and/or presenting?) at
the NYC Search &amp; Discovery Meetup.
Topics are: search, machine learning, data mining, NLP, information gathering, information
extraction, etc.

  http://www.meetup.com/NYC-Search-and-Discovery/

Our previous/first meetup was about solr-python and parse.ly (a service that makes use of
Solr and solr-python).

Tomorrow (December 2 2009) we have:

  Incorporating Probabilistic Retrieval Knowledge into TFIDF-based Search Engine

You can RSVP at:
  http://www.meetup.com/NYC-Search-and-Discovery/calendar/11745435/

Otis
--
Sematext -- http://sematext.com/ -- Solr - Lucene - Nutch



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Get annotation class from Type</title>
<author><name>Thilo Goetz &lt;twgoetz@gmx.de&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-uima-user/200912.mbox/%3c4B153B7B.6010701@gmx.de%3e"/>
<id>urn:uuid:%3c4B153B7B-6010701@gmx-de%3e</id>
<updated>2009-12-01T15:51:23Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On 12/1/2009 16:37, Fabien POULARD wrote:
&gt; Hi,
&gt;
&gt; On Tue, Dec 1, 2009 at 12:12 PM, Thilo Goetz&lt;twgoetz@gmx.de&gt;  wrote:
&gt;&gt; I'll debate this just for the sake of other people who
&gt;&gt; may be following this thread.  It seems much simpler
&gt;&gt; and less error prone to use the built-in UIMA CAS APIs
&gt;&gt; for this, as described here:
&gt;&gt; http://incubator.apache.org/uima/downloads/releaseDocs/2.2.2-incubating/docs/html/references/references.html#ugr.ref.cas
&gt;&gt; And it'll be faster, too, without the JCas/Java reflection
&gt;&gt; detour.
&gt;
&gt; May you point to something more specific ? I've looked over the
&gt; documentation and the API but I still did not find anything relevant
&gt; for my problem (other than Java reflection).
&gt;
&gt; --
&gt; Fabien Poulard

Sorry, but I still don't understand what your problem is.
This tells you how to read/write feature values in a
generic way.  If that's not what you need, this solution
is not for you.  If you must know the JCas type to use it
in Java Generics in some way, this does not help.

I was responding directly to Tommaso, since his example
did not seem very compelling to me.

--Thilo


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Get annotation class from Type</title>
<author><name>Fabien POULARD &lt;grdscarabe@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-uima-user/200912.mbox/%3c72afa8bb0912010737o7cdd5ebes508ed3e378dc4559@mail.gmail.com%3e"/>
<id>urn:uuid:%3c72afa8bb0912010737o7cdd5ebes508ed3e378dc4559@mail-gmail-com%3e</id>
<updated>2009-12-01T15:37:00Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi,

On Tue, Dec 1, 2009 at 12:12 PM, Thilo Goetz &lt;twgoetz@gmx.de&gt; wrote:
&gt; I'll debate this just for the sake of other people who
&gt; may be following this thread.  It seems much simpler
&gt; and less error prone to use the built-in UIMA CAS APIs
&gt; for this, as described here:
&gt; http://incubator.apache.org/uima/downloads/releaseDocs/2.2.2-incubating/docs/html/references/references.html#ugr.ref.cas
&gt; And it'll be faster, too, without the JCas/Java reflection
&gt; detour.

May you point to something more specific ? I've looked over the
documentation and the API but I still did not find anything relevant
for my problem (other than Java reflection).

--
Fabien Poulard


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Get annotation class from Type</title>
<author><name>Thilo Goetz &lt;twgoetz@gmx.de&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-uima-user/200912.mbox/%3c4B14FA2A.7020309@gmx.de%3e"/>
<id>urn:uuid:%3c4B14FA2A-7020309@gmx-de%3e</id>
<updated>2009-12-01T11:12:42Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>


On 12/1/2009 09:46, Tommaso Teofili wrote:
&gt; 2009/11/29 Steven Bethard&lt;steven.bethard@gmail.com&gt;
&gt;
&gt;&gt; On Sat, Nov 28, 2009 at 1:12 AM, Fabien POULARD&lt;grdscarabe@gmail.com&gt;
&gt;&gt; wrote:
&gt;&gt;&gt; On Fri, Nov 27, 2009 at 4:56 PM, Thilo Goetz&lt;twgoetz@gmx.de&gt;  wrote:
&gt;&gt;&gt;&gt; I guess this will work, as long as there even is a JCas type
&gt;&gt;&gt;&gt; for the type you're looking for.  There may not always be one,
&gt;&gt;&gt;&gt; and we have this whole meta-programming kind of API for this
&gt;&gt;&gt;&gt; kind of situation.  If you tell us what you need the class for,
&gt;&gt;&gt;&gt; we may be able to suggest alternative ways of handling this.
&gt;&gt;&gt;
&gt;&gt;&gt; My need is quite simple, a component I develop work on some types
&gt;&gt;&gt; passed to the component in parameter. I retrieve the type from its
&gt;&gt;&gt; name passed in parameter with a simple :
&gt;&gt;&gt;
&gt;&gt;&gt; Type mMonType  = cas.getTypeSystem().getType(theParameterTypeStr);
&gt;&gt;&gt;
&gt;&gt;&gt; ... and I check it is not null before using it.
&gt;&gt;&gt;
&gt;&gt;&gt; Now I use some generic classes (java generics) for my processing and I
&gt;&gt;&gt; need to "configure" them with the class of the annotation
&gt;&gt;&gt; corresponding to this type. That's where I'm lost...
&gt;&gt;
&gt;&gt; If you know you're loading a Java class for a type, why not have your
&gt;&gt; "theParameterTypeStr" be the fully qualified Java class name instead
&gt;&gt; of the UIMA type? Then you can use the usual Java Class.forName()
&gt;&gt; directly.
&gt;&gt;
&gt;
&gt; Using reflection is a simple quick way I also use sometimes for this
&gt; purpose.

I'll debate this just for the sake of other people who
may be following this thread.  It seems much simpler
and less error prone to use the built-in UIMA CAS APIs
for this, as described here:
http://incubator.apache.org/uima/downloads/releaseDocs/2.2.2-incubating/docs/html/references/references.html#ugr.ref.cas
And it'll be faster, too, without the JCas/Java reflection
detour.

&gt; Just beware, if you want to instantiate your Annotations automatically, that
&gt; JCasGen generated types usually have more than one constructor so you should
&gt; choose the one you deserve (i.e.: the constructor with the JCas parameter,
&gt; that is usually the first one).
&gt;
&gt; ex.:
&gt; Type mMonType  = cas.getTypeSystem().getType(
&gt; theParameterTypeStr);
&gt;
&gt; Class typeClass = Class.forName(mMonType.getName());
&gt; Constructor jcasConstructor = getProperConstructor(typeClass);
&gt; FeatureStructure fs = (FeatureStructure) jcasConstructor.newInstance(aJCas);
&gt; ...
&gt;
&gt; private Constructor getProperConstructor(Class typeClass) {
&gt; ....
&gt; //FIXME : dummy sample
&gt; return typeClass.getConstructors()[1];
&gt; ..
&gt; }
&gt;
&gt; Tommaso
&gt;
&gt;
&gt;&gt;
&gt;&gt; Steve
&gt;&gt; --
&gt;&gt; Where did you get that preposterous hypothesis?
&gt;&gt; Did Steve tell you that?
&gt;&gt;         --- The Hiphopopotamus
&gt;&gt;
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Get annotation class from Type</title>
<author><name>Tommaso Teofili &lt;tommaso.teofili@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-uima-user/200912.mbox/%3cb917db630912010046k62ac621fh23f7331fd98bd97d@mail.gmail.com%3e"/>
<id>urn:uuid:%3cb917db630912010046k62ac621fh23f7331fd98bd97d@mail-gmail-com%3e</id>
<updated>2009-12-01T08:46:12Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
2009/11/29 Steven Bethard &lt;steven.bethard@gmail.com&gt;

&gt; On Sat, Nov 28, 2009 at 1:12 AM, Fabien POULARD &lt;grdscarabe@gmail.com&gt;
&gt; wrote:
&gt; &gt; On Fri, Nov 27, 2009 at 4:56 PM, Thilo Goetz &lt;twgoetz@gmx.de&gt; wrote:
&gt; &gt;&gt; I guess this will work, as long as there even is a JCas type
&gt; &gt;&gt; for the type you're looking for.  There may not always be one,
&gt; &gt;&gt; and we have this whole meta-programming kind of API for this
&gt; &gt;&gt; kind of situation.  If you tell us what you need the class for,
&gt; &gt;&gt; we may be able to suggest alternative ways of handling this.
&gt; &gt;
&gt; &gt; My need is quite simple, a component I develop work on some types
&gt; &gt; passed to the component in parameter. I retrieve the type from its
&gt; &gt; name passed in parameter with a simple :
&gt; &gt;
&gt; &gt; Type mMonType  = cas.getTypeSystem().getType(theParameterTypeStr);
&gt; &gt;
&gt; &gt; ... and I check it is not null before using it.
&gt; &gt;
&gt; &gt; Now I use some generic classes (java generics) for my processing and I
&gt; &gt; need to "configure" them with the class of the annotation
&gt; &gt; corresponding to this type. That's where I'm lost...
&gt;
&gt; If you know you're loading a Java class for a type, why not have your
&gt; "theParameterTypeStr" be the fully qualified Java class name instead
&gt; of the UIMA type? Then you can use the usual Java Class.forName()
&gt; directly.
&gt;

Using reflection is a simple quick way I also use sometimes for this
purpose.
Just beware, if you want to instantiate your Annotations automatically, that
JCasGen generated types usually have more than one constructor so you should
choose the one you deserve (i.e.: the constructor with the JCas parameter,
that is usually the first one).

ex.:
Type mMonType  = cas.getTypeSystem().getType(
theParameterTypeStr);

Class typeClass = Class.forName(mMonType.getName());
Constructor jcasConstructor = getProperConstructor(typeClass);
FeatureStructure fs = (FeatureStructure) jcasConstructor.newInstance(aJCas);
...

private Constructor getProperConstructor(Class typeClass) {
....
//FIXME : dummy sample
return typeClass.getConstructors()[1];
..
}

Tommaso


&gt;
&gt; Steve
&gt; --
&gt; Where did you get that preposterous hypothesis?
&gt; Did Steve tell you that?
&gt;        --- The Hiphopopotamus
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: PEAR Packaging Maven Plugin</title>
<author><name>Marshall Schor &lt;msa@schor.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-uima-user/200911.mbox/%3c4B144249.3000101@schor.com%3e"/>
<id>urn:uuid:%3c4B144249-3000101@schor-com%3e</id>
<updated>2009-11-30T22:08:09Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>


William Colen wrote:
&gt; Is the PEAR Packaging Maven Plugin working?

I think so.  We're using the 2.3.0 (not yet released version) to build
things for the 2.3.0 upcoming release.
&gt;  Couldn't access the
&gt; documentation at
&gt; http://incubator.apache.org/uima/sandbox.html#pear.maven.task

The link is broken, as you have observed (not sure it ever was
working...).  It looks like the documentation build for this is not
saved in SVN, but it is available as part of the binary download for it
(it is included in the 2.2.2 Sandbox distribution release, available
from here:
  
http://incubator.apache.org/uima/downloads.cgi#Latest%20Official%20Releases

   Go to the part of the page labeled: UIMA Annotator Addons &amp; Simple
Server &amp; Pear packaging tools to get it.

&gt; , also couldn't
&gt; make it work using the usage example at
&gt; http://incubator.apache.org/uima/doc-uima-pears.html
&gt;   

Can you say what is going wrong?


&gt; Thanks,
&gt; William
&gt;
&gt;   


</pre>
</div>
</content>
</entry>
<entry>
<title>PEAR Packaging Maven Plugin</title>
<author><name>William Colen &lt;william.colen@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-uima-user/200911.mbox/%3c7444f22f0911301044q27523fd6pd3d998954d22f1c8@mail.gmail.com%3e"/>
<id>urn:uuid:%3c7444f22f0911301044q27523fd6pd3d998954d22f1c8@mail-gmail-com%3e</id>
<updated>2009-11-30T18:44:16Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Is the PEAR Packaging Maven Plugin working? Couldn't access the
documentation at
http://incubator.apache.org/uima/sandbox.html#pear.maven.task, also couldn't
make it work using the usage example at
http://incubator.apache.org/uima/doc-uima-pears.html

Thanks,
William


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: RC on maven?</title>
<author><name>Thilo Goetz &lt;twgoetz@gmx.de&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-uima-user/200911.mbox/%3c4B13C920.2000007@gmx.de%3e"/>
<id>urn:uuid:%3c4B13C920-2000007@gmx-de%3e</id>
<updated>2009-11-30T13:31:12Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On 11/30/2009 14:26, Roberto Franchini wrote:
&gt; I disabled the "eclipse-plugin-superPom" module in the
&gt; uimaj pom because a dependency isn't resolved.

I think I've had that, too, last week, but I think it's just
a time-out from some repository somewhere.  The second time I
tried, it went through ok.

--Thilo


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: RC on maven?</title>
<author><name>Roberto Franchini &lt;ro.franchini@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-uima-user/200911.mbox/%3c63e2e4460911300526h7ca1b74av33086350a37369ab@mail.gmail.com%3e"/>
<id>urn:uuid:%3c63e2e4460911300526h7ca1b74av33086350a37369ab@mail-gmail-com%3e</id>
<updated>2009-11-30T13:26:33Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On Mon, Nov 30, 2009 at 1:37 PM, Thilo Goetz &lt;twgoetz@gmx.de&gt; wrote:
&gt; On 11/30/2009 12:26, Roberto Franchini wrote:
&gt;&gt;
&gt;&gt; Hi to all,
&gt;&gt; is it possilble to have uima 2.3-RC mavenized on your repo
&gt;&gt; (http://people.apache.org/repo/m2-incubating-repository/)?
&gt;&gt; Or maybe in the shapshots repo?
&gt;&gt; Or shoud I build it form the sources?
&gt;&gt; Regards,
&gt;&gt; R.F.
&gt;
&gt; We can't make snapshots available as we need to go through
&gt; the incubator release process for everything we release,
&gt; even snapshots.  Please build from source for now.  There
&gt; are instructions on the website on how to do that.  Thanks.

Just done. I disabled the "eclipse-plugin-superPom" module in the
uimaj pom because a dependency isn't resolved.
But at the moment i need only the core.
FRANK

-- 
Roberto Franchini
http://www.celi.it
http://www.blogmeter.it
http://www.memesphere.it
Tel +39.011.562.71.15
jabber:ro.franchini@gmail.com skype:ro.franchini


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: RC on maven?</title>
<author><name>Thilo Goetz &lt;twgoetz@gmx.de&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-uima-user/200911.mbox/%3c4B13BCA7.1060409@gmx.de%3e"/>
<id>urn:uuid:%3c4B13BCA7-1060409@gmx-de%3e</id>
<updated>2009-11-30T12:37:59Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On 11/30/2009 12:26, Roberto Franchini wrote:
&gt; Hi to all,
&gt; is it possilble to have uima 2.3-RC mavenized on your repo
&gt; (http://people.apache.org/repo/m2-incubating-repository/)?
&gt; Or maybe in the shapshots repo?
&gt; Or shoud I build it form the sources?
&gt; Regards,
&gt; R.F.

We can't make snapshots available as we need to go through
the incubator release process for everything we release,
even snapshots.  Please build from source for now.  There
are instructions on the website on how to do that.  Thanks.

--Thilo


</pre>
</div>
</content>
</entry>
<entry>
<title>RC on maven?</title>
<author><name>Roberto Franchini &lt;franchini@celi.it&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-uima-user/200911.mbox/%3c63e2e4460911300326t79501b48i16c8188be6747dbb@mail.gmail.com%3e"/>
<id>urn:uuid:%3c63e2e4460911300326t79501b48i16c8188be6747dbb@mail-gmail-com%3e</id>
<updated>2009-11-30T11:26:08Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi to all,
is it possilble to have uima 2.3-RC mavenized on your repo
(http://people.apache.org/repo/m2-incubating-repository/)?
Or maybe in the shapshots repo?
Or shoud I build it form the sources?
Regards,
R.F.
-- 
Roberto Franchini
http://www.celi.it
http://www.blogmeter.it
http://www.memesphere.it
Tel +39.011.562.71.15
jabber:ro.franchini@gmail.com skype:ro.franchini


</pre>
</div>
</content>
</entry>
<entry>
<title>MetaMap UIMA Wrapper Version 0.3 Release</title>
<author><name>Kai Schlamp &lt;schlamp@gmx.de&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-uima-user/200911.mbox/%3cloom.20091130T002245-347@post.gmane.org%3e"/>
<id>urn:uuid:%3cloom-20091130T002245-347@post-gmane-org%3e</id>
<updated>2009-11-29T23:24:57Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hello.

I just released the 0.3 version of the MetaMap UIMA wrapper
(https://sourceforge.net/projects/metamap-uima/). There were some nasty bugs in
0.2.1 that are corrected now.
Also online batch mode processing is now supported, when you don't have MetaMap
locally installed (you need an UMLS account for that ... see
http://skr.nlm.nih.gov/).
Everything is configurable as descriptor parameters.

Full feature list and requirements at
https://sourceforge.net/apps/mediawiki/metamap-uima/index.php?title=Main_Page

Regards,
Kai Schlamp



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Get annotation class from Type</title>
<author><name>Steven Bethard &lt;steven.bethard@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-uima-user/200911.mbox/%3cd11dcfba0911281733i532eaab8x14270cd845802286@mail.gmail.com%3e"/>
<id>urn:uuid:%3cd11dcfba0911281733i532eaab8x14270cd845802286@mail-gmail-com%3e</id>
<updated>2009-11-29T01:33:29Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On Sat, Nov 28, 2009 at 1:12 AM, Fabien POULARD &lt;grdscarabe@gmail.com&gt; wrote:
&gt; On Fri, Nov 27, 2009 at 4:56 PM, Thilo Goetz &lt;twgoetz@gmx.de&gt; wrote:
&gt;&gt; I guess this will work, as long as there even is a JCas type
&gt;&gt; for the type you're looking for. Â There may not always be one,
&gt;&gt; and we have this whole meta-programming kind of API for this
&gt;&gt; kind of situation. Â If you tell us what you need the class for,
&gt;&gt; we may be able to suggest alternative ways of handling this.
&gt;
&gt; My need is quite simple, a component I develop work on some types
&gt; passed to the component in parameter. I retrieve the type from its
&gt; name passed in parameter with a simple :
&gt;
&gt; Type mMonType Â = cas.getTypeSystem().getType(theParameterTypeStr);
&gt;
&gt; ... and I check it is not null before using it.
&gt;
&gt; Now I use some generic classes (java generics) for my processing and I
&gt; need to "configure" them with the class of the annotation
&gt; corresponding to this type. That's where I'm lost...

If you know you're loading a Java class for a type, why not have your
"theParameterTypeStr" be the fully qualified Java class name instead
of the UIMA type? Then you can use the usual Java Class.forName()
directly.

Steve
-- 
Where did you get that preposterous hypothesis?
Did Steve tell you that?
        --- The Hiphopopotamus


</pre>
</div>
</content>
</entry>
</feed>
