You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Richard Eckart de Castilho (JIRA)" <de...@uima.apache.org> on 2011/06/16 12:13:47 UTC

[jira] [Created] (UIMA-2155) XML parsers coming with Sun JDK fail to parser UIMA XML descriptors

XML parsers coming with Sun JDK fail to parser UIMA XML descriptors
-------------------------------------------------------------------

                 Key: UIMA-2155
                 URL: https://issues.apache.org/jira/browse/UIMA-2155
             Project: UIMA
          Issue Type: Bug
          Components: Core Java Framework
            Reporter: Richard Eckart de Castilho


Several people in our group that run Linux with the Sun JDK have run into problems that UIMA fails to parse descriptors unless Xerces 2.9.1 and Xalan 2.7.1. are on the classpath. 
It might be a good idea to add these two as standard dependencies to uimaj-core. 

{noformat}
org.apache.uima.util.InvalidXMLException: Invalid descriptor at Chunks.xml.
    at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:194)
    at org.apache.uima.util.impl.XMLParser_impl.parseTypeSystemDescription(XMLParser_impl.java:708)
    at org.apache.uima.util.impl.XMLParser_impl.parseTypeSystemDescription(XMLParser_impl.java:695)
    at org.uimafit.factory.TypeSystemDescriptionFactory.createTypeSystemDescription(TypeSystemDescriptionFactory.java:145)
    at org.uimafit.factory.AnalysisEngineFactory.createPrimitiveDescription(AnalysisEngineFactory.java:229)
    at wikicounts.RunCountExperiment.run(RunCountExperiment.java:66)
    at wikicounts.RunCountExperiment.main(RunCountExperiment.java:27)
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:322)
    at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1020)
    at org.apache.uima.util.impl.SaxDeserializer_impl.startElement(SaxDeserializer_impl.java:202)
    at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
    at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
    at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:177)
    ... 6 more
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.xerces.dom.AttrNSImpl.setName(Unknown Source)
    at org.apache.xerces.dom.AttrNSImpl.<init>(Unknown Source)
    at org.apache.xerces.dom.CoreDocumentImpl.createAttributeNS(Unknown Source)
    at org.apache.xerces.dom.ElementImpl.setAttributeNS(Unknown Source)
    at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:307)
    ... 18 more
{noformat}
    

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (UIMA-2155) XML parsers coming with Sun JDK fail to parser UIMA XML descriptors

Posted by "Richard Eckart de Castilho (Commented) (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13150897#comment-13150897 ] 

Richard Eckart de Castilho commented on UIMA-2155:
--------------------------------------------------

Our workaround so far is to add an explicit dependency on Maven 2.7.1. The main problem is, that most people I know that experience this issue because some Xalan 2.6.0 is dragged in via some transitive Maven dependency and they have no idea what to do. That is why I hoped this problem could be addressed at the level of the UIMA framework, possibly by adding an explicit dependency.

I don't think the xmlns workaround should be implemented.
Adding an explicit dependency on Xalan 2.7.1 doesn't seem a good solution either.

The problem remains that people encounter this error message and potentially spend a lot of time trying to fix it without any luck.

Would it be a viable option to intercept the exception in UIMA, check if the message string contains the error code NAMESPACE_ERR and in the case suggest that either removing an old Xalan from the classpath in order to fall back to the version included in the JDK or upgrading to a newer version of Xalan should resolve the problem?

                
> XML parsers coming with Sun JDK fail to parser UIMA XML descriptors
> -------------------------------------------------------------------
>
>                 Key: UIMA-2155
>                 URL: https://issues.apache.org/jira/browse/UIMA-2155
>             Project: UIMA
>          Issue Type: Bug
>          Components: Core Java Framework
>            Reporter: Richard Eckart de Castilho
>         Attachments: testcase-UIMA-2155.zip
>
>
> Several people in our group that run Linux with the Sun JDK have run into problems that UIMA fails to parse descriptors unless Xerces 2.9.1 and Xalan 2.7.1. are on the classpath. 
> It might be a good idea to add these two as standard dependencies to uimaj-core. 
> {noformat}
> org.apache.uima.util.InvalidXMLException: Invalid descriptor at Chunks.xml.
>     at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:194)
>     at org.apache.uima.util.impl.XMLParser_impl.parseTypeSystemDescription(XMLParser_impl.java:708)
>     at org.apache.uima.util.impl.XMLParser_impl.parseTypeSystemDescription(XMLParser_impl.java:695)
>     at org.uimafit.factory.TypeSystemDescriptionFactory.createTypeSystemDescription(TypeSystemDescriptionFactory.java:145)
>     at org.uimafit.factory.AnalysisEngineFactory.createPrimitiveDescription(AnalysisEngineFactory.java:229)
>     at wikicounts.RunCountExperiment.run(RunCountExperiment.java:66)
>     at wikicounts.RunCountExperiment.main(RunCountExperiment.java:27)
> 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:322)
>     at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1020)
>     at org.apache.uima.util.impl.SaxDeserializer_impl.startElement(SaxDeserializer_impl.java:202)
>     at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
>     at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
>     at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
>     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
>     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
>     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>     at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>     at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>     at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:177)
>     ... 6 more
> 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.xerces.dom.AttrNSImpl.setName(Unknown Source)
>     at org.apache.xerces.dom.AttrNSImpl.<init>(Unknown Source)
>     at org.apache.xerces.dom.CoreDocumentImpl.createAttributeNS(Unknown Source)
>     at org.apache.xerces.dom.ElementImpl.setAttributeNS(Unknown Source)
>     at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:307)
>     ... 18 more
> {noformat}
>     

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (UIMA-2155) XML parsers coming with Sun JDK fail to parser UIMA XML descriptors

