[ 
http://issues.apache.org/jira/browse/XERCESJ-1054?page=comments#action_61962 ]
     
Emmanuel d'Hardemare commented on XERCESJ-1054:
-----------------------------------------------

This problem is not reproductible. It appears with strong loadings.

For each thread we create an object DecXML
The message is then validated with this object.

This object is : 

public DecXML()
    {
        try
        {
            // Initialisation des fabriques
            // DTD --
            _fabriqueDtd = DocumentBuilderFactory.newInstance();
            _fabriqueDtd.setValidating(_parserValidant);

            // XSD --
            
System.setProperty("org.apache.xerces.xni.parser.XMLParserConfiguration",
                               
"org.apache.xerces.parsers.XMLGrammarCachingConfiguration");
            _fabriqueXsd = DocumentBuilderFactory.newInstance();
            _fabriqueXsd.setValidating(_parserValidant);
            _fabriqueXsd.setNamespaceAware(true);
            
_fabriqueXsd.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaLanguage","http://www.w3.org/2001/XMLSchema";);

            if (_parserDeferNodeExp != null)
            {
                try
                {
                    
_fabriqueXsd.setAttribute("http://apache.org/xml/features/dom/defer-node-expansion";,
 _parserDeferNodeExp);
                    
_fabriqueDtd.setAttribute("http://apache.org/xml/features/dom/defer-node-expansion";,
 _parserDeferNodeExp);
                }
                catch (IllegalArgumentException iae)
                {
                    Logger.tracerMessage(Logger.LVL_WARNING, "DecXML", 
"Exception lors du positionnement du mode Defer Node Expansion: " + iae);
                }
            }
            // Initialisation des variables pour le decodage DTD
            _builderDtd = _fabriqueDtd.newDocumentBuilder();

            // Initialisation des variables pour le decodage XSD
            _builderXsd = _fabriqueXsd.newDocumentBuilder();

            // Positionnement du handler d'erreur
            _errHandler = new ErreurXML();
            _builderXsd.setErrorHandler(_errHandler);
            _builderDtd.setErrorHandler(_errHandler);
            // Initialisation du resolveur de path
            _myResolver = new MyResolver();
            _builderXsd.setEntityResolver(_myResolver);
            _builderDtd.setEntityResolver(_myResolver);

> Parsing XML sometimes goes wrong
> --------------------------------
>
>          Key: XERCESJ-1054
>          URL: http://issues.apache.org/jira/browse/XERCESJ-1054
>      Project: Xerces2-J
>         Type: Bug
>  Environment: Sun Solaris
>     Reporter: Emmanuel d'Hardemare

>
> XML parser sometimes rejects XML messages, although the message is valid 
> considering the XSD definition.
> This bug does not always appears, only some times. The error message could'nt 
> help to find the cause of this beahviour.
> the error message : 
> error : org.xml.sax.SAXParseException: cvc-pattern-valid: Value '7534072' is 
> not facet-valid with respect to pattern '\d{1,20}' for type 'IdEptXdslType'.
> 7534072 is respectful of the pattern \d{1,20}
> Does this remind you something ? 

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to