Hi Dave,

This is a known regression and is already fixed in CVS.  You can either do
a CVS checkout and do a build manually, or you can look at

     http://gump.covalent.net/jars/latest/xml-xerces2

which should have a snapshot incorporating this fix by now.

Cheers,
Neil
Neil Graham
XML Parser Development
IBM Toronto Lab
Phone:  905-413-3519, T/L 969-3519
E-mail:  [EMAIL PROTECTED]




|--------+------------------------>
|        |          Dave Flanagan |
|        |          <[EMAIL PROTECTED]|
|        |          etc.com>      |
|        |                        |
|        |          06/26/2002    |
|        |          12:49 PM      |
|        |          Please respond|
|        |          to            |
|        |          xerces-j-user |
|        |                        |
|--------+------------------------>
  
>-----------------------------------------------------------------------------------------------------------------------|
  |                                                                             
                                          |
  |      To:     [EMAIL PROTECTED]                                              
                               |
  |      cc:                                                                    
                                          |
  |      Subject:     DocumentBuilderFactory's setAttribute() no longer working 
 properly in xerces 2.0.2  ??             |
  |                                                                             
                                          |
  |                                                                             
                                          |
  
>-----------------------------------------------------------------------------------------------------------------------|



Using either the xerces-2_0_1 download from Apache or the one included in
Sun's java_xml_pack-summer02 download
I am able to successfully do the following:

DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance ();
dbf.setNamespaceAware(true);
dbf.setValidating(true);
           dbf.setAttribute(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
           dbf.setAttribute(JAXP_SCHEMA_SOURCE, new File("test.xsd"));

where the constants in the setAttribute methods above are defined as
follows:
     static final String JAXP_SCHEMA_LANGUAGE =
"http://java.sun.com/xml/jaxp/properties/schemaLanguage";;
     static final String W3C_XML_SCHEMA
=       "http://www.w3.org/2001/XMLSchema";;
     static final String JAXP_SCHEMA_SOURCE
=   "http://java.sun.com/xml/jaxp/properties/schemaSource";;

when the above is run using xerces-2_0_2

the    dbf.setAttribute(JAXP_SCHEMA_SOURCE, new File("test.xsd"));
results in a stack overflow exception starting as follows

Exception in thread "main" java.lang.StackOverflowError
         at
java.io.FileNotFoundException.<init>(FileNotFoundException.java:57)
         at java.io.FileInputStream.open(Native Method)
         at java.io.FileInputStream.<init>(FileInputStream.java:59)
         at java.io.FileInputStream.<init>(FileInputStream.java:90)
         at
org.apache.xerces.impl.xs.XMLSchemaLoader.xsdToXMLInputSource(XMLSchemaLoader.java:647)

         at
org.apache.xerces.impl.xs.XMLSchemaLoader.processJAXPSchemaSource(XMLSchemaLoader.java:580)

         at
org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:489)

         at
org.apache.xerces.impl.xs.XMLSchemaLoader.processJAXPSchemaSource(XMLSchemaLoader.java:588)

         at
org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:489)

         at
org.apache.xerces.impl.xs.XMLSchemaLoader.processJAXPSchemaSource(XMLSchemaLoader.java:588)


and is stuck in a recursive loop generating the exception

Am wondering if an error was accidently introduced into the xerces-2_0_2
release
or whether it is just me missing something

but it works fine in 2_0_1 - and not in 2_0_2

any help would be appreciated
Thank you - Dave Flanagan



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





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

Reply via email to