You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by Peter Klügl <pk...@ki.informatik.uni-wuerzburg.de> on 2007/11/09 13:40:17 UTC

Valid Descriptor causes InvalidXMLException/DOMException

Hello,

To cut a long story short:

I created an (valid) annotator with the component descriptor and get an 
InvalidXMLException when I try to run it for instance with the Document 
Analyzer in eclipse.

My configuration is currently:
Eclipse 3.3.1.1
Java 1.5.0_13 (also tried it with Java 1.6.0_03)
Apache UIMA 2.2.0

A short online search told me that this might be not an UIMA specific 
but an xml problem. So I downloaded the newest Xalan/Xerces and 
integrated it in any place, in any combination (started with the 
classpath of the eclipse-plugin, uima classpath, ended with the endorsed 
folder).

The example annotators work just fine. But I can’t see any difference 
between their environments or basic structure/namespaces of their xml 
descriptor.

Any help, hint or advice will be greatly appreciated.

Best regards

Peter Klügl

org.apache.uima.util.InvalidXMLException: Invalid descriptor at <unknown 
source>.
at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:193)
at 
org.apache.uima.util.impl.XMLParser_impl.parseCollectionReaderDescription(XMLParser_impl.java:629)
at 
org.apache.uima.util.impl.XMLParser_impl.parseCollectionReaderDescription(XMLParser_impl.java:622)
at 
org.apache.uima.tools.components.FileSystemCollectionReader.getDescription(FileSystemCollectionReader.java:243)
at 
org.apache.uima.tools.docanalyzer.DocumentAnalyzer.runProcessingThread(DocumentAnalyzer.java:1060)
at 
org.apache.uima.tools.docanalyzer.DocumentAnalyzer$ProcessingThread.run(DocumentAnalyzer.java:1267)
Caused by: org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made 
to create or change an object in a way which is incorrect with regard to 
namespaces.
at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:351)
at 
org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1020)
at 
org.apache.uima.util.impl.SaxDeserializer_impl.startElement(SaxDeserializer_impl.java:201)
at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown 
Source)
at 
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown 
Source)
at 
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown 
Source)
at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown 
Source)
at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)
at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown 
Source)
at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown 
Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown 
Source)
at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown 
Source)
at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:176)
... 5 more


-- 
Peter Klügl
mailto:pkluegl@ki.informatik.uni-wuerzburg.de
http://ki.informatik.uni-wuerzburg.de/~pkluegl
Applied Informatics and Artificial Intelligence
University of Würzburg


Re: Valid Descriptor causes InvalidXMLException/DOMException

Posted by Peter Klügl <pk...@ki.informatik.uni-wuerzburg.de>.
Hi,

A small update:

Given that everything points to a strange xml config of my pc, I just 
installed a new eclipse 3.3.1.1 (emf with update manager), an apache 
UIMA 2.2.0 on a random student pc (java 1.6.0_02 was installed). But 
still get the same Exception.

Greetings

Peter

-- 
Peter Klügl
mailto:pkluegl@ki.informatik.uni-wuerzburg.de
http://ki.informatik.uni-wuerzburg.de/~pkluegl
Applied Informatics and Artificial Intelligence
University of Würzburg


Re: Valid Descriptor causes InvalidXMLException/DOMException

Posted by Peter Klügl <pk...@ki.informatik.uni-wuerzburg.de>.
Hello,

Yes the org.apache.xalan.processor.TransformerFactoryImpl class caused 
the problem. The /lib/ext/ directory was indeed proper but i found the 
class in a (bit hidden) library in a required project. There will be 
some dicsussion here about that...

I must apologize that i concerned you with a problem that had nothing to 
do with your project.

Anyway, thank you very much for that great, fast and intensive support. 
Be sure that i ll pay for a round if you visit Würzburg sometime.

Best regards

Peter