Posted by "Marshall Schor (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13089938#comment-13089938 ] 

Marshall Schor commented on UIMA-2155:
--------------------------------------

Richard- is this still an open issue?

> XML parsers coming with Sun JDK fail to parser UIMA XML descriptors
> -------------------------------------------------------------------
>
>                 Key: UIMA-2155
>                 URL: https://issues.apache.org/jira/browse/UIMA-2155
>             Project: UIMA
>          Issue Type: Bug
>          Components: Core Java Framework
>            Reporter: Richard Eckart de Castilho
>
> Several people in our group that run Linux with the Sun JDK have run into problems that UIMA fails to parse descriptors unless Xerces 2.9.1 and Xalan 2.7.1. are on the classpath. 
> It might be a good idea to add these two as standard dependencies to uimaj-core. 
> {noformat}
> org.apache.uima.util.InvalidXMLException: Invalid descriptor at Chunks.xml.
>     at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:194)
>     at org.apache.uima.util.impl.XMLParser_impl.parseTypeSystemDescription(XMLParser_impl.java:708)
>     at org.apache.uima.util.impl.XMLParser_impl.parseTypeSystemDescription(XMLParser_impl.java:695)
>     at org.uimafit.factory.TypeSystemDescriptionFactory.createTypeSystemDescription(TypeSystemDescriptionFactory.java:145)
>     at org.uimafit.factory.AnalysisEngineFactory.createPrimitiveDescription(AnalysisEngineFactory.java:229)
>     at wikicounts.RunCountExperiment.run(RunCountExperiment.java:66)
>     at wikicounts.RunCountExperiment.main(RunCountExperiment.java:27)
> 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:322)
>     at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1020)
>     at org.apache.uima.util.impl.SaxDeserializer_impl.startElement(SaxDeserializer_impl.java:202)
>     at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
>     at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
>     at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
>     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
>     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
>     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>     at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>     at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>     at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:177)
>     ... 6 more
> 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.xerces.dom.AttrNSImpl.setName(Unknown Source)
>     at org.apache.xerces.dom.AttrNSImpl.<init>(Unknown Source)
>     at org.apache.xerces.dom.CoreDocumentImpl.createAttributeNS(Unknown Source)
>     at org.apache.xerces.dom.ElementImpl.setAttributeNS(Unknown Source)
>     at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:307)
>     ... 18 more
> {noformat}
>     

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (UIMA-2155) XML parsers coming with Sun JDK fail to parser UIMA XML descriptors

Posted by "Richard Eckart de Castilho (Commented) (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13128700#comment-13128700 ] 

Richard Eckart de Castilho commented on UIMA-2155:
--------------------------------------------------

I had added a zip with a small example yesterday. It's a Maven project that contains everything to reproduce the problem (at least for me). It includes a descriptor and a JUnit test (without asserts, because the test fails be throwing an exception). The test is as basic as can be:

1) descriptor with a single annotation type
2) test which uses UIMAFramework to load the descriptor

For me it produces this stack trace:

{noformat}
org.apache.uima.util.InvalidXMLException: Invalid descriptor at file:/Users/bluefire/UKP/Workspaces/dkpro-primary/testcase-UIMA-2155/src/main/resources/typeSystemDescriptor.xml.
	at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:194)
	at org.apache.uima.util.impl.XMLParser_impl.parseTypeSystemDescription(XMLParser_impl.java:708)
	at org.apache.uima.util.impl.XMLParser_impl.parseTypeSystemDescription(XMLParser_impl.java:695)
	at tests.TestUima2155.test(TestUima2155.java:14)
	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:597)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
	at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
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:322)
	at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1020)
	at org.apache.uima.util.impl.SaxDeserializer_impl.startElement(SaxDeserializer_impl.java:202)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)
	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:400)
	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:626)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3103)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:922)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
	at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:177)
	... 26 more
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 com.sun.org.apache.xerces.internal.dom.AttrNSImpl.setName(AttrNSImpl.java:105)
	at com.sun.org.apache.xerces.internal.dom.AttrNSImpl.<init>(AttrNSImpl.java:74)
	at com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.createAttributeNS(CoreDocumentImpl.java:2138)
	at com.sun.org.apache.xerces.internal.dom.ElementImpl.setAttributeNS(ElementImpl.java:656)
	at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:307)
	... 42 more
{noformat}

>From the trace, I can see that the Apache Xalan from the Maven dependency is used in conjunction with the Xerces that comes with the JDK.
                
