FULL PRODUCT VERSION :
5.0 update 2 and all earlier releases
ADDITIONAL OS VERSION INFORMATION :
All OSes (bug in Java code)
A DESCRIPTION OF THE PROBLEM :
The XPathFactory.newInstance() method never looks for the META-INF/services/javax.xml.xpath.XPathFactory properties file in the Thread's context class loader, but ALWAYS uses the system one. The following patch fixes the problem:
diff -U3 -r src/javax/xml/xpath/SecuritySupport.java srcx/javax/xml/xpath/SecuritySupport.java
--- src/javax/xml/xpath/SecuritySupport.java Fri Mar 4 00:26:36 2005
+++ srcx/javax/xml/xpath/SecuritySupport.java Tue Apr 12 23:17:02 2005
@@ -103,7 +103,7 @@
if (cl == null) {
enumeration = ClassLoader.getSystemResources(name);
} else {
- enumeration = cl.getSystemResources(name);
+ enumeration = cl.getResources(name);
}
return enumeration;
}
REPRODUCIBILITY :
This bug can be reproduced often.
CUSTOMER SUBMITTED WORKAROUND :
Apply this patch:
diff -U3 -r src/javax/xml/xpath/SecuritySupport.java srcx/javax/xml/xpath/SecuritySupport.java
--- src/javax/xml/xpath/SecuritySupport.java Fri Mar 4 00:26:36 2005
+++ srcx/javax/xml/xpath/SecuritySupport.java Tue Apr 12 23:17:02 2005
@@ -103,7 +103,7 @@
if (cl == null) {
enumeration = ClassLoader.getSystemResources(name);
} else {
- enumeration = cl.getSystemResources(name);
+ enumeration = cl.getResources(name);
}
return enumeration;
}