You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Denis Orekhov (Created) (JIRA)" <xe...@xml.apache.org> on 2011/09/27 16:50:11 UTC

[jira] [Created] (XERCESJ-1538) Multithread validation failed in Xerces2 with XML Schema 1.1 support when assert instruction in XSD

Multithread validation failed in Xerces2 with XML Schema 1.1 support when assert instruction in XSD
---------------------------------------------------------------------------------------------------

                 Key: XERCESJ-1538
                 URL: https://issues.apache.org/jira/browse/XERCESJ-1538
             Project: Xerces2-J
          Issue Type: Bug
          Components: JAXP (javax.xml.validation)
    Affects Versions: 2.11.0
         Environment: Windows 7 x64, Java 6 Update 26 x64 
            Reporter: Denis Orekhov


I'm using Xerces2 Java 2.11.0 (XML Schema 1.1) (Beta) in my app. Schema validation in my app can occurs simultaneously in separate threads.
This is part of my xsd:

	<xs:element name="action">
		<xs:complexType>
			<xs:all>
				<xs:element name="main_context" minOccurs="0" />
				<xs:element name="navigator" minOccurs="0">
					<xs:complexType>
						<xs:attribute name="element" type="xs:string" />
						<xs:attribute name="refresh" type="xs:boolean" />
					</xs:complexType>
				</xs:element>
				<xs:element name="datapanel" minOccurs="0">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="element" maxOccurs="unbounded"
								minOccurs="0">
								<xs:complexType>
									<xs:sequence>
										<xs:element name="add_context" minOccurs="0" />
									</xs:sequence>
									<xs:attribute name="id" type="xs:string" use="required" />
									<xs:attribute name="refresh_context_only" type="xs:boolean" />
									<xs:attribute name="skip_refresh_context_only"
										type="xs:boolean" />
									<xs:attribute name="keep_user_settings" type="xs:boolean" />
								</xs:complexType>
							</xs:element>
						</xs:sequence>
						<xs:attribute name="type" type="xs:string" use="required" />
						<xs:attribute name="tab" type="xs:string" />
					</xs:complexType>
				</xs:element>
				<xs:element name="server" minOccurs="0">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="activity" minOccurs="0" maxOccurs="unbounded">
								<xs:complexType>
									<xs:sequence>
										<xs:element name="add_context" minOccurs="0" />
									</xs:sequence>
									<xs:attribute name="type" type="xs:string"
										use="required" />									
								</xs:complexType>
							</xs:element>
						</xs:sequence>
					</xs:complexType>					
				</xs:element>
			</xs:all>
			<xs:assert
				test="(count(datapanel) + count(server) =0) or (count(*[position()=1 and name()='main_context']) = 1)" />
		</xs:complexType>
	</xs:element>

And sometimes I have SAXException with text "cvc-assertion.3.13.4.1: Assertion evaluation ('(count(datapanel) + count(server) =0) or (count(*[position()=1 and name()='main_context']) = 1)') for element 'action' with type '#anonymous' did not succeed.".
I checked my data and schema text before validation error - both is good.

--
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

        

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


[jira] [Commented] (XERCESJ-1538) Multithread validation failed in Xerces2 with XML Schema 1.1 support when assert instruction in XSD

Posted by "Denis Orekhov (Commented) (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESJ-1538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13172515#comment-13172515 ] 

Denis Orekhov commented on XERCESJ-1538:
----------------------------------------

I simplify my example.
Now the project has only 2 classes: 
1) Runner -  runs threads with delay. On my PC errors appers if delay 150 miliseconds or lower.
2) ValidatingThread - thread for validation, it also handles errors.
Project attached to issue.
                
