Hi Richard, Thanks for taking a look at my issue, I know I'm in good hands. The project is set up as in the UIMA tutorial, i.e. a Java project with an added UIMA Nature. I am using the jars for uimaFIT 2.1.0.
Regards, Matt On Thu, Dec 10, 2015 at 6:24 PM, Richard Eckart de Castilho <[email protected]> wrote: > Hi Matt, > > are you using a Maven-base project/build (and the Maven project layout > with src/main/java, src/main/resources, etc.) or a plain Java project? > > Which version of uimaFIT are you using? > > Best, > > -- Richard > > > On 10.12.2015, at 12:16, Matthew DeAngelis <[email protected]> wrote: > > > > Hi all, > > > > I am struggling with type auto-detection in Eclipse. Following the > > documentation (and this document: > > https://code.google.com/p/uimafit/wiki/TypeDescriptorDetection), I have > > placed my type system descriptors in desc/types/*.xml (also just > > desc/*.xml) and created types.txt in META-INF/org.apache.uima.fit with > the > > line classpath*:desc/types/*.xml (I have tried placing the types.txt file > > in the folder META-INF/org.uimafit as well, following Richard's document > > above, with the same results). However, I am still getting missing type > > complaints at runtime. > > > > For instance, the following code runs a reader and a single analysis > > engine, DJNMultiplier, that relies on the typesystem specified in > > desc/types/DJTypes.xml. > > > > CollectionReaderDescription cr = createReaderDescription(...); > > TypeSystemDescription tsd = > > TypeSystemDescriptionFactory.createTypeSystemDescription(); > > AnalysisEngineDescription djread = > > AnalysisEngineFactory.createEngineDescription(DJNMultiplier.class,tsd); > > SimplePipeline.runPipeline(cr,djread); > > > > This results in: "org.apache.uima.cas.CASRuntimeException: JCas type > > "document.DJInfo" used in Java code, but was not declared in the XML > type > > descriptor." > > > > Changing the code to specify the location of the typesystem runs fine: > > > > CollectionReaderDescription cr = createReaderDescription(...); > > TypeSystemDescription tsd = > > > TypeSystemDescriptionFactory.createTypeSystemDescription("desc/types/DJTypes"); > > AnalysisEngineDescription djread = > > AnalysisEngineFactory.createEngineDescription(DJNMultiplier.class,tsd); > > SimplePipeline.runPipeline(cr,djread); > > > > The latter code would actually be fine for most of my needs, except that > I > > am trying to create a jar file following the instructions in the > > documentation found here: > > > https://uima.apache.org/d/uimafit-current/tools.uimafit.book.html#ugr.tools.uimafit.packaging > . > > These instructions seem predicated on typesystem auto-detection. When I > use > > Maven Shade to build a jar from the latter code, it complains that: "No > > file with the name "desc/types/DJTypes.xml" was found in the class path > or > > data path". I suppose that a solution to my problem could include a way > to > > package up the typesystem descriptors so that they can be seen within the > > jar file; I'm not especially picky about getting this thing running. > > > > Any help would be appreciated. I am probably missing something basic, but > > I'll be darned if I can see it. > > > > > > Regards, > > Matt > >
