Error in the java agent - > TransformerFactory -> Provider cannot be found

I have created a java agent which makes use of the Transformer factory. I have imported the xalan.jar on the server → jvm\lib folder. But, it gives me the following error:

javax.xml.transform.TransformerFactoryConfigurationError:Provider for javax.xml.transform.TransformerFactory cannot be found

when I try to run the agent. Please can anyone suggest what can be the reason for the same?