> Multithread validation failed in Xerces2 with XML Schema 1.1 support when assert instruction in XSD
> ---------------------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1538
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1538
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: JAXP (javax.xml.validation)
>    Affects Versions: 2.11.0
>         Environment: Windows 7 x64, Java 6 Update 26 x64 
>            Reporter: Denis Orekhov
>
> I'm using Xerces2 Java 2.11.0 (XML Schema 1.1) (Beta) in my app. Schema validation in my app can occurs simultaneously in separate threads.
> This is part of my xsd:
> 	<xs:element name="action">
> 		<xs:complexType>
> 			<xs:all>
> 				<xs:element name="main_context" minOccurs="0" />
> 				<xs:element name="navigator" minOccurs="0">
> 					<xs:complexType>
> 						<xs:attribute name="element" type="xs:string" />
> 						<xs:attribute name="refresh" type="xs:boolean" />
> 					</xs:complexType>
> 				</xs:element>
> 				<xs:element name="datapanel" minOccurs="0">
> 					<xs:complexType>
> 						<xs:sequence>
> 							<xs:element name="element" maxOccurs="unbounded"
> 								minOccurs="0">
> 								<xs:complexType>
> 									<xs:sequence>
> 										<xs:element name="add_context" minOccurs="0" />
> 									</xs:sequence>
> 									<xs:attribute name="id" type="xs:string" use="required" />
> 									<xs:attribute name="refresh_context_only" type="xs:boolean" />
> 									<xs:attribute name="skip_refresh_context_only"
> 										type="xs:boolean" />
> 									<xs:attribute name="keep_user_settings" type="xs:boolean" />
> 								</xs:complexType>
> 							</xs:element>
> 						</xs:sequence>
> 						<xs:attribute name="type" type="xs:string" use="required" />
> 						<xs:attribute name="tab" type="xs:string" />
> 					</xs:complexType>
> 				</xs:element>
> 				<xs:element name="server" minOccurs="0">
> 					<xs:complexType>
> 						<xs:sequence>
> 							<xs:element name="activity" minOccurs="0" maxOccurs="unbounded">
> 								<xs:complexType>
> 									<xs:sequence>
> 										<xs:element name="add_context" minOccurs="0" />
> 									</xs:sequence>
> 									<xs:attribute name="type" type="xs:string"
> 										use="required" />									
> 								</xs:complexType>
> 							</xs:element>
> 						</xs:sequence>
> 					</xs:complexType>					
> 				</xs:element>
> 			</xs:all>
> 			<xs:assert
> 				test="(count(datapanel) + count(server) =0) or (count(*[position()=1 and name()='main_context']) = 1)" />
> 		</xs:complexType>
> 	</xs:element>
> And sometimes I have SAXException with text "cvc-assertion.3.13.4.1: Assertion evaluation ('(count(datapanel) + count(server) =0) or (count(*[position()=1 and name()='main_context']) = 1)') for element 'action' with type '#anonymous' did not succeed.".
> I checked my data and schema text before validation error - both is good.

--
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

        

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


[jira] [Updated] (XERCESJ-1538) Multithread validation failed in Xerces2 with XML Schema 1.1 support when assert instruction in XSD

Posted by "Denis Orekhov (Updated) (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESJ-1538?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Denis Orekhov updated XERCESJ-1538:
-----------------------------------

    Attachment: multiThread.zip

lite version of test project for error reproduction
                