> XML parsers coming with Sun JDK fail to parser UIMA XML descriptors
> -------------------------------------------------------------------
>
>                 Key: UIMA-2155
>                 URL: https://issues.apache.org/jira/browse/UIMA-2155
>             Project: UIMA
>          Issue Type: Bug
>          Components: Core Java Framework
>            Reporter: Richard Eckart de Castilho
>         Attachments: testcase-UIMA-2155.zip
>
>
> Several people in our group that run Linux with the Sun JDK have run into problems that UIMA fails to parse descriptors unless Xerces 2.9.1 and Xalan 2.7.1. are on the classpath. 
> It might be a good idea to add these two as standard dependencies to uimaj-core. 
> {noformat}
> org.apache.uima.util.InvalidXMLException: Invalid descriptor at Chunks.xml.
>     at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:194)
>     at org.apache.uima.util.impl.XMLParser_impl.parseTypeSystemDescription(XMLParser_impl.java:708)
>     at org.apache.uima.util.impl.XMLParser_impl.parseTypeSystemDescription(XMLParser_impl.java:695)
>     at org.uimafit.factory.TypeSystemDescriptionFactory.createTypeSystemDescription(TypeSystemDescriptionFactory.java:145)
>     at org.uimafit.factory.AnalysisEngineFactory.createPrimitiveDescription(AnalysisEngineFactory.java:229)
>     at wikicounts.RunCountExperiment.run(RunCountExperiment.java:66)
>     at wikicounts.RunCountExperiment.main(RunCountExperiment.java:27)
> 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:322)
>     at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1020)
>     at org.apache.uima.util.impl.SaxDeserializer_impl.startElement(SaxDeserializer_impl.java:202)
>     at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
>     at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
>     at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
>     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
>     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
>     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>     at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>     at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>     at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:177)
>     ... 6 more
> 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.xerces.dom.AttrNSImpl.setName(Unknown Source)
>     at org.apache.xerces.dom.AttrNSImpl.<init>(Unknown Source)
>     at org.apache.xerces.dom.CoreDocumentImpl.createAttributeNS(Unknown Source)
>     at org.apache.xerces.dom.ElementImpl.setAttributeNS(Unknown Source)
>     at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:307)
>     ... 18 more
> {noformat}
>     

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (UIMA-2155) XML parsers coming with Sun JDK fail to parser UIMA XML descriptors

Posted by "Richard Eckart de Castilho (Commented) (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13150901#comment-13150901 ] 

Richard Eckart de Castilho commented on UIMA-2155:
--------------------------------------------------

It might also be an option to hardcode a test for this isse into the UIMA framework which kicks in the first time a type system is parsed (or maybe the first time an XML parser is created) failing with an explanatory exception. After all, UIMA is bound not to be able to work properly with its own XML files if this issue is present.
                
> XML parsers coming with Sun JDK fail to parser UIMA XML descriptors
> -------------------------------------------------------------------
>
>                 Key: UIMA-2155
>                 URL: https://issues.apache.org/jira/browse/UIMA-2155
>             Project: UIMA
>          Issue Type: Bug
>          Components: Core Java Framework
>            Reporter: Richard Eckart de Castilho
>         Attachments: testcase-UIMA-2155.zip
>
>
> Several people in our group that run Linux with the Sun JDK have run into problems that UIMA fails to parse descriptors unless Xerces 2.9.1 and Xalan 2.7.1. are on the classpath. 
> It might be a good idea to add these two as standard dependencies to uimaj-core. 
> {noformat}
> org.apache.uima.util.InvalidXMLException: Invalid descriptor at Chunks.xml.
>     at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:194)
>     at org.apache.uima.util.impl.XMLParser_impl.parseTypeSystemDescription(XMLParser_impl.java:708)
>     at org.apache.uima.util.impl.XMLParser_impl.parseTypeSystemDescription(XMLParser_impl.java:695)
>     at org.uimafit.factory.TypeSystemDescriptionFactory.createTypeSystemDescription(TypeSystemDescriptionFactory.java:145)
>     at org.uimafit.factory.AnalysisEngineFactory.createPrimitiveDescription(AnalysisEngineFactory.java:229)
>     at wikicounts.RunCountExperiment.run(RunCountExperiment.java:66)
>     at wikicounts.RunCountExperiment.main(RunCountExperiment.java:27)
> 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:322)
>     at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1020)
>     at org.apache.uima.util.impl.SaxDeserializer_impl.startElement(SaxDeserializer_impl.java:202)
>     at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
>     at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
>     at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
>     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
>     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
>     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>     at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>     at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>     at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:177)
>     ... 6 more
> 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.xerces.dom.AttrNSImpl.setName(Unknown Source)
>     at org.apache.xerces.dom.AttrNSImpl.<init>(Unknown Source)
>     at org.apache.xerces.dom.CoreDocumentImpl.createAttributeNS(Unknown Source)
>     at org.apache.xerces.dom.ElementImpl.setAttributeNS(Unknown Source)
>     at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:307)
>     ... 18 more
> {noformat}
>     

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (UIMA-2155) XML parsers coming with Sun JDK fail to parser UIMA XML descriptors

Posted by "Marshall Schor (Commented) (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13128581#comment-13128581 ] 

Marshall Schor commented on UIMA-2155:
--------------------------------------

Thanks for your persistence in tracking this down.  Do you have an example descriptor which fails to parse?  

The reason I ask is that I would like to be able to reproduce this error and confirm 2.6 doesn't work.  I looked at one Java I'm running (IBM 1.6, SR9 FP2) and ran the command "java org.apache.xalan.xslt.EnvironmentCheck" which said the xml related things were coming from the Java boot class path, in the jar "xml.jar", I looked into that jar, and found a /licenses/notices.txt which says in part that it includes Apache Xalan-Java v2.6.  

I'm not sure this information is reliable/definitive, and would like a better way to identify the version.  But if this is true, then it would seem to indicate the problem is elsewhere, because I don't see a problem running with the native  version of Xalan that comes with this Java.