Marshall Schor schrieb:
> OK - I think I see the problem.
>
> I can see in the trace that most of the classes for parsing are being
> loaded from you Java - they look like:
>
> JAXP: created new instance of class
> com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl using
> ClassLoader: sun.misc.Launcher$AppClassLoader@133056f
>
> Note the name of the class starts with
> "com.sun.org.apache.xerces.internal"  - Sun renamed the Xerces classes
> to start with com.sun.org....
>
> This is true for all except the class
> "org.apache.xalan.processor.TransformerFactoryImpl".  Here, the version
> of the class being loaded appears to not be from your JVM but from some
> other Jar.  Can you look in your Java installation, and be sure there is
> nothing that got added to the ext (extensions) directory that is a Jar
> containing this class?
>
> The extensions directory is probably under the JVM Home / lib / ext
>
> When we run with this trace, the class that's being loaded for
> TransformerFactoryImpl has the "com.sun.org... " prefix, so I'm pretty
> sure that's the source of the problem.
>
> Let us know what you find. 
>
> -Marshall
>
> Peter Klügl wrote:
>   
>> Hi Marshall!
>>
>> Here is the console log with the debug trace flag. But i should
>> mention that i removed all manual classpath settings of the downloaded
>> xerces libs (because it did not fix the problem). Therefore this is a
>> trace of a clean eclipse (with new emf), clean java1.5.0_13 and clean
>> uima. Should i add the latest api again to the eclipse-plugins or
>> umia-installation (and send the log)?
>>
>> Peter
>>
>> JAXP: find factoryId =javax.xml.parsers.SAXParserFactory
>> JAXP: loaded from fallback value:
>> com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
>> JAXP: created new instance of class
>> com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl using
>> ClassLoader: sun.misc.Launcher$AppClassLoader@133056f
>> JAXP: find factoryId =javax.xml.parsers.SAXParserFactory
>> JAXP: loaded from fallback value:
>> com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
>> JAXP: created new instance of class
>> com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl using
>> ClassLoader: sun.misc.Launcher$AppClassLoader@133056f
>> JAXP: find factoryId =javax.xml.transform.TransformerFactory
>> JAXP: found jar
>> resource=META-INF/services/javax.xml.transform.TransformerFactory
>> using ClassLoader: sun.misc.Launcher$AppClassLoader@133056f
>> JAXP: found in resource,
>> value=org.apache.xalan.processor.TransformerFactoryImpl
>> JAXP: created new instance of class
>> org.apache.xalan.processor.TransformerFactoryImpl using ClassLoader:
>> sun.misc.Launcher$AppClassLoader@133056f
>> JAXP: find factoryId =javax.xml.parsers.DocumentBuilderFactory
>> JAXP: loaded from fallback value:
>> com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
>> JAXP: created new instance of class
>> com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
>> using ClassLoader: sun.misc.Launcher$AppClassLoader@133056f
>> org.apache.uima.util.InvalidXMLException: Invalid descriptor at
>> <unknown source>.
>>    at
>> org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:193)
>>    at
>> org.apache.uima.util.impl.XMLParser_impl.parseCollectionReaderDescription(XMLParser_impl.java:629)
>>
>>    at
>> org.apache.uima.util.impl.XMLParser_impl.parseCollectionReaderDescription(XMLParser_impl.java:622)
>>
>>    at
>> org.apache.uima.tools.components.FileSystemCollectionReader.getDescription(FileSystemCollectionReader.java:243)
>>
>>    at
>> org.apache.uima.tools.docanalyzer.DocumentAnalyzer.runProcessingThread(DocumentAnalyzer.java:1060)
>>
>>    at
>> org.apache.uima.tools.docanalyzer.DocumentAnalyzer$ProcessingThread.run(DocumentAnalyzer.java:1267)
>>
>> Caused by: org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made
>> to create or change an object in a way which is incorrect with regard
>> to namespaces.
>>    at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:351)
>>    at
>> org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1020)
>>
>>    at
>> org.apache.uima.util.impl.SaxDeserializer_impl.startElement(SaxDeserializer_impl.java:201)
>>
>>    at
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown
>> Source)
>>    at
>> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
>> Source)
>>    at
>> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown
>> Source)
>>    at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
>> Source)
>>    at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
>> Source)
>>    at
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>> Source)
>>    at
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>> Source)
>>    at
>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
>> Source)
>>    at
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
>> Source)
>>    at
>> org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:176)
>>    ... 5 more
>>
>>
>> Marshall Schor schrieb:
>>     
>>> Hi Peter,
>>>
>>> The methods Java uses to find the XML parser are quite involved.  It may
>>> be that it's not finding your latest Xerces impl.  Could you try running
>>> this using this debug trace flag (found in the docs for Java 1.5
>>> SAXParserFactory:
>>>
>>> -Djaxp.debug=1
>>>
>>> If you can do this, please post what it says.
>>> Thanks. -Marshall
>>>
>>> Peter Klügl wrote:
>>>  
>>>       
>>>> Hello,
>>>>
>>>> To cut a long story short:
>>>>
>>>> I created an (valid) annotator with the component descriptor and get
>>>> an InvalidXMLException when I try to run it for instance with the
>>>> Document Analyzer in eclipse.
>>>>
>>>> My configuration is currently:
>>>> Eclipse 3.3.1.1
>>>> Java 1.5.0_13 (also tried it with Java 1.6.0_03)
>>>> Apache UIMA 2.2.0
>>>>
>>>> A short online search told me that this might be not an UIMA specific
>>>> but an xml problem. So I downloaded the newest Xalan/Xerces and
>>>> integrated it in any place, in any combination (started with the
>>>> classpath of the eclipse-plugin, uima classpath, ended with the
>>>> endorsed folder).
>>>>
>>>> The example annotators work just fine. But I can’t see any difference
>>>> between their environments or basic structure/namespaces of their xml
>>>> descriptor.
>>>>
>>>> Any help, hint or advice will be greatly appreciated.
>>>>
>>>> Best regards
>>>>
>>>> Peter Klügl
>>>>
>>>> org.apache.uima.util.InvalidXMLException: Invalid descriptor at
>>>> <unknown source>.
>>>> at
>>>> org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:193)
>>>> at
>>>> org.apache.uima.util.impl.XMLParser_impl.parseCollectionReaderDescription(XMLParser_impl.java:629)
>>>>
>>>>
>>>> at
>>>> org.apache.uima.util.impl.XMLParser_impl.parseCollectionReaderDescription(XMLParser_impl.java:622)
>>>>
>>>>
>>>> at
>>>> org.apache.uima.tools.components.FileSystemCollectionReader.getDescription(FileSystemCollectionReader.java:243)
>>>>
>>>>
>>>> at
>>>> org.apache.uima.tools.docanalyzer.DocumentAnalyzer.runProcessingThread(DocumentAnalyzer.java:1060)
>>>>
>>>>
>>>> at
>>>> org.apache.uima.tools.docanalyzer.DocumentAnalyzer$ProcessingThread.run(DocumentAnalyzer.java:1267)
>>>>
>>>>
>>>> Caused by: org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made
>>>> to create or change an object in a way which is incorrect with regard
>>>> to namespaces.
>>>> at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:351)
>>>> at
>>>> org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1020)
>>>>
>>>>
>>>> at
>>>> org.apache.uima.util.impl.SaxDeserializer_impl.startElement(SaxDeserializer_impl.java:201)
>>>>
>>>>
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown
>>>>
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
>>>>
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown
>>>>
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
>>>>
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
>>>>
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>>>>
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>>>>
>>>> Source)
>>>> at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
>>>>
>>>> Source)
>>>> at
>>>> org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:176)
>>>> ... 5 more
>>>>
>>>>
>>>>     
>>>>         
>>     


-- 
Peter Klügl
mailto:pkluegl@ki.informatik.uni-wuerzburg.de
http://ki.informatik.uni-wuerzburg.de/~pkluegl
Applied Informatics and Artificial Intelligence
University of Würzburg


Re: Valid Descriptor causes InvalidXMLException/DOMException

Posted by Marshall Schor <ms...@schor.com>.
Here's a few 3 line test case to run

  public static void main(String[] args) throws ClassNotFoundException {
    SAXTransformerFactory f =
(SAXTransformerFactory)SAXTransformerFactory.newInstance();
  }

Run this as a stand alone Java program, with the -Djaxp.debug=1 flag. 
If it works, it will print something like:

JAXP: find factoryId =javax.xml.transform.TransformerFactory
JAXP: loaded from fallback value:
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl
JAXP: created new instance of class
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl
using ClassLoader: sun.misc.Launcher$AppClassLoader@e39a3e

