parsear de un html a pdf

yenlowan
27 de Junio del 2003
Saludos mi problema es el siguiente tengo que insertar un fichero html en un pdf, estoy usando el iText y mi codigo es el siguiente:

String key= "javax.xml.transform.TransformerFactory";
String value = "org.apache.xalan.processor.TransformerFactoryImpl";
Properties props = System.getProperties();
props.put(key, value);
props.put("javax.xml.parsers.DocumentBuilderFactory","org.apache.xerces.jaxp.DocumentBuilderFactoryImpl");
props.put("javax.xml.parsers.SAXParserFactory","org.apache.xerces.jaxp.SAXParserFactoryImpl");
System.setProperties(props);
Document document = new Document(PageSize.A4,10,10,10,10);
try{
PdfWriter.getInstance(document, new FileOutputStream(ruta));
document.open();
HtmlParser.parse(document, "Chap0702.html");
}catch(Exception e){
e.printStackTrace();
System.err.println(e.getMessage());
}
document.close();

y al ejecutarlo me da el siguiente error:

java.lang.AbstractMethodError
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at com.lowagie.text.html.HtmlParser.go(Unknown Source)
at com.lowagie.text.html.HtmlParser.parse(Unknown Source)
at omron_administrador.soluciones.soluciones.generarPdf_23._jspService(generarPdf_23.java:178)
at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
at org.apache.tomcat.core.Handler.invoke(Unknown Source)
at org.apache.tomcat.core.Handler.service(Unknown Source)
at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
at org.apache.tomcat.core.ContextManager.service(Unknown Source)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown Source)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown Source)
at java.lang.Thread.run(Thread.java:479)

¿sabe alguien como solucionarlo? gracias y adios.