So a small example which "fails" would be very useful in pinning this down.


                
> XML parsers coming with Sun JDK fail to parser UIMA XML descriptors
> -------------------------------------------------------------------
>
>                 Key: UIMA-2155
>                 URL: https://issues.apache.org/jira/browse/UIMA-2155
>             Project: UIMA
>          Issue Type: Bug
>          Components: Core Java Framework
>            Reporter: Richard Eckart de Castilho
>         Attachments: testcase-UIMA-2155.zip
>
>
> Several people in our group that run Linux with the Sun JDK have run into problems that UIMA fails to parse descriptors unless Xerces 2.9.1 and Xalan 2.7.1. are on the classpath. 
> It might be a good idea to add these two as standard dependencies to uimaj-core. 
> {noformat}
> org.apache.uima.util.InvalidXMLException: Invalid descriptor at Chunks.xml.
>     at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:194)
>     at org.apache.uima.util.impl.XMLParser_impl.parseTypeSystemDescription(XMLParser_impl.java:708)
>     at org.apache.uima.util.impl.XMLParser_impl.parseTypeSystemDescription(XMLParser_impl.java:695)
>     at org.uimafit.factory.TypeSystemDescriptionFactory.createTypeSystemDescription(TypeSystemDescriptionFactory.java:145)
>     at org.uimafit.factory.AnalysisEngineFactory.createPrimitiveDescription(AnalysisEngineFactory.java:229)
>     at wikicounts.RunCountExperiment.run(RunCountExperiment.java:66)
>     at wikicounts.RunCountExperiment.main(RunCountExperiment.java:27)
> 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:322)
>     at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1020)
>     at org.apache.uima.util.impl.SaxDeserializer_impl.startElement(SaxDeserializer_impl.java:202)
>     at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
>     at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
>     at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
>     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
>     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
>     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>     at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>     at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>     at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:177)
>     ... 6 more
> 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.xerces.dom.AttrNSImpl.setName(Unknown Source)
>     at org.apache.xerces.dom.AttrNSImpl.<init>(Unknown Source)
>     at org.apache.xerces.dom.CoreDocumentImpl.createAttributeNS(Unknown Source)
>     at org.apache.xerces.dom.ElementImpl.setAttributeNS(Unknown Source)
>     at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:307)
>     ... 18 more
> {noformat}
>     

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (UIMA-2155) XML parsers coming with Sun JDK fail to parser UIMA XML descriptors

Posted by "Richard Eckart de Castilho (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13091018#comment-13091018 ] 

Richard Eckart de Castilho commented on UIMA-2155:
--------------------------------------------------

It comes up every once in a while. As far as I understand, UIMA-1334 was solved without introducing a versioned dependency of UIMA on Xalan and Xerces, so I'll assume it's not fixed. I don't have a test case at hand though.

> XML parsers coming with Sun JDK fail to parser UIMA XML descriptors
> -------------------------------------------------------------------
>
>                 Key: UIMA-2155
>                 URL: https://issues.apache.org/jira/browse/UIMA-2155
>             Project: UIMA
>          Issue Type: Bug
>          Components: Core Java Framework
>            Reporter: Richard Eckart de Castilho
>
> Several people in our group that run Linux with the Sun JDK have run into problems that UIMA fails to parse descriptors unless Xerces 2.9.1 and Xalan 2.7.1. are on the classpath. 
> It might be a good idea to add these two as standard dependencies to uimaj-core. 
> {noformat}
> org.apache.uima.util.InvalidXMLException: Invalid descriptor at Chunks.xml.
>     at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:194)
>     at org.apache.uima.util.impl.XMLParser_impl.parseTypeSystemDescription(XMLParser_impl.java:708)
>     at org.apache.uima.util.impl.XMLParser_impl.parseTypeSystemDescription(XMLParser_impl.java:695)
>     at org.uimafit.factory.TypeSystemDescriptionFactory.createTypeSystemDescription(TypeSystemDescriptionFactory.java:145)
>     at org.uimafit.factory.AnalysisEngineFactory.createPrimitiveDescription(AnalysisEngineFactory.java:229)
>     at wikicounts.RunCountExperiment.run(RunCountExperiment.java:66)
>     at wikicounts.RunCountExperiment.main(RunCountExperiment.java:27)
> 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:322)
>     at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1020)
>     at org.apache.uima.util.impl.SaxDeserializer_impl.startElement(SaxDeserializer_impl.java:202)
>     at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
>     at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
>     at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
>     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
>     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
>     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>     at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>     at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>     at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:177)
>     ... 6 more
> 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.xerces.dom.AttrNSImpl.setName(Unknown Source)
>     at org.apache.xerces.dom.AttrNSImpl.<init>(Unknown Source)
>     at org.apache.xerces.dom.CoreDocumentImpl.createAttributeNS(Unknown Source)
>     at org.apache.xerces.dom.ElementImpl.setAttributeNS(Unknown Source)
>     at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:307)
>     ... 18 more
> {noformat}
>     

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (UIMA-2155) XALAN 2.6.0 overriding normal Java transformer factory in some JVMs causes UIMA XML parser failures

Posted by "Marshall Schor (Closed) (JIRA)" <de...@uima.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-2155?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marshall Schor closed UIMA-2155.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.4.0SDK

The fix tests for this failure when the sax deserializer is constructed, and if found, sets a flag which invokes the work-around, which otherwise, is not used.
                