(That's the output from Sun's jdk 1.5.0_04 - which I happened to have on
my system; and I also get the same output from Sun's 1.6.0_02).

-Marshall




Marshall Schor wrote:
> OK - I think I see the problem.
>
> I can see in the trace that most of the classes for parsing are being
> loaded from you Java - they look like:
>
> JAXP: created new instance of class
> com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl using
> ClassLoader: sun.misc.Launcher$AppClassLoader@133056f
>
> Note the name of the class starts with
> "com.sun.org.apache.xerces.internal"  - Sun renamed the Xerces classes
> to start with com.sun.org....
>
> This is true for all except the class
> "org.apache.xalan.processor.TransformerFactoryImpl".  Here, the version
> of the class being loaded appears to not be from your JVM but from some
> other Jar.  Can you look in your Java installation, and be sure there is
> nothing that got added to the ext (extensions) directory that is a Jar
> containing this class?
>
> The extensions directory is probably under the JVM Home / lib / ext
>
> When we run with this trace, the class that's being loaded for
> TransformerFactoryImpl has the "com.sun.org... " prefix, so I'm pretty
> sure that's the source of the problem.
>
> Let us know what you find. 
>
> -Marshall
>
> Peter Klügl wrote:
>   
>> Hi Marshall!
>>
>> Here is the console log with the debug trace flag. But i should
>> mention that i removed all manual classpath settings of the downloaded
>> xerces libs (because it did not fix the problem). Therefore this is a
>> trace of a clean eclipse (with new emf), clean java1.5.0_13 and clean
>> uima. Should i add the latest api again to the eclipse-plugins or
>> umia-installation (and send the log)?
>>
>> Peter
>>
>> JAXP: find factoryId =javax.xml.parsers.SAXParserFactory
>> JAXP: loaded from fallback value:
>> com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
>> JAXP: created new instance of class
>> com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl using
>> ClassLoader: sun.misc.Launcher$AppClassLoader@133056f
>> JAXP: find factoryId =javax.xml.parsers.SAXParserFactory
>> JAXP: loaded from fallback value:
>> com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
>> JAXP: created new instance of class
>> com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl using
>> ClassLoader: sun.misc.Launcher$AppClassLoader@133056f
>> JAXP: find factoryId =javax.xml.transform.TransformerFactory
>> JAXP: found jar
>> resource=META-INF/services/javax.xml.transform.TransformerFactory
>> using ClassLoader: sun.misc.Launcher$AppClassLoader@133056f
>> JAXP: found in resource,
>> value=org.apache.xalan.processor.TransformerFactoryImpl
>> JAXP: created new instance of class
>> org.apache.xalan.processor.TransformerFactoryImpl using ClassLoader:
>> sun.misc.Launcher$AppClassLoader@133056f
>> JAXP: find factoryId =javax.xml.parsers.DocumentBuilderFactory
>> JAXP: loaded from fallback value:
>> com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
>> JAXP: created new instance of class
>> com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
>> using ClassLoader: sun.misc.Launcher$AppClassLoader@133056f
>> org.apache.uima.util.InvalidXMLException: Invalid descriptor at
>> <unknown source>.
>>    at
>> org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:193)
>>    at
>> org.apache.uima.util.impl.XMLParser_impl.parseCollectionReaderDescription(XMLParser_impl.java:629)
>>
>>    at
>> org.apache.uima.util.impl.XMLParser_impl.parseCollectionReaderDescription(XMLParser_impl.java:622)
>>
>>    at
>> org.apache.uima.tools.components.FileSystemCollectionReader.getDescription(FileSystemCollectionReader.java:243)
>>
>>    at
>> org.apache.uima.tools.docanalyzer.DocumentAnalyzer.runProcessingThread(DocumentAnalyzer.java:1060)
>>
>>    at
>> org.apache.uima.tools.docanalyzer.DocumentAnalyzer$ProcessingThread.run(DocumentAnalyzer.java:1267)
>>
>> Caused by: org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made
>> to create or change an object in a way which is incorrect with regard
>> to namespaces.
>>    at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:351)
>>    at
>> org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1020)
>>
>>    at
>> org.apache.uima.util.impl.SaxDeserializer_impl.startElement(SaxDeserializer_impl.java:201)
>>
>>    at
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown
>> Source)
>>    at
>> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
>> Source)
>>    at
>> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown
>> Source)
>>    at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
>> Source)
>>    at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
>> Source)
>>    at
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>> Source)
>>    at
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>> Source)
>>    at
>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
>> Source)
>>    at
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
>> Source)
>>    at
>> org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:176)
>>    ... 5 more
>>
>>
>> Marshall Schor schrieb:
>>     
>>> Hi Peter,
>>>
>>> The methods Java uses to find the XML parser are quite involved.  It may
>>> be that it's not finding your latest Xerces impl.  Could you try running
>>> this using this debug trace flag (found in the docs for Java 1.5
>>> SAXParserFactory:
>>>
>>> -Djaxp.debug=1
>>>
>>> If you can do this, please post what it says.
>>> Thanks. -Marshall
>>>
>>> Peter Klügl wrote:
>>>  
>>>       
>>>> Hello,
>>>>
>>>> To cut a long story short:
>>>>
>>>> I created an (valid) annotator with the component descriptor and get
>>>> an InvalidXMLException when I try to run it for instance with the
>>>> Document Analyzer in eclipse.
>>>>
>>>> My configuration is currently:
>>>> Eclipse 3.3.1.1
>>>> Java 1.5.0_13 (also tried it with Java 1.6.0_03)
>>>> Apache UIMA 2.2.0
>>>>
>>>> A short online search told me that this might be not an UIMA specific
>>>> but an xml problem. So I downloaded the newest Xalan/Xerces and
>>>> integrated it in any place, in any combination (started with the
>>>> classpath of the eclipse-plugin, uima classpath, ended with the
>>>> endorsed folder).
>>>>
>>>> The example annotators work just fine. But I can’t see any difference
>>>> between their environments or basic structure/namespaces of their xml
>>>> descriptor.
>>>>
>>>> Any help, hint or advice will be greatly appreciated.
>>>>
>>>> Best regards
>>>>
>>>> Peter Klügl
>>>>
>>>> org.apache.uima.util.InvalidXMLException: Invalid descriptor at
>>>> <unknown source>.
>>>> at
>>>> org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:193)
>>>> at
>>>> org.apache.uima.util.impl.XMLParser_impl.parseCollectionReaderDescription(XMLParser_impl.java:629)
>>>>
>>>>
>>>> at
>>>> org.apache.uima.util.impl.XMLParser_impl.parseCollectionReaderDescription(XMLParser_impl.java:622)
>>>>
>>>>
>>>> at
>>>> org.apache.uima.tools.components.FileSystemCollectionReader.getDescription(FileSystemCollectionReader.java:243)
>>>>
>>>>
>>>> at
>>>> org.apache.uima.tools.docanalyzer.DocumentAnalyzer.runProcessingThread(DocumentAnalyzer.java:1060)
>>>>
>>>>
>>>> at
>>>> org.apache.uima.tools.docanalyzer.DocumentAnalyzer$ProcessingThread.run(DocumentAnalyzer.java:1267)
>>>>
>>>>
>>>> Caused by: org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made
>>>> to create or change an object in a way which is incorrect with regard
>>>> to namespaces.
>>>> at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:351)
>>>> at
>>>> org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1020)
>>>>
>>>>
>>>> at
>>>> org.apache.uima.util.impl.SaxDeserializer_impl.startElement(SaxDeserializer_impl.java:201)
>>>>
>>>>
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown
>>>>
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
>>>>
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown
>>>>
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
>>>>
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
>>>>
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>>>>
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>>>>
>>>> Source)
>>>> at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
>>>>
>>>> Source)
>>>> at
>>>> org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:176)
>>>> ... 5 more
>>>>
>>>>
>>>>     
>>>>         
>>     
>
>
>
>   