> Multithread validation failed in Xerces2 with XML Schema 1.1 support when assert instruction in XSD
> ---------------------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1538
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1538
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: JAXP (javax.xml.validation)
>    Affects Versions: 2.11.0
>         Environment: Windows 7 x64, Java 6 Update 26 x64 
>            Reporter: Denis Orekhov
>         Attachments: multiThread.zip
>
>
> I'm using Xerces2 Java 2.11.0 (XML Schema 1.1) (Beta) in my app. Schema validation in my app can occurs simultaneously in separate threads.
> This is part of my xsd:
> 	<xs:element name="action">
> 		<xs:complexType>
> 			<xs:all>
> 				<xs:element name="main_context" minOccurs="0" />
> 				<xs:element name="navigator" minOccurs="0">
> 					<xs:complexType>
> 						<xs:attribute name="element" type="xs:string" />
> 						<xs:attribute name="refresh" type="xs:boolean" />
> 					</xs:complexType>
> 				</xs:element>
> 				<xs:element name="datapanel" minOccurs="0">
> 					<xs:complexType>
> 						<xs:sequence>
> 							<xs:element name="element" maxOccurs="unbounded"
> 								minOccurs="0">
> 								<xs:complexType>
> 									<xs:sequence>
> 										<xs:element name="add_context" minOccurs="0" />
> 									</xs:sequence>
> 									<xs:attribute name="id" type="xs:string" use="required" />
> 									<xs:attribute name="refresh_context_only" type="xs:boolean" />
> 									<xs:attribute name="skip_refresh_context_only"
> 										type="xs:boolean" />
> 									<xs:attribute name="keep_user_settings" type="xs:boolean" />
> 								</xs:complexType>
> 							</xs:element>
> 						</xs:sequence>
> 						<xs:attribute name="type" type="xs:string" use="required" />
> 						<xs:attribute name="tab" type="xs:string" />
> 					</xs:complexType>
> 				</xs:element>
> 				<xs:element name="server" minOccurs="0">
> 					<xs:complexType>
> 						<xs:sequence>
> 							<xs:element name="activity" minOccurs="0" maxOccurs="unbounded">
> 								<xs:complexType>
> 									<xs:sequence>
> 										<xs:element name="add_context" minOccurs="0" />
> 									</xs:sequence>
> 									<xs:attribute name="type" type="xs:string"
> 										use="required" />									
> 								</xs:complexType>
> 							</xs:element>
> 						</xs:sequence>
> 					</xs:complexType>					
> 				</xs:element>
> 			</xs:all>
> 			<xs:assert
> 				test="(count(datapanel) + count(server) =0) or (count(*[position()=1 and name()='main_context']) = 1)" />
> 		</xs:complexType>
> 	</xs:element>
> And sometimes I have SAXException with text "cvc-assertion.3.13.4.1: Assertion evaluation ('(count(datapanel) + count(server) =0) or (count(*[position()=1 and name()='main_context']) = 1)') for element 'action' with type '#anonymous' did not succeed.".
> I checked my data and schema text before validation error - both is good.

--
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

        

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


[jira] [Commented] (XERCESJ-1538) Multithread validation failed in Xerces2 with XML Schema 1.1 support when assert instruction in XSD

Posted by "Mukul Gandhi (Commented) (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESJ-1538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13116583#comment-13116583 ] 

Mukul Gandhi commented on XERCESJ-1538:
---------------------------------------

Xerces (the latest code base from SVN) reports your schema to be correct. And it also reports the XML document that you've posted, to be valid as per the schema you've posted.

It seems your sample XML doesn't have any "datapanel" or "server" elements (so I couldn't test assertion [particularly the failure scenario] specified in your schema, with the test case that you've posted). If you may want to post a modified test case with assertion success and failure scenarios both, then that would be helpful for us to determine if the observation you're experiencing is a bug.

If you want us to test the multithreaded scenario, then it would help us if you could post the end to end java application, so Xerces developers can verify the behavior you're mentioning.

May I also suggest a modified assertion XPath expression as below, that probably solves your use case (easy for me to understand at least the logic of assertion),

if (datapanel or server) then main_context[../self::action] else true()

(I couldn't test this expression, since your sample XML instance doesn't have a failure scenario -- I would ideally like to have such a test case, so our verification of the bug is easier)
                