> XALAN 2.6.0 overriding normal Java transformer factory in some JVMs causes UIMA XML parser failures
> ---------------------------------------------------------------------------------------------------
>
>                 Key: UIMA-2155
>                 URL: https://issues.apache.org/jira/browse/UIMA-2155
>             Project: UIMA
>          Issue Type: Bug
>          Components: Core Java Framework
>            Reporter: Richard Eckart de Castilho
>            Assignee: Marshall Schor
>             Fix For: 2.4.0SDK
>
>         Attachments: testcase-UIMA-2155.zip
>
>
> Several people in our group that run Linux with the Sun JDK have run into problems that UIMA fails to parse descriptors unless Xerces 2.9.1 and Xalan 2.7.1. are on the classpath. 
> It might be a good idea to add these two as standard dependencies to uimaj-core. 
> {noformat}
> org.apache.uima.util.InvalidXMLException: Invalid descriptor at Chunks.xml.
>     at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:194)
>     at org.apache.uima.util.impl.XMLParser_impl.parseTypeSystemDescription(XMLParser_impl.java:708)
>     at org.apache.uima.util.impl.XMLParser_impl.parseTypeSystemDescription(XMLParser_impl.java:695)
>     at org.uimafit.factory.TypeSystemDescriptionFactory.createTypeSystemDescription(TypeSystemDescriptionFactory.java:145)
>     at org.uimafit.factory.AnalysisEngineFactory.createPrimitiveDescription(AnalysisEngineFactory.java:229)
>     at wikicounts.RunCountExperiment.run(RunCountExperiment.java:66)
>     at wikicounts.RunCountExperiment.main(RunCountExperiment.java:27)
> 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:322)
>     at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1020)
>     at org.apache.uima.util.impl.SaxDeserializer_impl.startElement(SaxDeserializer_impl.java:202)
>     at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
>     at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
>     at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
>     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
>     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
>     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>     at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>     at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>     at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:177)
>     ... 6 more
> 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.xerces.dom.AttrNSImpl.setName(Unknown Source)
>     at org.apache.xerces.dom.AttrNSImpl.<init>(Unknown Source)
>     at org.apache.xerces.dom.CoreDocumentImpl.createAttributeNS(Unknown Source)
>     at org.apache.xerces.dom.ElementImpl.setAttributeNS(Unknown Source)
>     at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:307)
>     ... 18 more
> {noformat}
>     

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (UIMA-2155) XML parsers coming with Sun JDK fail to parser UIMA XML descriptors

Posted by "Richard Eckart de Castilho (Updated) (JIRA)" <de...@uima.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-2155?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard Eckart de Castilho updated UIMA-2155:
---------------------------------------------

    Attachment: testcase-UIMA-2155.zip

I have come across the problem again and this time was able to track it down. UIMA has problems parsing type description files if Xalan 2.6.0 is on the classpath. With Xalan 2.7.0 and newer, it works.

Would it be an option to add a dependency to Xalan > 2.6.0 to UIMA? 
                
> XML parsers coming with Sun JDK fail to parser UIMA XML descriptors
> -------------------------------------------------------------------
>
>                 Key: UIMA-2155
>                 URL: https://issues.apache.org/jira/browse/UIMA-2155
>             Project: UIMA
>          Issue Type: Bug
>          Components: Core Java Framework
>            Reporter: Richard Eckart de Castilho
>         Attachments: testcase-UIMA-2155.zip
>
>
> Several people in our group that run Linux with the Sun JDK have run into problems that UIMA fails to parse descriptors unless Xerces 2.9.1 and Xalan 2.7.1. are on the classpath. 
> It might be a good idea to add these two as standard dependencies to uimaj-core. 
> {noformat}
> org.apache.uima.util.InvalidXMLException: Invalid descriptor at Chunks.xml.
>     at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:194)
>     at org.apache.uima.util.impl.XMLParser_impl.parseTypeSystemDescription(XMLParser_impl.java:708)
>     at org.apache.uima.util.impl.XMLParser_impl.parseTypeSystemDescription(XMLParser_impl.java:695)
>     at org.uimafit.factory.TypeSystemDescriptionFactory.createTypeSystemDescription(TypeSystemDescriptionFactory.java:145)
>     at org.uimafit.factory.AnalysisEngineFactory.createPrimitiveDescription(AnalysisEngineFactory.java:229)
>     at wikicounts.RunCountExperiment.run(RunCountExperiment.java:66)
>     at wikicounts.RunCountExperiment.main(RunCountExperiment.java:27)
> 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:322)
>     at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1020)
>     at org.apache.uima.util.impl.SaxDeserializer_impl.startElement(SaxDeserializer_impl.java:202)
>     at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
>     at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
>     at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
>     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
>     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
>     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>     at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>     at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>     at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:177)
>     ... 6 more
> 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.xerces.dom.AttrNSImpl.setName(Unknown Source)
>     at org.apache.xerces.dom.AttrNSImpl.<init>(Unknown Source)
>     at org.apache.xerces.dom.CoreDocumentImpl.createAttributeNS(Unknown Source)
>     at org.apache.xerces.dom.ElementImpl.setAttributeNS(Unknown Source)
>     at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:307)
>     ... 18 more
> {noformat}
>     

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (UIMA-2155) XML parsers coming with Sun JDK fail to parser UIMA XML descriptors

Posted by "Marshall Schor (Commented) (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13151032#comment-13151032 ] 

Marshall Schor commented on UIMA-2155:
--------------------------------------

Thanks, Richard.  I think, based on your suggestion, that I will do something like add a try/catch for this error, and only if it happens, insert the little bit of code that scan/alters the xmlns attribute, to avoid this issue with XALAN 2.6.0.  That way, there's no slow down for the rest of the cases.  And, from the user point of view, this issue would just "go away"...  which, I think, improves the "consumability" of UIMA.
                