Re: Valid Descriptor causes InvalidXMLException/DOMException

Posted by Marshall Schor <ms...@schor.com>.
OK - I think I see the problem.

I can see in the trace that most of the classes for parsing are being
loaded from you Java - they look like:

JAXP: created new instance of class
com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl using
ClassLoader: sun.misc.Launcher$AppClassLoader@133056f

Note the name of the class starts with
"com.sun.org.apache.xerces.internal"  - Sun renamed the Xerces classes
to start with com.sun.org....

This is true for all except the class
"org.apache.xalan.processor.TransformerFactoryImpl".  Here, the version
of the class being loaded appears to not be from your JVM but from some
other Jar.  Can you look in your Java installation, and be sure there is
nothing that got added to the ext (extensions) directory that is a Jar
containing this class?

The extensions directory is probably under the JVM Home / lib / ext

When we run with this trace, the class that's being loaded for
TransformerFactoryImpl has the "com.sun.org... " prefix, so I'm pretty
sure that's the source of the problem.

Let us know what you find. 

-Marshall

Peter Klügl wrote:
> Hi Marshall!
>
> Here is the console log with the debug trace flag. But i should
> mention that i removed all manual classpath settings of the downloaded
> xerces libs (because it did not fix the problem). Therefore this is a
> trace of a clean eclipse (with new emf), clean java1.5.0_13 and clean
> uima. Should i add the latest api again to the eclipse-plugins or
> umia-installation (and send the log)?
>
> Peter
>
> JAXP: find factoryId =javax.xml.parsers.SAXParserFactory
> JAXP: loaded from fallback value:
> com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
> JAXP: created new instance of class
> com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl using
> ClassLoader: sun.misc.Launcher$AppClassLoader@133056f
> JAXP: find factoryId =javax.xml.parsers.SAXParserFactory
> JAXP: loaded from fallback value:
> com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
> JAXP: created new instance of class
> com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl using
> ClassLoader: sun.misc.Launcher$AppClassLoader@133056f
> JAXP: find factoryId =javax.xml.transform.TransformerFactory
> JAXP: found jar
> resource=META-INF/services/javax.xml.transform.TransformerFactory
> using ClassLoader: sun.misc.Launcher$AppClassLoader@133056f
> JAXP: found in resource,
> value=org.apache.xalan.processor.TransformerFactoryImpl
> JAXP: created new instance of class
> org.apache.xalan.processor.TransformerFactoryImpl using ClassLoader:
> sun.misc.Launcher$AppClassLoader@133056f
> JAXP: find factoryId =javax.xml.parsers.DocumentBuilderFactory
> JAXP: loaded from fallback value:
> com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
> JAXP: created new instance of class
> com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
> using ClassLoader: sun.misc.Launcher$AppClassLoader@133056f
> org.apache.uima.util.InvalidXMLException: Invalid descriptor at
> <unknown source>.
>    at
> org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:193)
>    at
> org.apache.uima.util.impl.XMLParser_impl.parseCollectionReaderDescription(XMLParser_impl.java:629)
>
>    at
> org.apache.uima.util.impl.XMLParser_impl.parseCollectionReaderDescription(XMLParser_impl.java:622)
>
>    at
> org.apache.uima.tools.components.FileSystemCollectionReader.getDescription(FileSystemCollectionReader.java:243)
>
>    at
> org.apache.uima.tools.docanalyzer.DocumentAnalyzer.runProcessingThread(DocumentAnalyzer.java:1060)
>
>    at
> org.apache.uima.tools.docanalyzer.DocumentAnalyzer$ProcessingThread.run(DocumentAnalyzer.java:1267)
>
> Caused by: org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made
> to create or change an object in a way which is incorrect with regard
> to namespaces.
>    at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:351)
>    at
> org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1020)
>
>    at
> org.apache.uima.util.impl.SaxDeserializer_impl.startElement(SaxDeserializer_impl.java:201)
>
>    at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown
> Source)
>    at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
> Source)
>    at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown
> Source)
>    at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
> Source)
>    at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
> Source)
>    at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
> Source)
>    at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
> Source)
>    at
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
> Source)
>    at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
> Source)
>    at
> org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:176)
>    ... 5 more
>
>
> Marshall Schor schrieb:
>> Hi Peter,
>>
>> The methods Java uses to find the XML parser are quite involved.  It may
>> be that it's not finding your latest Xerces impl.  Could you try running
>> this using this debug trace flag (found in the docs for Java 1.5
>> SAXParserFactory:
>>
>> -Djaxp.debug=1
>>
>> If you can do this, please post what it says.
>> Thanks. -Marshall
>>
>> Peter Klügl wrote:
>>  
>>> Hello,
>>>
>>> To cut a long story short:
>>>
>>> I created an (valid) annotator with the component descriptor and get
>>> an InvalidXMLException when I try to run it for instance with the
>>> Document Analyzer in eclipse.
>>>
>>> My configuration is currently:
>>> Eclipse 3.3.1.1
>>> Java 1.5.0_13 (also tried it with Java 1.6.0_03)
>>> Apache UIMA 2.2.0
>>>
>>> A short online search told me that this might be not an UIMA specific
>>> but an xml problem. So I downloaded the newest Xalan/Xerces and
>>> integrated it in any place, in any combination (started with the
>>> classpath of the eclipse-plugin, uima classpath, ended with the
>>> endorsed folder).
>>>
>>> The example annotators work just fine. But I can’t see any difference
>>> between their environments or basic structure/namespaces of their xml
>>> descriptor.
>>>
>>> Any help, hint or advice will be greatly appreciated.
>>>
>>> Best regards
>>>
>>> Peter Klügl
>>>
>>> org.apache.uima.util.InvalidXMLException: Invalid descriptor at
>>> <unknown source>.
>>> at
>>> org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:193)
>>> at
>>> org.apache.uima.util.impl.XMLParser_impl.parseCollectionReaderDescription(XMLParser_impl.java:629)
>>>
>>>
>>> at
>>> org.apache.uima.util.impl.XMLParser_impl.parseCollectionReaderDescription(XMLParser_impl.java:622)
>>>
>>>
>>> at
>>> org.apache.uima.tools.components.FileSystemCollectionReader.getDescription(FileSystemCollectionReader.java:243)
>>>
>>>
>>> at
>>> org.apache.uima.tools.docanalyzer.DocumentAnalyzer.runProcessingThread(DocumentAnalyzer.java:1060)
>>>
>>>
>>> at
>>> org.apache.uima.tools.docanalyzer.DocumentAnalyzer$ProcessingThread.run(DocumentAnalyzer.java:1267)
>>>
>>>
>>> Caused by: org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made
>>> to create or change an object in a way which is incorrect with regard
>>> to namespaces.
>>> at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:351)
>>> at
>>> org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1020)
>>>
>>>
>>> at
>>> org.apache.uima.util.impl.SaxDeserializer_impl.startElement(SaxDeserializer_impl.java:201)
>>>
>>>
>>> at
>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown
>>>
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
>>>
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown
>>>
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
>>>
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
>>>
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>>>
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>>>
>>> Source)
>>> at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
>>> Source)
>>> at
>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
>>>
>>> Source)
>>> at
>>> org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:176)
>>> ... 5 more
>>>
>>>
>>>     
>
>


