uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthias Mühlhausen <Matthias.Muehlhau...@uni-jena.de>
Subject CpeDescriptrion: Invalid
Date Fri, 14 Mar 2008 15:46:19 GMT
Hello,

I have a problem if I try to create a CpeDescritpion form a descriptor 
file.


This is a short form of the stack trace:

org.apache.uima.util.InvalidXMLException: Invalid descriptor at ...
    at 
org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:193)
    at 
org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:232)
    at 
org.apache.uima.util.impl.XMLParser_impl.parseCpeDescription(XMLParser_impl.java:645)
    at 
de.julielab.jules.dopp.DocumentParallelProcessorTest.createCpeDescription(DocumentParallelProcessorTest.java:58)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    ...
Caused by: org.apache.uima.util.InvalidXMLException: The XML parser 
encountered an unknown element type: cpeDescription.
    at 
org.apache.uima.util.impl.XMLParser_impl.buildObject(XMLParser_impl.java:276)
    at 
org.apache.uima.util.impl.SaxDeserializer_impl.getObject(SaxDeserializer_impl.java:114)
    at 
org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:184)
    ... 16 more


The code I use is:

XMLInputSource source = new XMLInputSource(DESC_CPE);
System.out.println("source.getURL()="+source.getURL());
cpeDescription = UIMAFramework.getXMLParser().parseCpeDescription(source);


This is the descriptor I use:

<?xml version="1.0" encoding="UTF-8"?>
<cpeDescription xmlns="http://uima.apache.org/resourceSpecifier">
    <collectionReader>
        <collectionIterator>
            <descriptor>
                <import location="MedlineReaderDescriptor.xml"/>
            </descriptor>
        </collectionIterator>
    </collectionReader>
    <casProcessors casPoolSize="3" processingUnitThreadCount="1">
        <casProcessor deployment="integrated" name="Sentence Annotator">
            <descriptor>
                <import location="SentenceAnnotatorTest.xml"/>
            </descriptor>
            <deploymentParameters/>
            <errorHandling>
                <errorRateThreshold action="terminate" value="0/1000"/>
                <maxConsecutiveRestarts action="terminate" value="30"/>
                <timeout max="100000" default="-1"/>
            </errorHandling>
            <checkpoint batch="10000" time="1000ms"/>
        </casProcessor>
        <casProcessor deployment="integrated" name="XMIWriter">
            <descriptor>
                <import location="CasToXmiConsumer.xml"/>
            </descriptor>
            <deploymentParameters/>
            <errorHandling>
                <errorRateThreshold action="terminate" value="0/1000"/>
                <maxConsecutiveRestarts action="terminate" value="30"/>
                <timeout max="100000" default="-1"/>
            </errorHandling>
            <checkpoint batch="10000" time="1000ms"/>
        </casProcessor>
    </casProcessors>
    <cpeConfig>
        <numToProcess>-1</numToProcess>
        <deployAs>immediate</deployAs>
        <checkpoint batch="0" time="300000ms"/>
        <timerImpl/>
    </cpeConfig>
</cpeDescription>


I use UIMA 2.2.1 and Java6 (also tried Java5 without success).

Any ideas?
Matthias

-- 
Matthias Mühlhausen
Jena University Language and Information Engineering (JULIE) Lab
Phone: +49-3641-944305
Fax:   +49-3641-944321
email: matthias.muehlhausen@uni-jena.de
URL:   http://www.julielab.de 


Mime
View raw message