[ 
https://issues.apache.org/jira/browse/XERCESJ-1687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16272217#comment-16272217
 ] 

Stephan Trebels commented on XERCESJ-1687:
------------------------------------------

This violates the contract of Schema, which specifically claims to be 
shareable, while Validator is not.  As it is, the XSD 1.1 code is not compliant 
with the Schema contract. The normal Xerces code is compliant, as far as 
testing has shown so far..

I would even accept this, grudgingly, if there was any way to make it thread 
safe (I see a theoretical way using a ClassLoader per schema).  Two unrelated 
schemas in unrelated threads interact, which is stunning.  We have found this, 
when validating a document in thread1 was conflicting with a config validation 
in a different module on thread2. IMHO, this is a must-fix, for now Arris has 
cloned the old eclipse XPath and we have a fixed version for internal use.



> XSD 1.1 validation with xs:assert is not thread safe
> ----------------------------------------------------
>
>                 Key: XERCESJ-1687
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1687
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XML Schema 1.1 Structures
>    Affects Versions: 2.12.0
>         Environment: java 8 / java 9
>            Reporter: Stephan Trebels
>            Priority: Critical
>
> The XSD 1.1 validation code uses eclipse webtools xpath to validate 
> assertions. The PsychoPath XPath 2.0 engine has a bug in 
> ResultSequenceFactory, which invalidates correct execution in all parallel 
> invocation of XSD 1.1 validation. 
> This issue affects completely unrelated schemas and input XML, as long as 
> both use assertions. The effect is a lot of spurious assert violations.  The 
> issue is visible even if only two threads are used in parallel.
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=527812



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscr...@xerces.apache.org
For additional commands, e-mail: j-dev-h...@xerces.apache.org

Reply via email to