Re: Valid Descriptor causes InvalidXMLException/DOMException

Posted by Peter Klügl <pk...@ki.informatik.uni-wuerzburg.de>.
Hi Marshall!

Here is the console log with the debug trace flag. But i should mention 
that i removed all manual classpath settings of the downloaded xerces 
libs (because it did not fix the problem). Therefore this is a trace of 
a clean eclipse (with new emf), clean java1.5.0_13 and clean uima. 
Should i add the latest api again to the eclipse-plugins or 
umia-installation (and send the log)?

Peter

JAXP: find factoryId =javax.xml.parsers.SAXParserFactory
JAXP: loaded from fallback value: 
com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
JAXP: created new instance of class 
com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl using 
ClassLoader: sun.misc.Launcher$AppClassLoader@133056f
JAXP: find factoryId =javax.xml.parsers.SAXParserFactory
JAXP: loaded from fallback value: 
com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
JAXP: created new instance of class 
com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl using 
ClassLoader: sun.misc.Launcher$AppClassLoader@133056f
JAXP: find factoryId =javax.xml.transform.TransformerFactory
JAXP: found jar 
resource=META-INF/services/javax.xml.transform.TransformerFactory using 
ClassLoader: sun.misc.Launcher$AppClassLoader@133056f
JAXP: found in resource, 
value=org.apache.xalan.processor.TransformerFactoryImpl
JAXP: created new instance of class 
org.apache.xalan.processor.TransformerFactoryImpl using ClassLoader: 
sun.misc.Launcher$AppClassLoader@133056f
JAXP: find factoryId =javax.xml.parsers.DocumentBuilderFactory
JAXP: loaded from fallback value: 
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
JAXP: created new instance of class 
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl using 
ClassLoader: sun.misc.Launcher$AppClassLoader@133056f
org.apache.uima.util.InvalidXMLException: Invalid descriptor at <unknown 
source>.
    at 
org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:193)
    at 
org.apache.uima.util.impl.XMLParser_impl.parseCollectionReaderDescription(XMLParser_impl.java:629)
    at 
org.apache.uima.util.impl.XMLParser_impl.parseCollectionReaderDescription(XMLParser_impl.java:622)
    at 
org.apache.uima.tools.components.FileSystemCollectionReader.getDescription(FileSystemCollectionReader.java:243)
    at 
org.apache.uima.tools.docanalyzer.DocumentAnalyzer.runProcessingThread(DocumentAnalyzer.java:1060)
    at 
org.apache.uima.tools.docanalyzer.DocumentAnalyzer$ProcessingThread.run(DocumentAnalyzer.java:1267)
Caused by: org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made 
to create or change an object in a way which is incorrect with regard to 
namespaces.
    at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:351)
    at 
org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1020)
    at 
org.apache.uima.util.impl.SaxDeserializer_impl.startElement(SaxDeserializer_impl.java:201)
    at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown 
Source)
    at 
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown 
Source)
    at 
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown 
Source)
    at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown 
Source)
    at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)
    at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown 
Source)
    at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown 
Source)
    at 
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
    at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown 
Source)
    at 
org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:176)
    ... 5 more


