I have already set these 2 jars(jaxp-api.jar and xercesImpl.jar) in the classpath. This is the code what u have given for validation with JAXP. I have modified only the main function where i am hardcoding the schema and document path. Could it be because of some problem with jdk vesion or some problem with the jdk installation? I have recently installed jdk frim from java.sun.com. follwoing are the details of the jsk version.