> Multithread validation failed in Xerces2 with XML Schema 1.1 support when assert instruction in XSD
> ---------------------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1538
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1538
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: JAXP (javax.xml.validation)
>    Affects Versions: 2.11.0
>         Environment: Windows 7 x64, Java 6 Update 26 x64 
>            Reporter: Denis Orekhov
>
> I'm using Xerces2 Java 2.11.0 (XML Schema 1.1) (Beta) in my app. Schema validation in my app can occurs simultaneously in separate threads.
> This is part of my xsd:
> 	<xs:element name="action">
> 		<xs:complexType>
> 			<xs:all>
> 				<xs:element name="main_context" minOccurs="0" />
> 				<xs:element name="navigator" minOccurs="0">
> 					<xs:complexType>
> 						<xs:attribute name="element" type="xs:string" />
> 						<xs:attribute name="refresh" type="xs:boolean" />
> 					</xs:complexType>
> 				</xs:element>
> 				<xs:element name="datapanel" minOccurs="0">
> 					<xs:complexType>
> 						<xs:sequence>
> 							<xs:element name="element" maxOccurs="unbounded"
> 								minOccurs="0">
> 								<xs:complexType>
> 									<xs:sequence>
> 										<xs:element name="add_context" minOccurs="0" />
> 									</xs:sequence>
> 									<xs:attribute name="id" type="xs:string" use="required" />
> 									<xs:attribute name="refresh_context_only" type="xs:boolean" />
> 									<xs:attribute name="skip_refresh_context_only"
> 										type="xs:boolean" />
> 									<xs:attribute name="keep_user_settings" type="xs:boolean" />
> 								</xs:complexType>
> 							</xs:element>
> 						</xs:sequence>
> 						<xs:attribute name="type" type="xs:string" use="required" />
> 						<xs:attribute name="tab" type="xs:string" />
> 					</xs:complexType>
> 				</xs:element>
> 				<xs:element name="server" minOccurs="0">
> 					<xs:complexType>
> 						<xs:sequence>
> 							<xs:element name="activity" minOccurs="0" maxOccurs="unbounded">
> 								<xs:complexType>
> 									<xs:sequence>
> 										<xs:element name="add_context" minOccurs="0" />
> 									</xs:sequence>
> 									<xs:attribute name="type" type="xs:string"
> 										use="required" />									
> 								</xs:complexType>
> 							</xs:element>
> 						</xs:sequence>
> 					</xs:complexType>					
> 				</xs:element>
> 			</xs:all>
> 			<xs:assert
> 				test="(count(datapanel) + count(server) =0) or (count(*[position()=1 and name()='main_context']) = 1)" />
> 		</xs:complexType>
> 	</xs:element>
> And sometimes I have SAXException with text "cvc-assertion.3.13.4.1: Assertion evaluation ('(count(datapanel) + count(server) =0) or (count(*[position()=1 and name()='main_context']) = 1)') for element 'action' with type '#anonymous' did not succeed.".
> I checked my data and schema text before validation error - both is good.

--
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

        

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


[jira] [Commented] (XERCESJ-1538) Multithread validation failed in Xerces2 with XML Schema 1.1 support when assert instruction in XSD

Posted by "Denis Orekhov (Commented) (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESJ-1538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13169401#comment-13169401 ] 

Denis Orekhov commented on XERCESJ-1538:
----------------------------------------

I sent all data that Mukul asked me. 
Last mail that I recieved was:

"Mukul,

A javax.xml.validation.Schema [1] is required to be thread-safe. Xerces has a bug if it doesn't satisfy that.

Den mentioned that this problem occurs even when SchemaFactory and Schema objects are not shared between threads. That sounds very much like there's a statically mutable field somewhere within Xerces or Psychopath that is causing this issue. If multiple threads can't validate assertions simultaneously we need to fix that.

Thanks.

[1] http://xerces.apache.org/xerces2-j/javadocs/api/javax/xml/validation/Schema.html

...

> Therefore I can run fine, with your use case in single thread
> scenario. Your java application example, is pretty involved and would
> require detailed investigation, to conclude if your observation is a
> bug with Xerces.
> 
> I think, compliance of a XSD processor to the XSD language, doesn't
> require threading issues to be considered, and achieving specific
> validation objectives (like validation in multhithreading context)
> must have an external design from the application and/or schema
> authors. With this thought, I think Xerces may not have a bug, for the
> use case that you've shared with us."

I use synchronized method for xsd validation in my code now.
And is the bug or no - you decide...
                