Marshall Schor schrieb:
> Hi Peter,
>
> The methods Java uses to find the XML parser are quite involved.  It may
> be that it's not finding your latest Xerces impl.  Could you try running
> this using this debug trace flag (found in the docs for Java 1.5
> SAXParserFactory:
>
> -Djaxp.debug=1
>
> If you can do this, please post what it says. 
>
> Thanks. -Marshall
>
> Peter Klügl wrote:
>   
>> Hello,
>>
>> To cut a long story short:
>>
>> I created an (valid) annotator with the component descriptor and get
>> an InvalidXMLException when I try to run it for instance with the
>> Document Analyzer in eclipse.
>>
>> My configuration is currently:
>> Eclipse 3.3.1.1
>> Java 1.5.0_13 (also tried it with Java 1.6.0_03)
>> Apache UIMA 2.2.0
>>
>> A short online search told me that this might be not an UIMA specific
>> but an xml problem. So I downloaded the newest Xalan/Xerces and
>> integrated it in any place, in any combination (started with the
>> classpath of the eclipse-plugin, uima classpath, ended with the
>> endorsed folder).
>>
>> The example annotators work just fine. But I can’t see any difference
>> between their environments or basic structure/namespaces of their xml
>> descriptor.
>>
>> Any help, hint or advice will be greatly appreciated.
>>
>> Best regards
>>
>> Peter Klügl
>>
>> org.apache.uima.util.InvalidXMLException: Invalid descriptor at
>> <unknown source>.
>> at
>> org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:193)
>> at
>> org.apache.uima.util.impl.XMLParser_impl.parseCollectionReaderDescription(XMLParser_impl.java:629)
>>
>> at
>> org.apache.uima.util.impl.XMLParser_impl.parseCollectionReaderDescription(XMLParser_impl.java:622)
>>
>> at
>> org.apache.uima.tools.components.FileSystemCollectionReader.getDescription(FileSystemCollectionReader.java:243)
>>
>> at
>> org.apache.uima.tools.docanalyzer.DocumentAnalyzer.runProcessingThread(DocumentAnalyzer.java:1060)
>>
>> at
>> org.apache.uima.tools.docanalyzer.DocumentAnalyzer$ProcessingThread.run(DocumentAnalyzer.java:1267)
>>
>> Caused by: org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made
>> to create or change an object in a way which is incorrect with regard
>> to namespaces.
>> at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:351)
>> at
>> org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1020)
>>
>> at
>> org.apache.uima.util.impl.SaxDeserializer_impl.startElement(SaxDeserializer_impl.java:201)
>>
>> at
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>> Source)
>> at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
>> Source)
>> at
>> org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:176)
>> ... 5 more
>>
>>
>>     


-- 
Peter Klügl
mailto:pkluegl@ki.informatik.uni-wuerzburg.de
http://ki.informatik.uni-wuerzburg.de/~pkluegl
Applied Informatics and Artificial Intelligence
University of Würzburg


Re: Valid Descriptor causes InvalidXMLException/DOMException

Posted by Marshall Schor <ms...@schor.com>.
Hi Peter,

The methods Java uses to find the XML parser are quite involved.  It may
be that it's not finding your latest Xerces impl.  Could you try running
this using this debug trace flag (found in the docs for Java 1.5
SAXParserFactory:

-Djaxp.debug=1

If you can do this, please post what it says. 

Thanks. -Marshall

Peter Klügl wrote:
> Hello,
>
> To cut a long story short:
>
> I created an (valid) annotator with the component descriptor and get
> an InvalidXMLException when I try to run it for instance with the
> Document Analyzer in eclipse.
>
> My configuration is currently:
> Eclipse 3.3.1.1
> Java 1.5.0_13 (also tried it with Java 1.6.0_03)
> Apache UIMA 2.2.0
>
> A short online search told me that this might be not an UIMA specific
> but an xml problem. So I downloaded the newest Xalan/Xerces and
> integrated it in any place, in any combination (started with the
> classpath of the eclipse-plugin, uima classpath, ended with the
> endorsed folder).
>
> The example annotators work just fine. But I can’t see any difference
> between their environments or basic structure/namespaces of their xml
> descriptor.
>
> Any help, hint or advice will be greatly appreciated.
>
> Best regards
>
> Peter Klügl
>
> org.apache.uima.util.InvalidXMLException: Invalid descriptor at
> <unknown source>.
> at
> org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:193)
> at
> org.apache.uima.util.impl.XMLParser_impl.parseCollectionReaderDescription(XMLParser_impl.java:629)
>
> at
> org.apache.uima.util.impl.XMLParser_impl.parseCollectionReaderDescription(XMLParser_impl.java:622)
>
> at
> org.apache.uima.tools.components.FileSystemCollectionReader.getDescription(FileSystemCollectionReader.java:243)
>
> at
> org.apache.uima.tools.docanalyzer.DocumentAnalyzer.runProcessingThread(DocumentAnalyzer.java:1060)
>
> at
> org.apache.uima.tools.docanalyzer.DocumentAnalyzer$ProcessingThread.run(DocumentAnalyzer.java:1267)
>
> Caused by: org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made
> to create or change an object in a way which is incorrect with regard
> to namespaces.
> at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:351)
> at
> org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1020)
>
> at
> org.apache.uima.util.impl.SaxDeserializer_impl.startElement(SaxDeserializer_impl.java:201)
>
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
> Source)
> at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
> Source)
> at
> org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:176)
> ... 5 more
>
>


Re: Valid Descriptor causes InvalidXMLException/DOMException

Posted by Thilo Goetz <tw...@gmx.de>.
I've tried everything I can think of, various versions
of UIMA, in Eclipse, outside, various JVMs.  I can't
reproduce the issue.  Not sure how to proceed.

--Thilo

Peter Klügl wrote:
> I am using the Apache UIMA 2.2.0
> 
> I get the exception with both versions (this one with inlined type
> system and with <import>)
> 
> Peter
> 
> Thilo Goetz schrieb:
>> Peter Klügl wrote:
>>  
>>> Thank you for the fast answer.
>>>
>>> Here is the descriptor (with inlined type system):
>>>     
>> [...]
>>
>> Do you have the same problems with this exact version?
>> It works fine for me.  Are you using <import> (and not
>> <xi:include>) to import your type system?
>>
>> --Thilo
>>   
> 
> 

Re: Valid Descriptor causes InvalidXMLException/DOMException

Posted by Peter Klügl <pk...@ki.informatik.uni-wuerzburg.de>.
I am using the Apache UIMA 2.2.0

I get the exception with both versions (this one with inlined type 
system and with <import>)

Peter

Thilo Goetz schrieb:
> Peter Klügl wrote:
>   
>> Thank you for the fast answer.
>>
>> Here is the descriptor (with inlined type system):
>>     
> [...]
>
> Do you have the same problems with this exact version?
> It works fine for me.  Are you using <import> (and not
> <xi:include>) to import your type system?
>
> --Thilo
>   


-- 
Peter Klügl
mailto:pkluegl@ki.informatik.uni-wuerzburg.de
http://ki.informatik.uni-wuerzburg.de/~pkluegl
Applied Informatics and Artificial Intelligence
University of Würzburg


Re: Valid Descriptor causes InvalidXMLException/DOMException

Posted by Thilo Goetz <tw...@gmx.de>.
Peter Klügl wrote:
> Thank you for the fast answer.
> 
> Here is the descriptor (with inlined type system):
[...]

Do you have the same problems with this exact version?
It works fine for me.  Are you using <import> (and not
<xi:include>) to import your type system?