> XML parsers coming with Sun JDK fail to parser UIMA XML descriptors
> -------------------------------------------------------------------
>
>                 Key: UIMA-2155
>                 URL: https://issues.apache.org/jira/browse/UIMA-2155
>             Project: UIMA
>          Issue Type: Bug
>          Components: Core Java Framework
>            Reporter: Richard Eckart de Castilho
>         Attachments: testcase-UIMA-2155.zip
>
>
> Several people in our group that run Linux with the Sun JDK have run into problems that UIMA fails to parse descriptors unless Xerces 2.9.1 and Xalan 2.7.1. are on the classpath. 
> It might be a good idea to add these two as standard dependencies to uimaj-core. 
> {noformat}
> org.apache.uima.util.InvalidXMLException: Invalid descriptor at Chunks.xml.
>     at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:194)
>     at org.apache.uima.util.impl.XMLParser_impl.parseTypeSystemDescription(XMLParser_impl.java:708)
>     at org.apache.uima.util.impl.XMLParser_impl.parseTypeSystemDescription(XMLParser_impl.java:695)
>     at org.uimafit.factory.TypeSystemDescriptionFactory.createTypeSystemDescription(TypeSystemDescriptionFactory.java:145)
>     at org.uimafit.factory.AnalysisEngineFactory.createPrimitiveDescription(AnalysisEngineFactory.java:229)
>     at wikicounts.RunCountExperiment.run(RunCountExperiment.java:66)
>     at wikicounts.RunCountExperiment.main(RunCountExperiment.java:27)
> 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:322)
>     at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1020)
>     at org.apache.uima.util.impl.SaxDeserializer_impl.startElement(SaxDeserializer_impl.java:202)
>     at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
>     at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
>     at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
>     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
>     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
>     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>     at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>     at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>     at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:177)
>     ... 6 more
> 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.xerces.dom.AttrNSImpl.setName(Unknown Source)
>     at org.apache.xerces.dom.AttrNSImpl.<init>(Unknown Source)
>     at org.apache.xerces.dom.CoreDocumentImpl.createAttributeNS(Unknown Source)
>     at org.apache.xerces.dom.ElementImpl.setAttributeNS(Unknown Source)
>     at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:307)
>     ... 18 more
> {noformat}
>     

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (UIMA-2155) XML parsers coming with Sun JDK fail to parser UIMA XML descriptors

Posted by "Marshall Schor (Commented) (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13150875#comment-13150875 ] 

Marshall Schor commented on UIMA-2155:
--------------------------------------

I was able to reproduce this, given the zipped test case, when using Sun Java (IBM Java worked OK, but probably because adding the XALAN 2.6.0 maven dependency didn't have any effect).  

I found a way to work around this apparent bug in 2.6.0 XALAN (which dates from 2005).  I confirmed, also, that switching the XALAN dependency to 2.7.1 doesn't show this problem.

However, 2.7.1 is the "latest" version of XALAN, and dates from 2008.  
Both of these versions make another uimaj-core test case (which tests for serialization using the XML 1.1 standard) fail (that standard came into existence after 2008, I think).

Modern Java implementations (Sun and IBM are the 2 I checked) have their own versions of this, which pass the XML 1.1 serialization test as well as not having the NAMESPACE_ERR issue.  

The work around in UIMA for this bug is to scan the attributes in the "startElement" method of the SAX parsing, and if the attribute "xmlns" is found, to make it have it's URI default namespace as well.  This scanning would slightly slow parsing down, so I'm not sure we want to put it in.

The other work-around appears to be something like: use a modern Java implementation, and remove any XALAN jars from the classpath, allowing the more modern version packaged within Java itself, to be used. *_Can those who are experiencing this difficulty, comment further on this issue, saying if they can do this workaround, or if they really need the inside-UIMA-hack-for-xmlns-attribute workaround?_*
                
> XML parsers coming with Sun JDK fail to parser UIMA XML descriptors
> -------------------------------------------------------------------
>
>                 Key: UIMA-2155
>                 URL: https://issues.apache.org/jira/browse/UIMA-2155
>             Project: UIMA
>          Issue Type: Bug
>          Components: Core Java Framework
>            Reporter: Richard Eckart de Castilho
>         Attachments: testcase-UIMA-2155.zip
>
>
> Several people in our group that run Linux with the Sun JDK have run into problems that UIMA fails to parse descriptors unless Xerces 2.9.1 and Xalan 2.7.1. are on the classpath. 
> It might be a good idea to add these two as standard dependencies to uimaj-core. 
> {noformat}
> org.apache.uima.util.InvalidXMLException: Invalid descriptor at Chunks.xml.
>     at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:194)
>     at org.apache.uima.util.impl.XMLParser_impl.parseTypeSystemDescription(XMLParser_impl.java:708)
>     at org.apache.uima.util.impl.XMLParser_impl.parseTypeSystemDescription(XMLParser_impl.java:695)
>     at org.uimafit.factory.TypeSystemDescriptionFactory.createTypeSystemDescription(TypeSystemDescriptionFactory.java:145)
>     at org.uimafit.factory.AnalysisEngineFactory.createPrimitiveDescription(AnalysisEngineFactory.java:229)
>     at wikicounts.RunCountExperiment.run(RunCountExperiment.java:66)
>     at wikicounts.RunCountExperiment.main(RunCountExperiment.java:27)
> 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:322)
>     at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1020)
>     at org.apache.uima.util.impl.SaxDeserializer_impl.startElement(SaxDeserializer_impl.java:202)
>     at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
>     at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
>     at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
>     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
>     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
>     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>     at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>     at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>     at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:177)
>     ... 6 more
> 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.xerces.dom.AttrNSImpl.setName(Unknown Source)
>     at org.apache.xerces.dom.AttrNSImpl.<init>(Unknown Source)
>     at org.apache.xerces.dom.CoreDocumentImpl.createAttributeNS(Unknown Source)
>     at org.apache.xerces.dom.ElementImpl.setAttributeNS(Unknown Source)
>     at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:307)
>     ... 18 more
> {noformat}
>     

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (UIMA-2155) XALAN 2.6.0 overriding normal Java transformer factory in some JVMs causes UIMA XML parser failures

Posted by "Marshall Schor (Updated) (JIRA)" <de...@uima.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-2155?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marshall Schor updated UIMA-2155:
---------------------------------

    Assignee: Marshall Schor
     Summary: XALAN 2.6.0 overriding normal Java transformer factory in some JVMs causes UIMA XML parser failures  (was: XML parsers coming with Sun JDK fail to parser UIMA XML descriptors)