> Multithread validation failed in Xerces2 with XML Schema 1.1 support when assert instruction in XSD
> ---------------------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1538
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1538
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: JAXP (javax.xml.validation)
>    Affects Versions: 2.11.0
>         Environment: Windows 7 x64, Java 6 Update 26 x64 
>            Reporter: Denis Orekhov
>
> I'm using Xerces2 Java 2.11.0 (XML Schema 1.1) (Beta) in my app. Schema validation in my app can occurs simultaneously in separate threads.
> This is part of my xsd:
> 	<xs:element name="action">
> 		<xs:complexType>
> 			<xs:all>
> 				<xs:element name="main_context" minOccurs="0" />
> 				<xs:element name="navigator" minOccurs="0">
> 					<xs:complexType>
> 						<xs:attribute name="element" type="xs:string" />
> 						<xs:attribute name="refresh" type="xs:boolean" />
> 					</xs:complexType>
> 				</xs:element>
> 				<xs:element name="datapanel" minOccurs="0">
> 					<xs:complexType>
> 						<xs:sequence>
> 							<xs:element name="element" maxOccurs="unbounded"
> 								minOccurs="0">
> 								<xs:complexType>
> 									<xs:sequence>
> 										<xs:element name="add_context" minOccurs="0" />
> 									</xs:sequence>
> 									<xs:attribute name="id" type="xs:string" use="required" />
> 									<xs:attribute name="refresh_context_only" type="xs:boolean" />
> 									<xs:attribute name="skip_refresh_context_only"
> 										type="xs:boolean" />
> 									<xs:attribute name="keep_user_settings" type="xs:boolean" />
> 								</xs:complexType>
> 							</xs:element>
> 						</xs:sequence>
> 						<xs:attribute name="type" type="xs:string" use="required" />
> 						<xs:attribute name="tab" type="xs:string" />
> 					</xs:complexType>
> 				</xs:element>
> 				<xs:element name="server" minOccurs="0">
> 					<xs:complexType>
> 						<xs:sequence>
> 							<xs:element name="activity" minOccurs="0" maxOccurs="unbounded">
> 								<xs:complexType>
> 									<xs:sequence>
> 										<xs:element name="add_context" minOccurs="0" />
> 									</xs:sequence>
> 									<xs:attribute name="type" type="xs:string"
> 										use="required" />									
> 								</xs:complexType>
> 							</xs:element>
> 						</xs:sequence>
> 					</xs:complexType>					
> 				</xs:element>
> 			</xs:all>
> 			<xs:assert
> 				test="(count(datapanel) + count(server) =0) or (count(*[position()=1 and name()='main_context']) = 1)" />
> 		</xs:complexType>
> 	</xs:element>
> And sometimes I have SAXException with text "cvc-assertion.3.13.4.1: Assertion evaluation ('(count(datapanel) + count(server) =0) or (count(*[position()=1 and name()='main_context']) = 1)') for element 'action' with type '#anonymous' did not succeed.".
> I checked my data and schema text before validation error - both is good.

--
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

        

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


[jira] [Commented] (XERCESJ-1538) Multithread validation failed in Xerces2 with XML Schema 1.1 support when assert instruction in XSD

Posted by "Mukul Gandhi (Commented) (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESJ-1538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13170169#comment-13170169 ] 

Mukul Gandhi commented on XERCESJ-1538:
---------------------------------------

@ Denis: if you can provide us with a simple java test case, whose multithreading code base is easy to understand and can unambiguosly demonstrate that there's something wrong with Xerces's implementation then it would be easy for us to find an appropriate solution.

the java test case you posted earlier, has huge application domain semantics that makes harder for us (at least me) to debug the suspected problem. I won't blame you for that..., since I asked for an end-to-end java scenario with which you were working -- but unfortunately your application context is overwhelming atleast for me to focus on debugging.

I hope you may try to post a simplest possible test case, meeting some of the simplicity criteria listed above so we could quickly focus on debugging aspects.






                
> Multithread validation failed in Xerces2 with XML Schema 1.1 support when assert instruction in XSD
> ---------------------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1538
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1538
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: JAXP (javax.xml.validation)
>    Affects Versions: 2.11.0
>         Environment: Windows 7 x64, Java 6 Update 26 x64 
>            Reporter: Denis Orekhov
>
> I'm using Xerces2 Java 2.11.0 (XML Schema 1.1) (Beta) in my app. Schema validation in my app can occurs simultaneously in separate threads.
> This is part of my xsd:
> 	<xs:element name="action">
> 		<xs:complexType>
> 			<xs:all>
> 				<xs:element name="main_context" minOccurs="0" />
> 				<xs:element name="navigator" minOccurs="0">
> 					<xs:complexType>
> 						<xs:attribute name="element" type="xs:string" />
> 						<xs:attribute name="refresh" type="xs:boolean" />
> 					</xs:complexType>
> 				</xs:element>
> 				<xs:element name="datapanel" minOccurs="0">
> 					<xs:complexType>
> 						<xs:sequence>
> 							<xs:element name="element" maxOccurs="unbounded"
> 								minOccurs="0">
> 								<xs:complexType>
> 									<xs:sequence>
> 										<xs:element name="add_context" minOccurs="0" />
> 									</xs:sequence>
> 									<xs:attribute name="id" type="xs:string" use="required" />
> 									<xs:attribute name="refresh_context_only" type="xs:boolean" />
> 									<xs:attribute name="skip_refresh_context_only"
> 										type="xs:boolean" />
> 									<xs:attribute name="keep_user_settings" type="xs:boolean" />
> 								</xs:complexType>
> 							</xs:element>
> 						</xs:sequence>
> 						<xs:attribute name="type" type="xs:string" use="required" />
> 						<xs:attribute name="tab" type="xs:string" />
> 					</xs:complexType>
> 				</xs:element>
> 				<xs:element name="server" minOccurs="0">
> 					<xs:complexType>
> 						<xs:sequence>
> 							<xs:element name="activity" minOccurs="0" maxOccurs="unbounded">
> 								<xs:complexType>
> 									<xs:sequence>
> 										<xs:element name="add_context" minOccurs="0" />
> 									</xs:sequence>
> 									<xs:attribute name="type" type="xs:string"
> 										use="required" />									
> 								</xs:complexType>
> 							</xs:element>
> 						</xs:sequence>
> 					</xs:complexType>					
> 				</xs:element>
> 			</xs:all>
> 			<xs:assert
> 				test="(count(datapanel) + count(server) =0) or (count(*[position()=1 and name()='main_context']) = 1)" />
> 		</xs:complexType>
> 	</xs:element>
> And sometimes I have SAXException with text "cvc-assertion.3.13.4.1: Assertion evaluation ('(count(datapanel) + count(server) =0) or (count(*[position()=1 and name()='main_context']) = 1)') for element 'action' with type '#anonymous' did not succeed.".
> I checked my data and schema text before validation error - both is good.

