Oracle Java 8u161 regression in XML Schema Factory
Bernd
ecki at zusammenkunft.net
Tue Feb 13 21:55:29 UTC 2018
Hello,
2018-01-25 17:41 GMT+01:00 Seán Coffey <sean.coffey at oracle.com>:
>
> Classes nearer to those below were touched via JDK-8186080: Transform XML
> interfaces
> http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/rev/cb84156d54b2
> http://hg.openjdk.java.net/jdk8u/jdk8u/jaxp/rev/08a44c164993
>
> This may be connected with some tools trying to redefine the classes
> perhaps. Needs more investigating. Perhaps the XMLSchemaLoader changes are
> a factor ?
>
I have ben able to extract a minimal reproducer. It is not related to
XMLUnit, only to powermock. If it instruments com.sun but not javax.xml
(and other combinations) then it fails.
For details see the readme in this maven project:
https://github.com/ecki/reproduce-schemaex
I also found a way to make it work with both versions, so its no longer an
issue for me, but there is definitely some changes (which might also be
triggered in AppServers or OSGi containers with partially reconfigured
implementations. Not sure if you want to investigate deeper).
Gruss
Bernd
Here is the stacktrace anyway:
>>
>> com.sun.org.apache.xerces.internal.impl.dv.DVFactoryException: Schema
>> factory class
>> com.sun.org.apache.xerces.internal.impl.dv.xs.SchemaDVFactoryImpl does
>> not
>> extend from SchemaDVFactory.
>> at
>> com.sun.org.apache.xerces.internal.impl.dv.SchemaDVFactory.
>> getInstance(SchemaDVFactory.java:75)
>> at
>> com.sun.org.apache.xerces.internal.impl.dv.SchemaDVFactory.
>> getInstance(SchemaDVFactory.java:57)
>> at
>> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.
>> reset(XMLSchemaLoader.java:1024)
>> at
>> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.
>> loadGrammar(XMLSchemaLoader.java:556)
>> at
>> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.
>> loadGrammar(XMLSchemaLoader.java:535)
>> at
>> com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchema
>> Factory.newSchema(XMLSchemaFactory.java:254)
>> at javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.
>> java:638)
>> at javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.
>> java:654)
>> at
>> com.seeburger.api.test.helpers.BuilderTestHelper.getCRSchema
>> Validator(BuilderTestHelper.java:57)
>> at
>> com.seeburger.api.test.helpers.BuilderTestHelper.validateAnd
>> Compare(BuilderTestHelper.java:73)
>> at
>> com.seeburger.api.test.KSMBuilderTest.testDeletePGP(KSMBuild
>> erTest.java:196)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce
>> ssorImpl.java:62)
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
>> thodAccessorImpl.java:43)
>> at java.lang.reflect.Method.invoke(Method.java:498)
>> at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:68)
>> at
>> org.powermock.modules.junit4.internal.impl.PowerMockJUnit44R
>> unnerDelegateImpl$PowerMockJUnit44MethodRunner.runTestMethod
>> (PowerMockJUnit44RunnerDelegateImpl.java:310)
>> at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.
>> java:89)
>> at
>> org.junit.internal.runners.MethodRoadie.runBeforesThenTestTh
>> enAfters(MethodRoadie.java:97)
>> at
>> org.powermock.modules.junit4.internal.impl.PowerMockJUnit44R
>> unnerDelegateImpl$PowerMockJUnit44MethodRunner.executeTest(P
>> owerMockJUnit44RunnerDelegateImpl.java:294)
>> at
>> org.powermock.modules.junit4.internal.impl.PowerMockJUnit47R
>> unnerDelegateImpl$PowerMockJUnit47MethodRunner.executeTestIn
>> Super(PowerMockJUnit47RunnerDelegateImpl.java:127)
>> at
>> org.powermock.modules.junit4.internal.impl.PowerMockJUnit47R
>> unnerDelegateImpl$PowerMockJUnit47MethodRunner.executeTest(P
>> owerMockJUnit47RunnerDelegateImpl.java:82)
>> at
>> org.powermock.modules.junit4.internal.impl.PowerMockJUnit44R
>> unnerDelegateImpl$PowerMockJUnit44MethodRunner.runBeforesThe
>> nTestThenAfters(PowerMockJUnit44RunnerDelegateImpl.java:282)
>> at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie
>> .java:87)
>> at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:50)
>> at
>> org.powermock.modules.junit4.internal.impl.PowerMockJUnit44R
>> unnerDelegateImpl.invokeTestMethod(PowerMockJUni
>> t44RunnerDelegateImpl.java:207)
>> at
>> org.powermock.modules.junit4.internal.impl.PowerMockJUnit44R
>> unnerDelegateImpl.runMethods(PowerMockJUnit44RunnerDelegateImpl.java:146)
>> at
>> org.powermock.modules.junit4.internal.impl.PowerMockJUnit44R
>> unnerDelegateImpl$1.run(PowerMockJUnit44RunnerDelegateImpl.java:120)
>> at
>> org.junit.internal.runners.ClassRoadie.runUnprotected(ClassR
>> oadie.java:34)
>> at
>> org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:44)
>> at
>> org.powermock.modules.junit4.internal.impl.PowerMockJUnit44R
>> unnerDelegateImpl.run(PowerMockJUnit44RunnerDelegateImpl.java:122)
>> at
>> org.powermock.modules.junit4.common.internal.impl.JUnit4Test
>> SuiteChunkerImpl.run(JUnit4TestSuiteChunkerImpl.java:106)
>> at
>> org.powermock.modules.junit4.common.internal.impl.AbstractCo
>> mmonPowerMockRunner.run(AbstractCommonPowerMockRunner.java:53)
>> at
>> org.powermock.modules.junit4.PowerMockRunner.run(PowerMockRunner.java:59)
>> at
>> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.
>> run(JUnit4TestReference.java:86)
>> at
>> org.eclipse.jdt.internal.junit.runner.TestExecution.run(
>> TestExecution.java:38)
>> at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe
>> sts(RemoteTestRunner.java:539)
>> at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe
>> sts(RemoteTestRunner.java:761)
>> at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(
>> RemoteTestRunner.java:461)
>> at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(
>> RemoteTestRunner.java:207)
>>
>> on the classpath jaxb-impl-2.2.5.jar but the specific packages are only
>> loaded from rt.jar and redefined. I asume the later is done by Powermock.
>>
>> Line 611: [Loaded
>> com.sun.org.apache.xerces.internal.impl.dv.SchemaDVFactory from
>> C:\Program
>> Files\Java\jdk1.8.0_161\jre\lib\rt.jar]
>> Line 616: [Loaded
>> com.sun.org.apache.xerces.internal.impl.dv.xs.BaseSchemaDVFactory from
>> C:\Program Files\Java\jdk1.8.0_161\jre\lib\rt.jar]
>> Line 617: [Loaded
>> com.sun.org.apache.xerces.internal.impl.dv.xs.SchemaDVFactoryImpl from
>> C:\Program Files\Java\jdk1.8.0_161\jre\lib\rt.jar]
>> Line 618: [Loaded
>> com.sun.org.apache.xerces.internal.impl.dv.SchemaDVFactory from
>> __JVM_DefineClass__]
>> Line 619: [Loaded
>> com.sun.org.apache.xerces.internal.impl.dv.xs.BaseSchemaDVFactory from
>> __JVM_DefineClass__]
>> Line 620: [Loaded
>> com.sun.org.apache.xerces.internal.impl.dv.xs.SchemaDVFactoryImpl from
>> __JVM_DefineClass__]
>>
>> Is that something you are concerned?
>>
>> Gruss
>> Bernd
>>
>
More information about the core-libs-dev
mailing list