You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Andy Piper (JIRA)" <xe...@xml.apache.org> on 2010/02/08 13:36:28 UTC
[jira] Created: (XERCESJ-1420)
javax.xml.parsers.DocumentBuilderFactory looks first at the
ContextClassLoader then Class.forName, but SchemaFactoryFinder does not
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
Fix For: 2.9.1
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: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org
[jira] Updated: (XERCESJ-1420)
javax.xml.parsers.DocumentBuilderFactory looks first at the
ContextClassLoader then Class.forName, but SchemaFactoryFinder does not
Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XERCESJ-1420?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Glavassevich updated XERCESJ-1420:
------------------------------------------
Fix Version/s: (was: 2.9.1)
> 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: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org
[jira] Resolved: (XERCESJ-1420)
javax.xml.parsers.DocumentBuilderFactory looks first at the
ContextClassLoader then Class.forName, but SchemaFactoryFinder does not
Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
[ 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: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org