--
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

        

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


[jira] [Resolved] (XERCESJ-1538) Multithread validation failed in Xerces2 with XML Schema 1.1 support when assert instruction in XSD

Posted by "Michael Glavassevich (Resolved) (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESJ-1538?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Glavassevich resolved XERCESJ-1538.
-------------------------------------------

    Resolution: Incomplete

Mukul asked the reporter for more info in September but didn't get a response. Denis, feel free to reopen if you ever get back to this, but we'll need more information from you in order to reproduce the issue.
                
> Multithread validation failed in Xerces2 with XML Schema 1.1 support when assert instruction in XSD
> ---------------------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1538
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1538
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: JAXP (javax.xml.validation)
>    Affects Versions: 2.11.0
>         Environment: Windows 7 x64, Java 6 Update 26 x64 
>            Reporter: Denis Orekhov
>
> I'm using Xerces2 Java 2.11.0 (XML Schema 1.1) (Beta) in my app. Schema validation in my app can occurs simultaneously in separate threads.
> This is part of my xsd:
> 	<xs:element name="action">
> 		<xs:complexType>
> 			<xs:all>
> 				<xs:element name="main_context" minOccurs="0" />
> 				<xs:element name="navigator" minOccurs="0">
> 					<xs:complexType>
> 						<xs:attribute name="element" type="xs:string" />
> 						<xs:attribute name="refresh" type="xs:boolean" />
> 					</xs:complexType>
> 				</xs:element>
> 				<xs:element name="datapanel" minOccurs="0">
> 					<xs:complexType>
> 						<xs:sequence>
> 							<xs:element name="element" maxOccurs="unbounded"
> 								minOccurs="0">
> 								<xs:complexType>
> 									<xs:sequence>
> 										<xs:element name="add_context" minOccurs="0" />
> 									</xs:sequence>
> 									<xs:attribute name="id" type="xs:string" use="required" />
> 									<xs:attribute name="refresh_context_only" type="xs:boolean" />
> 									<xs:attribute name="skip_refresh_context_only"
> 										type="xs:boolean" />
> 									<xs:attribute name="keep_user_settings" type="xs:boolean" />
> 								</xs:complexType>
> 							</xs:element>
> 						</xs:sequence>
> 						<xs:attribute name="type" type="xs:string" use="required" />
> 						<xs:attribute name="tab" type="xs:string" />
> 					</xs:complexType>
> 				</xs:element>
> 				<xs:element name="server" minOccurs="0">
> 					<xs:complexType>
> 						<xs:sequence>
> 							<xs:element name="activity" minOccurs="0" maxOccurs="unbounded">
> 								<xs:complexType>
> 									<xs:sequence>
> 										<xs:element name="add_context" minOccurs="0" />
> 									</xs:sequence>
> 									<xs:attribute name="type" type="xs:string"
> 										use="required" />									
> 								</xs:complexType>
> 							</xs:element>
> 						</xs:sequence>
> 					</xs:complexType>					
> 				</xs:element>
> 			</xs:all>
> 			<xs:assert
> 				test="(count(datapanel) + count(server) =0) or (count(*[position()=1 and name()='main_context']) = 1)" />
> 		</xs:complexType>
> 	</xs:element>
> And sometimes I have SAXException with text "cvc-assertion.3.13.4.1: Assertion evaluation ('(count(datapanel) + count(server) =0) or (count(*[position()=1 and name()='main_context']) = 1)') for element 'action' with type '#anonymous' did not succeed.".
> I checked my data and schema text before validation error - both is good.

