Using Xalan in Eclipse plugin
- by Leslie Norman
I am facing problems in using xalan in eclipse plugin.
When I try to create factory instance by:
TransformerFactory tFactory = TransformerFactory.newInstance("org.apache.xalan.processor.TransformerFactoryImpl", null);
I get error:
javax.xml.transform.TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImpl not found
...
I have following lib jars in plugin classpath:
xml-apis.jar, xercesImpl.jar, serializer.jar, xalan.jar
I even can't create class instance by:
c = Class.forName("org.apache.xalan.processor.TransformerFactoryImpl");
Object o = c.newInstance();
It returns error:
java.lang.ClassNotFoundException: org.apache.xalan.processor.TransformerFactoryImpl
But if I run same code outside eclipse plugin with same libs on classpath, it works fine.
Could Somebody give an idea if I am doing some mistake or how to reolve this issue?