[ http://issues.apache.org/jira/browse/XERCESJ-1076?page=all ]
Michael Glavassevich updated XERCESJ-1076:
------------------------------------------
Fix Version: 2.8.0
Description:
Parsing multiple documents in multiple threads with schema validation enabled
sometimes fails. The error reported is: org.xml.sax.SAXParseException:
cvc-pattern-valid: Value 'en' is not facet-valid with respect to pattern
'([a-zA-Z]{1,8})(-[a-zA-Z0-9]{1,8})*' for type 'language'.
The test program I will provide to recreate the problem usually runs without
error. It creates a number of threads, and parses the same document in each
thread, concurrently.
However, sometimes it fails with the reported error. I have provided a script
(runit.sh) that will repeatedly run the program.
The test program is called parseerror.ParseError. It uses an EntityResolver to
locate the schema in the classpath.
Typical program output is as follows:
> runit.sh
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)
...org.xml.sax.SAXParseException: cvc-pattern-valid: Value 'en' is not
facet-valid with respect to pattern '([a-zA-Z]{1,8})(-[a-zA-Z0-9]{1,8})*' for
type 'language'.
at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at
org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown
Source)
at
org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
at
org.apache.xerces.impl.xs.XMLSchemaValidator.processOneAttribute(Unknown Source)
at
org.apache.xerces.impl.xs.XMLSchemaValidator.processAttributes(Unknown Source)
at
org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown
Source)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(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.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
at parseerror.ParseError$ParseThread.run(ParseError.java:55)
.... etc
was:
Parsing multiple documents in multiple threads with schema validation enabled
sometimes fails. The error reported is: org.xml.sax.SAXParseException:
cvc-pattern-valid: Value 'en' is not facet-valid with respect to pattern
'([a-zA-Z]{1,8})(-[a-zA-Z0-9]{1,8})*' for type 'language'.
The test program I will provide to recreate the problem usually runs without
error. It creates a number of threads, and parses the same document in each
thread, concurrently.
However, sometimes it fails with the reported error. I have provided a script
(runit.sh) that will repeatedly run the program.
The test program is called parseerror.ParseError. It uses an EntityResolver to
locate the schema in the classpath.
Typical program output is as follows:
> runit.sh
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)
...org.xml.sax.SAXParseException: cvc-pattern-valid: Value 'en' is not
facet-valid with respect to pattern '([a-zA-Z]{1,8})(-[a-zA-Z0-9]{1,8})*' for
type 'language'.
at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at
org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown
Source)
at
org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
at
org.apache.xerces.impl.xs.XMLSchemaValidator.processOneAttribute(Unknown Source)
at
org.apache.xerces.impl.xs.XMLSchemaValidator.processAttributes(Unknown Source)
at
org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown
Source)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(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.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
at parseerror.ParseError$ParseThread.run(ParseError.java:55)
.... etc
Environment:
Java 1.4.2 or 1.5.0 on a SunOS wallaby 5.8 Generic_117350-12 sun4u sparc
SUNW,Sun-Fire-V440
(Couldn't reproduce on a 1 CPU Windows 2000 box).
was:
Java 1.4.2 or 1.5.0 on a SunOS wallaby 5.8 Generic_117350-12 sun4u sparc
SUNW,Sun-Fire-V440
(Couldn't reproduce on a 1 CPU Windows 2000 box).
> thread safety issue with schema validation
> ------------------------------------------
>
> Key: XERCESJ-1076
> URL: http://issues.apache.org/jira/browse/XERCESJ-1076
> Project: Xerces2-J
> Type: Bug
> Components: XML Schema datatypes
> Versions: 2.6.2
> Environment: Java 1.4.2 or 1.5.0 on a SunOS wallaby 5.8 Generic_117350-12
> sun4u sparc SUNW,Sun-Fire-V440
> (Couldn't reproduce on a 1 CPU Windows 2000 box).
> Reporter: Brett Watson-Luke
> Fix For: 2.8.0
> Attachments: parseerror.zip
>
> Parsing multiple documents in multiple threads with schema validation enabled
> sometimes fails. The error reported is: org.xml.sax.SAXParseException:
> cvc-pattern-valid: Value 'en' is not facet-valid with respect to pattern
> '([a-zA-Z]{1,8})(-[a-zA-Z0-9]{1,8})*' for type 'language'.
> The test program I will provide to recreate the problem usually runs without
> error. It creates a number of threads, and parses the same document in each
> thread, concurrently.
> However, sometimes it fails with the reported error. I have provided a
> script (runit.sh) that will repeatedly run the program.
> The test program is called parseerror.ParseError. It uses an EntityResolver
> to locate the schema in the classpath.
> Typical program output is as follows:
> > runit.sh
> java version "1.4.2"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
> Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)
> ...org.xml.sax.SAXParseException: cvc-pattern-valid: Value 'en' is not
> facet-valid with respect to pattern '([a-zA-Z]{1,8})(-[a-zA-Z0-9]{1,8})*' for
> type 'language'.
> at
> org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
> Source)
> at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
> at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
> at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
> at
> org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown
> Source)
> at
> org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
> at
> org.apache.xerces.impl.xs.XMLSchemaValidator.processOneAttribute(Unknown
> Source)
> at
> org.apache.xerces.impl.xs.XMLSchemaValidator.processAttributes(Unknown Source)
> at
> org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown
> Source)
> at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown
> Source)
> at
> org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(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.parsers.XMLParser.parse(Unknown Source)
> at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
> at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
> at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
> at parseerror.ParseError$ParseThread.run(ParseError.java:55)
> .... etc
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]