--
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

        

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


[jira] [Commented] (XERCESJ-1538) Multithread validation failed in Xerces2 with XML Schema 1.1 support when assert instruction in XSD

Posted by "Mukul Gandhi (Commented) (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESJ-1538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13115570#comment-13115570 ] 

Mukul Gandhi commented on XERCESJ-1538:
---------------------------------------

would be nice if you can state in prose the intent of your schema, and also post a sample XML that you want to validate with the schema you've posted. I think we must also test the validation with the code base in SVN, where the bug may have probably been solved.
                
> Multithread validation failed in Xerces2 with XML Schema 1.1 support when assert instruction in XSD
> ---------------------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1538
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1538
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: JAXP (javax.xml.validation)
>    Affects Versions: 2.11.0
>         Environment: Windows 7 x64, Java 6 Update 26 x64 
>            Reporter: Denis Orekhov
>
> I'm using Xerces2 Java 2.11.0 (XML Schema 1.1) (Beta) in my app. Schema validation in my app can occurs simultaneously in separate threads.
> This is part of my xsd:
> 	<xs:element name="action">
> 		<xs:complexType>
> 			<xs:all>
> 				<xs:element name="main_context" minOccurs="0" />
> 				<xs:element name="navigator" minOccurs="0">
> 					<xs:complexType>
> 						<xs:attribute name="element" type="xs:string" />
> 						<xs:attribute name="refresh" type="xs:boolean" />
> 					</xs:complexType>
> 				</xs:element>
> 				<xs:element name="datapanel" minOccurs="0">
> 					<xs:complexType>
> 						<xs:sequence>
> 							<xs:element name="element" maxOccurs="unbounded"
> 								minOccurs="0">
> 								<xs:complexType>
> 									<xs:sequence>
> 										<xs:element name="add_context" minOccurs="0" />
> 									</xs:sequence>
> 									<xs:attribute name="id" type="xs:string" use="required" />
> 									<xs:attribute name="refresh_context_only" type="xs:boolean" />
> 									<xs:attribute name="skip_refresh_context_only"
> 										type="xs:boolean" />
> 									<xs:attribute name="keep_user_settings" type="xs:boolean" />
> 								</xs:complexType>
> 							</xs:element>
> 						</xs:sequence>
> 						<xs:attribute name="type" type="xs:string" use="required" />
> 						<xs:attribute name="tab" type="xs:string" />
> 					</xs:complexType>
> 				</xs:element>
> 				<xs:element name="server" minOccurs="0">
> 					<xs:complexType>
> 						<xs:sequence>
> 							<xs:element name="activity" minOccurs="0" maxOccurs="unbounded">
> 								<xs:complexType>
> 									<xs:sequence>
> 										<xs:element name="add_context" minOccurs="0" />
> 									</xs:sequence>
> 									<xs:attribute name="type" type="xs:string"
> 										use="required" />									
> 								</xs:complexType>
> 							</xs:element>
> 						</xs:sequence>
> 					</xs:complexType>					
> 				</xs:element>
> 			</xs:all>
> 			<xs:assert
> 				test="(count(datapanel) + count(server) =0) or (count(*[position()=1 and name()='main_context']) = 1)" />
> 		</xs:complexType>
> 	</xs:element>
> And sometimes I have SAXException with text "cvc-assertion.3.13.4.1: Assertion evaluation ('(count(datapanel) + count(server) =0) or (count(*[position()=1 and name()='main_context']) = 1)') for element 'action' with type '#anonymous' did not succeed.".
> I checked my data and schema text before validation error - both is good.

--
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

        

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