Fixed the title to be (I hope) more accurate
                
> XALAN 2.6.0 overriding normal Java transformer factory in some JVMs causes UIMA XML parser failures
> ---------------------------------------------------------------------------------------------------
>
>                 Key: UIMA-2155
>                 URL: https://issues.apache.org/jira/browse/UIMA-2155
>             Project: UIMA
>          Issue Type: Bug
>          Components: Core Java Framework
>            Reporter: Richard Eckart de Castilho
>            Assignee: Marshall Schor
>         Attachments: testcase-UIMA-2155.zip
>
>
> Several people in our group that run Linux with the Sun JDK have run into problems that UIMA fails to parse descriptors unless Xerces 2.9.1 and Xalan 2.7.1. are on the classpath. 
> It might be a good idea to add these two as standard dependencies to uimaj-core. 
> {noformat}
> org.apache.uima.util.InvalidXMLException: Invalid descriptor at Chunks.xml.
>     at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:194)
>     at org.apache.uima.util.impl.XMLParser_impl.parseTypeSystemDescription(XMLParser_impl.java:708)
>     at org.apache.uima.util.impl.XMLParser_impl.parseTypeSystemDescription(XMLParser_impl.java:695)
>     at org.uimafit.factory.TypeSystemDescriptionFactory.createTypeSystemDescription(TypeSystemDescriptionFactory.java:145)
>     at org.uimafit.factory.AnalysisEngineFactory.createPrimitiveDescription(AnalysisEngineFactory.java:229)
>     at wikicounts.RunCountExperiment.run(RunCountExperiment.java:66)
>     at wikicounts.RunCountExperiment.main(RunCountExperiment.java:27)
> 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:322)
>     at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1020)
>     at org.apache.uima.util.impl.SaxDeserializer_impl.startElement(SaxDeserializer_impl.java:202)
>     at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
>     at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
>     at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
>     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
>     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
>     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>     at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>     at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>     at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:177)
>     ... 6 more
> 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.xerces.dom.AttrNSImpl.setName(Unknown Source)
>     at org.apache.xerces.dom.AttrNSImpl.<init>(Unknown Source)
>     at org.apache.xerces.dom.CoreDocumentImpl.createAttributeNS(Unknown Source)
>     at org.apache.xerces.dom.ElementImpl.setAttributeNS(Unknown Source)
>     at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:307)
>     ... 18 more
> {noformat}
>     

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Re: [jira] [Commented] (UIMA-2155) XALAN 2.6.0 overriding normal Java transformer factory in some JVMs causes UIMA XML parser failures

Posted by Marshall Schor <ms...@schor.com>.
great minds think alike.

I had already included a pointer to the jira, plus some comments about this
strange bit of code...  -Marshall

On 11/16/2011 3:30 AM, Joern Kottmann (Commented) (JIRA) wrote:
>     [ https://issues.apache.org/jira/browse/UIMA-2155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13151086#comment-13151086 ] 
>
> Joern Kottmann commented on UIMA-2155:
> --------------------------------------
>
> Please provide a pointer in the code to this issue, so people can understand why we are doing that.
>                 
>> XALAN 2.6.0 overriding normal Java transformer factory in some JVMs causes UIMA XML parser failures
>> ---------------------------------------------------------------------------------------------------
>>
>>                 Key: UIMA-2155
>>                 URL: https://issues.apache.org/jira/browse/UIMA-2155
>>             Project: UIMA
>>          Issue Type: Bug
>>          Components: Core Java Framework
>>            Reporter: Richard Eckart de Castilho
>>            Assignee: Marshall Schor
>>         Attachments: testcase-UIMA-2155.zip
>>
>>
>> Several people in our group that run Linux with the Sun JDK have run into problems that UIMA fails to parse descriptors unless Xerces 2.9.1 and Xalan 2.7.1. are on the classpath. 
>> It might be a good idea to add these two as standard dependencies to uimaj-core. 
>> {noformat}
>> org.apache.uima.util.InvalidXMLException: Invalid descriptor at Chunks.xml.
>>     at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:194)
>>     at org.apache.uima.util.impl.XMLParser_impl.parseTypeSystemDescription(XMLParser_impl.java:708)
>>     at org.apache.uima.util.impl.XMLParser_impl.parseTypeSystemDescription(XMLParser_impl.java:695)
>>     at org.uimafit.factory.TypeSystemDescriptionFactory.createTypeSystemDescription(TypeSystemDescriptionFactory.java:145)
>>     at org.uimafit.factory.AnalysisEngineFactory.createPrimitiveDescription(AnalysisEngineFactory.java:229)
>>     at wikicounts.RunCountExperiment.run(RunCountExperiment.java:66)
>>     at wikicounts.RunCountExperiment.main(RunCountExperiment.java:27)
>> 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:322)
>>     at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1020)
>>     at org.apache.uima.util.impl.SaxDeserializer_impl.startElement(SaxDeserializer_impl.java:202)
>>     at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
>>     at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
>>     at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
>>     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
>>     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
>>     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>>     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>>     at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>>     at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>>     at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:177)
>>     ... 6 more
>> 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.xerces.dom.AttrNSImpl.setName(Unknown Source)
>>     at org.apache.xerces.dom.AttrNSImpl.<init>(Unknown Source)
>>     at org.apache.xerces.dom.CoreDocumentImpl.createAttributeNS(Unknown Source)
>>     at org.apache.xerces.dom.ElementImpl.setAttributeNS(Unknown Source)
>>     at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:307)
>>     ... 18 more
>> {noformat}
>>     
> --
> This message is automatically generated by JIRA.
> If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>         
>

