[ http://issues.apache.org/jira/browse/XERCESJ-1076?page=comments#action_12318189 ]
Michael Glavassevich commented on XERCESJ-1076: ----------------------------------------------- I found a race condition in the code that handles character ranges. I believe this might be causing the failure though I've never been able to reproduce it. It seems that XERCESJ-1054 is another report of the same problem. I've put a fix into CVS which should eliminate the race condition. Could you please check whether tomorrow's build (or later) [1] resolves your problem? [1] http://vmgump.apache.org/gump/public-jars/xml-xerces2/jars/ > 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 > 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]
