When using the JAXP XPath interfaces in a multi-classloader environment such as an application server, the newInstance method on XPathFactory fails to find any javax.xml.xpath.XPathFactory service files as described in the API documentation if the service file was loaded in a classloader other than the system classloader. The reason for this can be found in the javax.xml.xpath.SecuritySupport class in the getResources method. The method will always use the getSystemResource method instead of the getResource method on the context classloader.
Created attachment 19774 [details] Proposed patch to search context classloader when available
The same bugs were also in javax.xml.validation.SecuritySupport. Both are fixed in SVN now. Thanks.