Hi Mike, "Mike O'Leary" <[EMAIL PROTECTED]> wrote on 02/26/2007 01:57:57 PM:
> When I step into the > dbFactory.setFeature(ENTITY_RESOLVER_2_ID, true); > function call, I go to a function in DocumentBuilderFactoryImpl.java > that looks like this: > > public void setFeature(String name, boolean value) > throws ParserConfigurationException{ > > //Revisit:: > //for now use attributes itself. we just support on feature. > //If we need to use setFeature in full fledge we should > //document what is supported by setAttribute > //and what is by setFeature. > //user should not use setAttribute("xyz",Boolean.TRUE) > //instead of setFeature("xyz",true); > if(attributes == null) > attributes = new Hashtable(); > if(name.equals(Constants.FEATURE_SECURE_PROCESSING)){ > attributes.put(Constants.FEATURE_SECURE_PROCESSING, > Boolean.valueOf(value)); > } else throw new ParserConfigurationException( > DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, > "jaxp_feature_not_supported", > new Object[] {name})); > } > > This file is in JDK 1.5 in the package com.sun.org.apache.xerces. > internal.jaxp, but it is defined in a jar file called rt.jar. Obviously not supported by the JAXP implementation that Sun included in their release of Java 5. This should work if you use Apache Xerces-J 2.7.0 and above. > I downloaded a copy of Xerces-J-tools.2.9.0 and added xercesImpl.jar > to my classpath. Now when I get to the setFeature function call, I > get an error that says > Exception in thread "main" java.lang.AbstractMethodError: javax.xml. > parsers.DocumentBuilderFactory.setFeature(Ljava/lang/String;Z)V The "Xerces-J-tools.2.9.0" package contains build tools for compiling the Xerces-J 2.9.0 source. The xercesImpl.jar included in it is a very old release which is there for bootstrapping Ant on JDK 1.3 and lower (since it requires an XML parser to function). What you really meant to download was the binary distribution: "Xerces-J-bin.2.9.0". > It does look like the version of DocumentBuilderFactoryImpl does not > contain a definition for setFeature and DcoumentBuilderFactory is an > abstract class, so I guess this all makes sense. Did you encounter > things like this when you were setting things up? > Mike Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: [EMAIL PROTECTED] E-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]