[
https://issues.apache.org/jira/browse/XERCESJ-1420?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael Glavassevich resolved XERCESJ-1420.
-------------------------------------------
Resolution: Invalid
XML Commons is a separate project from Xerces-J. Issues for it are tracked in
ASF Bugzilla [1] (instead of JIRA). Please open your bug report there.
[1] https://issues.apache.org/bugzilla/
> javax.xml.parsers.DocumentBuilderFactory looks first at the
> ContextClassLoader then Class.forName, but SchemaFactoryFinder does not
> -----------------------------------------------------------------------------------------------------------------------------------
>
> Key: XERCESJ-1420
> URL: https://issues.apache.org/jira/browse/XERCESJ-1420
> Project: Xerces2-J
> Issue Type: Bug
> Components: JAXP (javax.xml.validation)
> Affects Versions: 2.9.1
> Reporter: Andy Piper
>
> javax.xml.parsers.DocumentBuilderFactory looks first at the
> ContextClassLoader then Class.forName, but SchemaFactoryFinder does not. This
> causes problems on OSGi systems and it seems that the two strategies should
> be consistent. Here is the patch I used.
> diff -rc tmp/javax/xml/validation/SchemaFactoryFinder.java
> xml-commons-external-
> 1.4.01/javax/xml/validation/SchemaFactoryFinder.java
> *** tmp/javax/xml/validation/SchemaFactoryFinder.java 2009-02-16
> 00:09:32.0000
> 00000 +0000
> ---
> xml-commons-external-1.4.01/javax/xml/validation/SchemaFactoryFinder.java201
> 0-01-19 12:35:17.685540400 +0000
> ***************
> *** 301,307 ****
> if (debug) debugPrintln("instanciating "+className);
> Class clazz;
> if( classLoader!=null )
> ! clazz = classLoader.loadClass(className);
> else
> clazz = Class.forName(className);
> if(debug) debugPrintln("loaded it from "+which(clazz));
> --- 301,313 ----
> if (debug) debugPrintln("instanciating "+className);
> Class clazz;
> if( classLoader!=null )
> ! try {
> ! clazz = classLoader.loadClass(className);
> ! }
> ! catch (ClassNotFoundException cnfe) {
> ! // fallback
> ! clazz = Class.forName(className);
> ! }
> else
> clazz = Class.forName(className);
> if(debug) debugPrintln("loaded it from "+which(clazz));
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]