[jira] [Commented] (UIMA-2155) XALAN 2.6.0 overriding normal Java transformer factory in some JVMs causes UIMA XML parser failures

Posted by "Joern Kottmann (Commented) (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13151086#comment-13151086 ] 

Joern Kottmann commented on UIMA-2155:
--------------------------------------

Please provide a pointer in the code to this issue, so people can understand why we are doing that.
                
> XALAN 2.6.0 overriding normal Java transformer factory in some JVMs causes UIMA XML parser failures
> ---------------------------------------------------------------------------------------------------
>
>                 Key: UIMA-2155
>                 URL: https://issues.apache.org/jira/browse/UIMA-2155
>             Project: UIMA
>          Issue Type: Bug
>          Components: Core Java Framework
>            Reporter: Richard Eckart de Castilho
>            Assignee: Marshall Schor
>         Attachments: testcase-UIMA-2155.zip
>
>
> Several people in our group that run Linux with the Sun JDK have run into problems that UIMA fails to parse descriptors unless Xerces 2.9.1 and Xalan 2.7.1. are on the classpath. 
> It might be a good idea to add these two as standard dependencies to uimaj-core. 
> {noformat}
> org.apache.uima.util.InvalidXMLException: Invalid descriptor at Chunks.xml.
>     at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:194)
>     at org.apache.uima.util.impl.XMLParser_impl.parseTypeSystemDescription(XMLParser_impl.java:708)
>     at org.apache.uima.util.impl.XMLParser_impl.parseTypeSystemDescription(XMLParser_impl.java:695)
>     at org.uimafit.factory.TypeSystemDescriptionFactory.createTypeSystemDescription(TypeSystemDescriptionFactory.java:145)
>     at org.uimafit.factory.AnalysisEngineFactory.createPrimitiveDescription(AnalysisEngineFactory.java:229)
>     at wikicounts.RunCountExperiment.run(RunCountExperiment.java:66)
>     at wikicounts.RunCountExperiment.main(RunCountExperiment.java:27)
> 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:322)
>     at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1020)
>     at org.apache.uima.util.impl.SaxDeserializer_impl.startElement(SaxDeserializer_impl.java:202)
>     at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
>     at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
>     at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
>     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
>     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
>     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>     at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>     at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>     at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:177)
>     ... 6 more
> 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.xerces.dom.AttrNSImpl.setName(Unknown Source)
>     at org.apache.xerces.dom.AttrNSImpl.<init>(Unknown Source)
>     at org.apache.xerces.dom.CoreDocumentImpl.createAttributeNS(Unknown Source)
>     at org.apache.xerces.dom.ElementImpl.setAttributeNS(Unknown Source)
>     at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:307)
>     ... 18 more
> {noformat}
>     

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (UIMA-2155) XML parsers coming with Sun JDK fail to parser UIMA XML descriptors

Posted by "Marshall Schor (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13091051#comment-13091051 ] 

Marshall Schor commented on UIMA-2155:
--------------------------------------

It may be, however, a "correct" error message.  See http://stackoverflow.com/questions/4037125/namespace-err-an-attempt-is-made-to-create-or-change-an-object-in-a-way-which-is for an example. 

I would like to capture a current reproducible instance of this; can anyone find one?

> XML parsers coming with Sun JDK fail to parser UIMA XML descriptors
> -------------------------------------------------------------------
>
>                 Key: UIMA-2155
>                 URL: https://issues.apache.org/jira/browse/UIMA-2155
>             Project: UIMA
>          Issue Type: Bug
>          Components: Core Java Framework
>            Reporter: Richard Eckart de Castilho
>
> Several people in our group that run Linux with the Sun JDK have run into problems that UIMA fails to parse descriptors unless Xerces 2.9.1 and Xalan 2.7.1. are on the classpath. 
> It might be a good idea to add these two as standard dependencies to uimaj-core. 
> {noformat}
> org.apache.uima.util.InvalidXMLException: Invalid descriptor at Chunks.xml.
>     at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:194)
>     at org.apache.uima.util.impl.XMLParser_impl.parseTypeSystemDescription(XMLParser_impl.java:708)
>     at org.apache.uima.util.impl.XMLParser_impl.parseTypeSystemDescription(XMLParser_impl.java:695)
>     at org.uimafit.factory.TypeSystemDescriptionFactory.createTypeSystemDescription(TypeSystemDescriptionFactory.java:145)
>     at org.uimafit.factory.AnalysisEngineFactory.createPrimitiveDescription(AnalysisEngineFactory.java:229)
>     at wikicounts.RunCountExperiment.run(RunCountExperiment.java:66)
>     at wikicounts.RunCountExperiment.main(RunCountExperiment.java:27)
> 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:322)
>     at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1020)
>     at org.apache.uima.util.impl.SaxDeserializer_impl.startElement(SaxDeserializer_impl.java:202)
>     at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
>     at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
>     at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
>     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
>     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
>     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>     at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>     at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>     at org.apache.uima.util.impl.XMLParser_impl.parse(XMLParser_impl.java:177)
>     ... 6 more
> 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.xerces.dom.AttrNSImpl.setName(Unknown Source)
>     at org.apache.xerces.dom.AttrNSImpl.<init>(Unknown Source)
>     at org.apache.xerces.dom.CoreDocumentImpl.createAttributeNS(Unknown Source)
>     at org.apache.xerces.dom.ElementImpl.setAttributeNS(Unknown Source)
>     at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:307)
>     ... 18 more
> {noformat}
>     

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira