You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Kristian Rosenvold <kr...@apache.org> on 2015/06/24 12:08:00 UTC

[io] xml parser blues :)

BOMInputStreamTest#testReadXmlWithoutBOMUtf32Be and 3 others fail in "site"
generation but not regular unit tests.

I have identified that the problem is happening because
xercesImpl/2.4.0/xercesImpl-2.4.0.jar is creeping in during site build

With regular unit tests it picks up
rt.jar!/com/sun/org/apache/xerces/internal/jaxp/DocumentBuilderImpl.class
which seems to understand UTF_32BE. Upgrading to xercesImpl-2.11.0 does not
seem to fix the problem either ?

We're looking at:

Re: [io] xml parser blues :)

Posted by Kristian Rosenvold <kr...@gmail.com>.
That worked like a charm, great stuff. Thanks a lot !

Kristian


2015-06-24 17:46 GMT+02:00 sebb <se...@gmail.com>:

> I added the following to the surefire configuration section in the pom:
>
>           <classpathDependencyExcludes>
>
> <classpathDependencyExclude>xerces:xercesImpl</classpathDependencyExclude>
>           </classpathDependencyExcludes>
>
> This worked for me.
>
>
> On 24 June 2015 at 11:57, sebb <se...@gmail.com> wrote:
> > On 24 June 2015 at 11:09, Kristian Rosenvold <kr...@apache.org>
> wrote:
> >> (sorry, wrong keyboard shortcut)
> >>
> >> Invalid encoding name "UTF_32BE".
> >> org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 42; Invalid
> >> encoding name "UTF_32BE".
> >> at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
> >> at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
> >> at
> >>
> org.apache.commons.io.input.BOMInputStreamTest.parseXml(BOMInputStreamTest.java:170)
> >> at
> >>
> org.apache.commons.io.input.BOMInputStreamTest.testReadXmlWithoutBOMUtf32Be(BOMInputStreamTest.java:208)
> >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >> at
> >>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> >> at
> >>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >> at java.lang.reflect.Method.invoke(Method.java:483)
> >> at
> >>
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> >> at
> >>
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> >> at
> >>
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> >> at
> >>
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> >> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
> >> at
> >>
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
> >> at
> >>
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
> >> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> >> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> >> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> >> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> >> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
> >> at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> >> at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
> >> at
> >>
> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:88)
> >> at
> >>
> com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:228)
> >> at
> com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
> >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >> at
> >>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> >> at
> >>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >> at java.lang.reflect.Method.invoke(Method.java:483)
> >> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
> >>
> >> Does anyone have any clue as to how I can fix this ?
> >
> > Does it happen with all Java versions?
> > What version of Maven are you using?
> >
> >> Kristian
> >>
> >>
> >> 2015-06-24 12:08 GMT+02:00 Kristian Rosenvold <kr...@apache.org>:
> >>
> >>> BOMInputStreamTest#testReadXmlWithoutBOMUtf32Be and 3 others fail in
> >>> "site" generation but not regular unit tests.
> >>>
> >>> I have identified that the problem is happening because
> >>> xercesImpl/2.4.0/xercesImpl-2.4.0.jar is creeping in during site build
> >>>
> >>> With regular unit tests it picks up
> >>>
> rt.jar!/com/sun/org/apache/xerces/internal/jaxp/DocumentBuilderImpl.class
> >>> which seems to understand UTF_32BE. Upgrading to xercesImpl-2.11.0
> does not
> >>> seem to fix the problem either ?
> >>>
> >>> We're looking at:
> >>>
> >>>
> >>>
> >>>
> >>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

Re: [io] xml parser blues :)

Posted by sebb <se...@gmail.com>.
I added the following to the surefire configuration section in the pom:

          <classpathDependencyExcludes>
            <classpathDependencyExclude>xerces:xercesImpl</classpathDependencyExclude>
          </classpathDependencyExcludes>

This worked for me.


On 24 June 2015 at 11:57, sebb <se...@gmail.com> wrote:
> On 24 June 2015 at 11:09, Kristian Rosenvold <kr...@apache.org> wrote:
>> (sorry, wrong keyboard shortcut)
>>
>> Invalid encoding name "UTF_32BE".
>> org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 42; Invalid
>> encoding name "UTF_32BE".
>> at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
>> at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
>> at
>> org.apache.commons.io.input.BOMInputStreamTest.parseXml(BOMInputStreamTest.java:170)
>> at
>> org.apache.commons.io.input.BOMInputStreamTest.testReadXmlWithoutBOMUtf32Be(BOMInputStreamTest.java:208)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> at java.lang.reflect.Method.invoke(Method.java:483)
>> at
>> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>> at
>> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>> at
>> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>> at
>> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
>> at
>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
>> at
>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
>> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
>> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
>> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
>> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
>> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
>> at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
>> at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
>> at
>> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:88)
>> at
>> com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:228)
>> at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> at java.lang.reflect.Method.invoke(Method.java:483)
>> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
>>
>> Does anyone have any clue as to how I can fix this ?
>
> Does it happen with all Java versions?
> What version of Maven are you using?
>
>> Kristian
>>
>>
>> 2015-06-24 12:08 GMT+02:00 Kristian Rosenvold <kr...@apache.org>:
>>
>>> BOMInputStreamTest#testReadXmlWithoutBOMUtf32Be and 3 others fail in
>>> "site" generation but not regular unit tests.
>>>
>>> I have identified that the problem is happening because
>>> xercesImpl/2.4.0/xercesImpl-2.4.0.jar is creeping in during site build
>>>
>>> With regular unit tests it picks up
>>> rt.jar!/com/sun/org/apache/xerces/internal/jaxp/DocumentBuilderImpl.class
>>> which seems to understand UTF_32BE. Upgrading to xercesImpl-2.11.0 does not
>>> seem to fix the problem either ?
>>>
>>> We're looking at:
>>>
>>>
>>>
>>>
>>>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [io] xml parser blues :)

Posted by sebb <se...@gmail.com>.
On 24 June 2015 at 11:09, Kristian Rosenvold <kr...@apache.org> wrote:
> (sorry, wrong keyboard shortcut)
>
> Invalid encoding name "UTF_32BE".
> org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 42; Invalid
> encoding name "UTF_32BE".
> at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
> at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
> at
> org.apache.commons.io.input.BOMInputStreamTest.parseXml(BOMInputStreamTest.java:170)
> at
> org.apache.commons.io.input.BOMInputStreamTest.testReadXmlWithoutBOMUtf32Be(BOMInputStreamTest.java:208)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:483)
> at
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> at
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> at
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
> at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
> at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
> at
> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:88)
> at
> com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:228)
> at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:483)
> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
>
> Does anyone have any clue as to how I can fix this ?

Does it happen with all Java versions?
What version of Maven are you using?

> Kristian
>
>
> 2015-06-24 12:08 GMT+02:00 Kristian Rosenvold <kr...@apache.org>:
>
>> BOMInputStreamTest#testReadXmlWithoutBOMUtf32Be and 3 others fail in
>> "site" generation but not regular unit tests.
>>
>> I have identified that the problem is happening because
>> xercesImpl/2.4.0/xercesImpl-2.4.0.jar is creeping in during site build
>>
>> With regular unit tests it picks up
>> rt.jar!/com/sun/org/apache/xerces/internal/jaxp/DocumentBuilderImpl.class
>> which seems to understand UTF_32BE. Upgrading to xercesImpl-2.11.0 does not
>> seem to fix the problem either ?
>>
>> We're looking at:
>>
>>
>>
>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [io] xml parser blues :)

Posted by Kristian Rosenvold <kr...@apache.org>.
(sorry, wrong keyboard shortcut)

Invalid encoding name "UTF_32BE".
org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 42; Invalid
encoding name "UTF_32BE".
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at
org.apache.commons.io.input.BOMInputStreamTest.parseXml(BOMInputStreamTest.java:170)
at
org.apache.commons.io.input.BOMInputStreamTest.testReadXmlWithoutBOMUtf32Be(BOMInputStreamTest.java:208)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at
com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:88)
at
com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:228)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)

Does anyone have any clue as to how I can fix this ?

Kristian


2015-06-24 12:08 GMT+02:00 Kristian Rosenvold <kr...@apache.org>:

> BOMInputStreamTest#testReadXmlWithoutBOMUtf32Be and 3 others fail in
> "site" generation but not regular unit tests.
>
> I have identified that the problem is happening because
> xercesImpl/2.4.0/xercesImpl-2.4.0.jar is creeping in during site build
>
> With regular unit tests it picks up
> rt.jar!/com/sun/org/apache/xerces/internal/jaxp/DocumentBuilderImpl.class
> which seems to understand UTF_32BE. Upgrading to xercesImpl-2.11.0 does not
> seem to fix the problem either ?
>
> We're looking at:
>
>
>
>
>