This content has been marked as final.
Show 4 replies
-
2. Re: Xerces 2.7.0 changes the XSImplementation implementation
starksm64 Jul 12, 2005 1:08 AM (in response to starksm64)The 2.7.0 version requires a org.apache.xerces.dom.DOMXSImplementationSourceImpl to be installed as the DOMImplementationRegistry.PROPERTY:
import org.w3c.dom.DOMImplementationRegistry; import org.apache.xerces.xs.XSImplementation; import org.apache.xerces.xs.XSLoader; ... // Get DOM Implementation using DOM Registry System.setProperty(DOMImplementationRegistry.PROPERTY, "org.apache.xerces.dom.DOMXSImplementationSourceImpl"); DOMImplementationRegistry registry = DOMImplementationRegistry.newInstance(); XSImplementation impl = (XSImplementation) registry.getDOMImplementation("XS-Loader"); XSLoader schemaLoader = impl.createXSLoader(null); ...
I made that change, but there is another integration problem seen when the server starts up under jdk5:2005-07-11 21:27:36,294 DEBUG [org.jboss.security.auth.login.XMLLoginConfigImpl] Failed to load config as XML java.lang.NoSuchFieldError: fFeatures at org.jboss.xb.binding.parser.xni.XniJBossXBParser$ParserConfiguration.configurePipeline(XniJBossXBParser.java:459) at org.apache.xerces.parsers.DTDConfiguration.reset(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.jboss.xb.binding.parser.xni.XniJBossXBParser.parse(XniJBossXBParser.java:207) at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:137) at org.jboss.security.auth.login.XMLLoginConfigImpl.loadXMLConfig(XMLLoginConfigImpl.java:309)
As far as I can see the fFeatures field should be accessible based on the javap output of the lib/endoresed/xercesImpl.jar :[starksm@banshee9100 bin]$ javap -s -classpath ../lib/endorsed/xercesImpl.jar o rg.apache.xerces.util.ParserConfigurationSettings public class org.apache.xerces.util.ParserConfigurationSettings extends java.lan g.Object implements org.apache.xerces.xni.parser.XMLComponentManager{ protected static final java.lang.String PARSER_SETTINGS; Signature: Ljava/lang/String; protected java.util.ArrayList fRecognizedProperties; Signature: Ljava/util/ArrayList; protected java.util.HashMap fProperties; Signature: Ljava/util/HashMap; protected java.util.ArrayList fRecognizedFeatures; Signature: Ljava/util/ArrayList; protected java.util.HashMap fFeatures; Signature: Ljava/util/HashMap; ...
This level of integration is certainly problematic. Is this still necessary with 2.7.0? -
3. Re: Xerces 2.7.0 changes the XSImplementation implementation
starksm64 Jul 12, 2005 1:51 AM (in response to starksm64)I guess the common module had not been made clean. After doing that the fFeatures access was ok, but the common module would not build due to a change in the org.apache.xerces.impl.xs.XMLSchemaValidator.fCurrentElemDecl now having private access.
I have switched from the xni based to the sax based parser in the UnmarshallerImpl. The xni stuff should just be dropped as its api is too unstable. I'm still testing the jbxb parsing unit tests. -
4. Re: Xerces 2.7.0 changes the XSImplementation implementation
starksm64 Jul 12, 2005 8:58 AM (in response to starksm64)Both the xml and kernel tests are passing with xerces 2.7.0 using the SaxJBossXBParser implementation of the JBossXBParser so I am updating thirdparty to that version.