[GRADLE-1549] XMLSchema 1.1 validation test fails Created: 16/May/11  Updated: 10/Feb/17  Resolved: 10/Feb/17

Status: Resolved
Project: Gradle
Affects Version/s: 1.0-milestone-3
Fix Version/s: None

Type: Bug
Reporter: Joe Schmetzer Assignee: Unassigned
Resolution: Won't Fix Votes: 0

Attachments: Zip Archive TestXmlValidation.zip    

 Description   

I'm having troubles running an xml schema validation unit test from
Gradle. It's a relatively simple test, but it uses some XML Schema 1.1
features in the XSD. These features seem to really react badly to
running in a Gradle worker process. Running exactly the same code from
Ant has no problems, but when running from Gradle, I get an error with
a stack trace pointing to some problem deep in the XML processing
libraries.

I have attached a small example which demonstrates this problem. There are 2 tests in the class. Both should pass, but when running
from gradle, the first test fails with the following stack trace:

java.lang.AssertionError
at org.eclipse.wst.xml.xpath2.processor.internal.types.QName.namespace(QName.java:235)
at org.eclipse.wst.xml.xpath2.processor.DefaultEvaluator.name_test(DefaultEvaluator.java:1316)
at org.eclipse.wst.xml.xpath2.processor.DefaultEvaluator.visit(DefaultEvaluator.java:1379)
at org.eclipse.wst.xml.xpath2.processor.internal.ast.NameTest.accept(NameTest.java:39)
at org.eclipse.wst.xml.xpath2.processor.DefaultEvaluator.visit(DefaultEvaluator.java:1242)
at org.eclipse.wst.xml.xpath2.processor.internal.ast.ForwardStep.accept(ForwardStep.java:141)
at org.eclipse.wst.xml.xpath2.processor.DefaultEvaluator.visit(DefaultEvaluator.java:2003)
at org.eclipse.wst.xml.xpath2.processor.internal.ast.AxisStep.accept(AxisStep.java:46)
at org.eclipse.wst.xml.xpath2.processor.DefaultEvaluator.visit(DefaultEvaluator.java:1195)
at org.eclipse.wst.xml.xpath2.processor.internal.ast.XPathExpr.accept(XPathExpr.java:43)
at org.eclipse.wst.xml.xpath2.processor.DefaultEvaluator.do_bin_args(DefaultEvaluator.java:752)
at org.eclipse.wst.xml.xpath2.processor.DefaultEvaluator.visit(DefaultEvaluator.java:563)
at org.eclipse.wst.xml.xpath2.processor.internal.ast.CmpExpr.accept(CmpExpr.java:106)
at org.eclipse.wst.xml.xpath2.processor.DefaultEvaluator.do_expr(DefaultEvaluator.java:264)
at org.eclipse.wst.xml.xpath2.processor.DefaultEvaluator.visit(DefaultEvaluator.java:1475)
at org.eclipse.wst.xml.xpath2.processor.internal.ast.ParExpr.accept(ParExpr.java:40)
at org.eclipse.wst.xml.xpath2.processor.DefaultEvaluator.visit(DefaultEvaluator.java:2036)
at org.eclipse.wst.xml.xpath2.processor.internal.ast.FilterExpr.accept(FilterExpr.java:52)
at org.eclipse.wst.xml.xpath2.processor.DefaultEvaluator.visit(DefaultEvaluator.java:1195)
at org.eclipse.wst.xml.xpath2.processor.internal.ast.XPathExpr.accept(XPathExpr.java:43)
at org.eclipse.wst.xml.xpath2.processor.DefaultEvaluator.do_bin_args(DefaultEvaluator.java:752)
at org.eclipse.wst.xml.xpath2.processor.DefaultEvaluator.do_logic_exp(DefaultEvaluator.java:459)
at org.eclipse.wst.xml.xpath2.processor.DefaultEvaluator.visit(DefaultEvaluator.java:481)
at org.eclipse.wst.xml.xpath2.processor.internal.ast.OrExpr.accept(OrExpr.java:37)
at org.eclipse.wst.xml.xpath2.processor.DefaultEvaluator.visit(DefaultEvaluator.java:1509)
at org.eclipse.wst.xml.xpath2.processor.internal.ast.FunctionCall.accept(FunctionCall.java:46)
at org.eclipse.wst.xml.xpath2.processor.DefaultEvaluator.visit(DefaultEvaluator.java:2036)
at org.eclipse.wst.xml.xpath2.processor.internal.ast.FilterExpr.accept(FilterExpr.java:52)
at org.eclipse.wst.xml.xpath2.processor.DefaultEvaluator.visit(DefaultEvaluator.java:1195)
at org.eclipse.wst.xml.xpath2.processor.internal.ast.XPathExpr.accept(XPathExpr.java:43)
at org.eclipse.wst.xml.xpath2.processor.DefaultEvaluator.do_expr(DefaultEvaluator.java:264)
at org.eclipse.wst.xml.xpath2.processor.DefaultEvaluator.visit(DefaultEvaluator.java:285)
at org.eclipse.wst.xml.xpath2.processor.ast.XPath.accept(XPath.java:43)
at org.eclipse.wst.xml.xpath2.processor.DefaultEvaluator.evaluate(DefaultEvaluator.java:239)
at org.apache.xerces.impl.xs.AbstractPsychoPathImpl.evaluatePsychoPathExpr(Unknown Source)
at org.apache.xerces.impl.xs.XMLAssertPsychopathImpl.evaluateAssertion(Unknown Source)
at org.apache.xerces.impl.xs.XMLAssertPsychopathImpl.evaluateAssertionsFromAComplexType(Unknown Source)
at org.apache.xerces.impl.xs.XMLAssertPsychopathImpl.processAllAssertionsOnElement(Unknown Source)
at org.apache.xerces.impl.xs.XMLAssertPsychopathImpl.endElement(Unknown Source)
at org.apache.xerces.impl.xs.XSDAssertionValidator.handleEndElement(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.handleEndElement(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.emptyElement(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.jaxp.validation.StreamValidatorHelper.validate(Unknown Source)
at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown Source)
at javax.xml.validation.Validator.validate(Validator.java:127)
at com.youdevise.xmltest.SchemaValidationTest.validate(SchemaValidationTest.java:35)
at com.youdevise.xmltest.SchemaValidationTest.validateSchemaSimple(SchemaValidationTest.java:19)
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.ParentRunner.runLeaf(ParentRunner.java:279)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:48)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:247)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:57)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:245)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:47)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:238)
at org.junit.runners.ParentRunner.run(ParentRunner.java:308)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.execute(JUnitTestClassExecuter.java:51)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassProcessor.processTestClass(JUnitTestClassProcessor.java:63)
at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:49)
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.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.messaging.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:75)
at $Proxy3.processTestClass(Unknown Source)
at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:86)
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.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.messaging.remote.internal.MethodInvocationUnmarshallingDispatch.dispatch(MethodInvocationUnmarshallingDispatch.java:48)
at org.gradle.messaging.dispatch.DiscardOnFailureDispatch.dispatch(DiscardOnFailureDispatch.java:31)
at org.gradle.messaging.dispatch.AsyncDispatch.dispatchMessages(AsyncDispatch.java:129)
at org.gradle.messaging.dispatch.AsyncDispatch.access$000(AsyncDispatch.java:33)
at org.gradle.messaging.dispatch.AsyncDispatch$1.run(AsyncDispatch.java:69)
at org.gradle.messaging.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:63)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)



 Comments   
Comment by Benjamin Muschko [ 15/Nov/16 ]

As announced on the Gradle blog we are planning to completely migrate issues from JIRA to GitHub.

We intend to prioritize issues that are actionable and impactful while working more closely with the community. Many of our JIRA issues are inactionable or irrelevant. We would like to request your help to ensure we can appropriately prioritize JIRA issues you’ve contributed to.

Please confirm that you still advocate for your JIRA issue before December 10th, 2016 by:

  • Checking that your issues contain requisite context, impact, behaviors, and examples as described in our published guidelines.
  • Leave a comment on the JIRA issue or open a new GitHub issue confirming that the above is complete.

We look forward to collaborating with you more closely on GitHub. Thank you for your contribution to Gradle!

Comment by Benjamin Muschko [ 10/Feb/17 ]

Thanks again for reporting this issue. We haven't heard back from you after our inquiry from November 15th. We are closing this issue now. Please create an issue on GitHub if you still feel passionate about getting it resolved.

Generated at Wed Jun 30 11:58:20 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.