--Thilo


Re: Valid Descriptor causes InvalidXMLException/DOMException

Posted by Marshall Schor <ms...@schor.com>.
According to his first post in this thread, he's using UIMA 2.2.0

-Marshall

Thilo Goetz wrote:
> Peter,
>
> I should have asked before: what version of
> UIMA are you using?
>
> --Thilo
>
>
>
>   


Re: Valid Descriptor causes InvalidXMLException/DOMException

Posted by Thilo Goetz <tw...@gmx.de>.
Peter,

I should have asked before: what version of
UIMA are you using?

--Thilo


Re: Valid Descriptor causes InvalidXMLException/DOMException

Posted by Peter Klügl <pk...@ki.informatik.uni-wuerzburg.de>.
Thank you for the fast answer.

Here is the descriptor (with inlined type system):

<?xml version="1.0" encoding="UTF-8"?>
<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
<frameworkImplementation>org.apache.uima.java</frameworkImplementation>
<primitive>true</primitive>
<annotatorImplementationName>de.uniwue.pie.tae.ProjectInformationAnnotator</annotatorImplementationName>
<analysisEngineMetaData>
<name>PIE_TAE</name>
<description></description>
<version>1.0</version>
<vendor></vendor>
<configurationParameters/>
<configurationParameterSettings/>
<typeSystemDescription>
<types>
<typeDescription>
<name>de.uniwue.pie.type.Project</name>
<description></description>
<supertypeName>uima.tcas.Annotation</supertypeName>
<features>
<featureDescription>
<name>Period</name>
<description></description>
<rangeTypeName>de.uniwue.pie.type.Period</rangeTypeName>
</featureDescription>
<featureDescription>
<name>Title</name>
<description></description>
<rangeTypeName>de.uniwue.pie.type.Title</rangeTypeName>
</featureDescription>
<featureDescription>
<name>Client</name>
<description></description>
<rangeTypeName>de.uniwue.pie.type.Client</rangeTypeName>
</featureDescription>
<featureDescription>
<name>Content</name>
<description></description>
<rangeTypeName>de.uniwue.pie.type.Content</rangeTypeName>
</featureDescription>
<featureDescription>
<name>Skills</name>
<description></description>
<rangeTypeName>uima.cas.FSArray</rangeTypeName>
<elementType>de.uniwue.pie.type.Skill</elementType>
<multipleReferencesAllowed>false</multipleReferencesAllowed>
</featureDescription>
<featureDescription>
<name>Dato</name>
<description></description>
<rangeTypeName>uima.cas.Integer</rangeTypeName>
</featureDescription>
</features>
</typeDescription>
<typeDescription>
<name>de.uniwue.pie.type.Title</name>
<description></description>
<supertypeName>uima.tcas.Annotation</supertypeName>
</typeDescription>
<typeDescription>
<name>de.uniwue.pie.type.Client</name>
<description></description>
<supertypeName>uima.tcas.Annotation</supertypeName>
</typeDescription>
<typeDescription>
<name>de.uniwue.pie.type.Content</name>
<description></description>
<supertypeName>uima.tcas.Annotation</supertypeName>
</typeDescription>
<typeDescription>
<name>de.uniwue.pie.type.Skill</name>
<description></description>
<supertypeName>uima.tcas.Annotation</supertypeName>
</typeDescription>
<typeDescription>
<name>de.uniwue.pie.type.CalendarDate</name>
<description></description>
<supertypeName>uima.tcas.Annotation</supertypeName>
<features>
<featureDescription>
<name>Year</name>
<description></description>
<rangeTypeName>de.uniwue.pie.type.Year</rangeTypeName>
</featureDescription>
<featureDescription>
<name>Month</name>
<description></description>
<rangeTypeName>de.uniwue.pie.type.Month</rangeTypeName>
</featureDescription>
<featureDescription>
<name>Week</name>
<description></description>
<rangeTypeName>de.uniwue.pie.type.Week</rangeTypeName>
</featureDescription>
<featureDescription>
<name>Day</name>
<description></description>
<rangeTypeName>de.uniwue.pie.type.Day</rangeTypeName>
</featureDescription>
<featureDescription>
<name>Hour</name>
<description></description>
<rangeTypeName>de.uniwue.pie.type.Hour</rangeTypeName>
</featureDescription>
<featureDescription>
<name>Minute</name>
<description></description>
<rangeTypeName>de.uniwue.pie.type.Minute</rangeTypeName>
</featureDescription>
<featureDescription>
<name>Second</name>
<description></description>
<rangeTypeName>de.uniwue.pie.type.Second</rangeTypeName>
</featureDescription>
</features>
</typeDescription>
<typeDescription>
<name>de.uniwue.pie.type.Year</name>
<description></description>
<supertypeName>uima.tcas.Annotation</supertypeName>
</typeDescription>
<typeDescription>
<name>de.uniwue.pie.type.Month</name>
<description></description>
<supertypeName>uima.tcas.Annotation</supertypeName>
</typeDescription>
<typeDescription>
<name>de.uniwue.pie.type.Week</name>
<description></description>
<supertypeName>uima.tcas.Annotation</supertypeName>
</typeDescription>
<typeDescription>
<name>de.uniwue.pie.type.Day</name>
<description></description>
<supertypeName>uima.tcas.Annotation</supertypeName>
</typeDescription>
<typeDescription>
<name>de.uniwue.pie.type.Hour</name>
<description></description>
<supertypeName>uima.tcas.Annotation</supertypeName>
</typeDescription>
<typeDescription>
<name>de.uniwue.pie.type.Minute</name>
<description></description>
<supertypeName>uima.tcas.Annotation</supertypeName>
</typeDescription>
<typeDescription>
<name>de.uniwue.pie.type.Second</name>
<description></description>
<supertypeName>uima.tcas.Annotation</supertypeName>
</typeDescription>
<typeDescription>
<name>de.uniwue.pie.type.Period</name>
<description></description>
<supertypeName>uima.tcas.Annotation</supertypeName>
<features>
<featureDescription>
<name>StartCalendarDate</name>
<description></description>
<rangeTypeName>de.uniwue.pie.type.CalendarDate</rangeTypeName>
</featureDescription>
<featureDescription>
<name>EndCalendarDate</name>
<description></description>
<rangeTypeName>de.uniwue.pie.type.CalendarDate</rangeTypeName>
</featureDescription>
</features>
</typeDescription>
</types>
</typeSystemDescription>
<typePriorities/>
<fsIndexCollection/>
<capabilities>
<capability>
<inputs/>
<outputs>
<type allAnnotatorFeatures="true">de.uniwue.pie.type.Project</type>
</outputs>
<languagesSupported/>
</capability>
</capabilities>
<operationalProperties>
<modifiesCas>true</modifiesCas>
<multipleDeploymentAllowed>true</multipleDeploymentAllowed>
<outputsNewCASes>false</outputsNewCASes>
</operationalProperties>
</analysisEngineMetaData>
<externalResourceDependencies>
<externalResourceDependency>
<key>TextMarkerRuleFile</key>
<description></description>
<interfaceName>de.uniwue.tm.resource.TextMarkerRuleResource</interfaceName>
<optional>false</optional>
</externalResourceDependency>
</externalResourceDependencies>
<resourceManagerConfiguration>
<externalResources>
<externalResource>
<name>TextMarkerRuleFile</name>
<description></description>
<fileResourceSpecifier>
<fileUrl>file:de/uniwue/tm/resource/PIE.rules</fileUrl>
</fileResourceSpecifier>
<implementationName>de.uniwue.tm.resource.TextMarkerRuleResource_impl</implementationName>
</externalResource>
</externalResources>
<externalResourceBindings>
<externalResourceBinding>
<key>TextMarkerRuleFile</key>
<resourceName>TextMarkerRuleFile</resourceName>
</externalResourceBinding>
</externalResourceBindings>
</resourceManagerConfiguration>
</analysisEngineDescription>


