JDK-6459397 : missing an implementation of NamespaceContext which is required by XPath
  • Type: Bug
  • Component: xml
  • Sub-Component: javax.xml.xpath
  • Affected Version: 6
  • Priority: P3
  • Status: Closed
  • Resolution: Future Project
  • OS: generic
  • CPU: generic
  • Submitted: 2006-08-11
  • Updated: 2012-04-25
  • Resolved: 2010-09-02
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
5.0Resolved
Related Reports
Relates :  
Description
missing an implementation of NamespaceContext which is required by XPath
see also CR : 6376058

This issue is with the jdk1.6.0 PIT build for b96 - 

---------------------- Testcase -----------------------
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathFactory;
import javax.xml.namespace.NamespaceContext;

public class Test{

   public static void main(String args[]){
     Test t = new Test();
      t.checkXPath56();
   }

    private void checkXPath56() {
    	  
    	  XPathFactory xpathFactory = XPathFactory.newInstance();
    	  if( xpathFactory instanceof XPathFactory ){
    	     XPath xpath = xpathFactory.newXPath();
		NamespaceContext namespaceContext = xpath.getNamespaceContext();
		System.out.println("checkXPath56() : "+namespaceContext );

     //   - updating the testcase as behaviour has changed - see CR : 6376058 for details
		if( namespaceContext != null ){
		  System.out.println("checkXPath56() : passed  ");
		}else{
		  System.out.println("checkXPath56() : failed - "+namespaceContext);
		}
           }
    }

}
---------------------------------------------------------------------