Thilo Goetz schrieb:
> Can you post the descriptor?
>
> Peter Klügl wrote:
>   
>> Hello,
>>
>> To cut a long story short:
>>
>> I created an (valid) annotator with the component descriptor and get an
>> InvalidXMLException when I try to run it for instance with the Document
>> Analyzer in eclipse.
>>
>> My configuration is currently:
>> Eclipse 3.3.1.1
>> Java 1.5.0_13 (also tried it with Java 1.6.0_03)
>> Apache UIMA 2.2.0
>>
>> A short online search told me that this might be not an UIMA specific
>> but an xml problem. So I downloaded the newest Xalan/Xerces and
>> integrated it in any place, in any combination (started with the
>> classpath of the eclipse-plugin, uima classpath, ended with the endorsed
>> folder).
>>
>> The example annotators work just fine. But I can’t see any difference
>> between their environments or basic structure/namespaces of their xml
>> descriptor.
>>
>> Any help, hint or advice will be greatly appreciated.
>>
>> Best regards
>>
>> Peter Klügl
>>
>> org.apache.uima.util.InvalidXMLException: Invalid descriptor at <unknown
>> source>.
>> at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:193)
>> at
>> org.apache.uima.util.impl.XMLParser_impl.parseCollectionReaderDescription(XMLParser_impl.java:629)
>>
>> at
>> org.apache.uima.util.impl.XMLParser_impl.parseCollectionReaderDescription(XMLParser_impl.java:622)
>>
>> at
>> org.apache.uima.tools.components.FileSystemCollectionReader.getDescription(FileSystemCollectionReader.java:243)
>>
>> at
>> org.apache.uima.tools.docanalyzer.DocumentAnalyzer.runProcessingThread(DocumentAnalyzer.java:1060)
>>
>> at
>> org.apache.uima.tools.docanalyzer.DocumentAnalyzer$ProcessingThread.run(DocumentAnalyzer.java:1267)
>>
>> Caused by: org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made
>> to create or change an object in a way which is incorrect with regard to
>> namespaces.
>> at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:351)
>> at
>> org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1020)
>>
>> at
>> org.apache.uima.util.impl.SaxDeserializer_impl.startElement(SaxDeserializer_impl.java:201)
>>
>> at
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>> Source)
>> at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
>> Source)
>> at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:176)
>> ... 5 more
>>
>>
>>     


-- 
Peter Klügl
mailto:pkluegl@ki.informatik.uni-wuerzburg.de
http://ki.informatik.uni-wuerzburg.de/~pkluegl
Applied Informatics and Artificial Intelligence
University of Würzburg


Re: Valid Descriptor causes InvalidXMLException/DOMException

Posted by Thilo Goetz <tw...@gmx.de>.
Can you post the descriptor?

Peter Klügl wrote:
> Hello,
> 
> To cut a long story short:
> 
> I created an (valid) annotator with the component descriptor and get an
> InvalidXMLException when I try to run it for instance with the Document
> Analyzer in eclipse.
> 
> My configuration is currently:
> Eclipse 3.3.1.1
> Java 1.5.0_13 (also tried it with Java 1.6.0_03)
> Apache UIMA 2.2.0
> 
> A short online search told me that this might be not an UIMA specific
> but an xml problem. So I downloaded the newest Xalan/Xerces and
> integrated it in any place, in any combination (started with the
> classpath of the eclipse-plugin, uima classpath, ended with the endorsed
> folder).
> 
> The example annotators work just fine. But I can’t see any difference
> between their environments or basic structure/namespaces of their xml
> descriptor.
> 
> Any help, hint or advice will be greatly appreciated.
> 
> Best regards
> 
> Peter Klügl
> 
> org.apache.uima.util.InvalidXMLException: Invalid descriptor at <unknown
> source>.
> at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:193)
> at
> org.apache.uima.util.impl.XMLParser_impl.parseCollectionReaderDescription(XMLParser_impl.java:629)
> 
> at
> org.apache.uima.util.impl.XMLParser_impl.parseCollectionReaderDescription(XMLParser_impl.java:622)
> 
> at
> org.apache.uima.tools.components.FileSystemCollectionReader.getDescription(FileSystemCollectionReader.java:243)
> 
> at
> org.apache.uima.tools.docanalyzer.DocumentAnalyzer.runProcessingThread(DocumentAnalyzer.java:1060)
> 
> at
> org.apache.uima.tools.docanalyzer.DocumentAnalyzer$ProcessingThread.run(DocumentAnalyzer.java:1267)
> 
> Caused by: org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made
> to create or change an object in a way which is incorrect with regard to
> namespaces.
> at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:351)
> at
> org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1020)
> 
> at
> org.apache.uima.util.impl.SaxDeserializer_impl.startElement(SaxDeserializer_impl.java:201)
> 
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
> Source)
> at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
> Source)
> at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:176)
> ... 5 more
> 
>