Jaco (1) [Avatar] Offline
#1
Hi there,

I'm using the iText.Net port to convert XML files into PDF. Everything works fine on my development computer, but as soon as I rolled my solution out onto my webserver, I get the following error.

Provider for javax.xml.parsers.SAXParserFactory cannot be found
at javax.xml.parsers.SAXParserFactory.newInstance() at com.lowagie.text.xml.XmlParser..ctor() at com.lowagie.text.xml.XmlParser.parse(DocListener document, String file, HashMap tagmap) at
...

I've got JDK 1.4 and JDK6 installed on the webserver.

Does anybody have any idea what I'm missing.

Thanks!
blowagie (284) [Avatar] Offline
#2
Re: Provider for javax.xml.parsers.SAXParserFactory cannot be found
With .NET port, do you mean iTextSharp or really iText.NET?
If it's iTextSharp, please contact the mailing list: itext-questions@lists.sourceforge.net
As for iText.NET, it's a project managed by different people; you might want to contact them.
If this were a java question, I'd say you'd have to add an XML parser to your CLASSPATH, (for instance the crimson.jar) or install J2EE (it comes with an XML parser).
PJ69 (1) [Avatar] Offline
#3
Re: Provider for javax.xml.parsers.SAXParserFactory cannot be found
Hi,

In the iText.NET2005-src-1.4.6-2 source, I modify the code of com.lowagie.text.xml.XmlParser constructor in the XmlParser.java.

Add the reference to iText project: Apache.Crimson.DLL

Change the constructor code to :

public XmlParser() {
try {
//ORIG : parser = SAXParserFactory.newInstance().newSAXParser();
org.apache.crimson.jaxp.SAXParserFactoryImpl saxParserFactoryImpl = new org.apache.crimson.jaxp.SAXParserFactoryImpl();
parser = saxParserFactoryImpl.newSAXParser();
}
catch(ParserConfigurationException pce) {
throw new ExceptionConverter(pce);
}
//ORIG catch(SAXException se) {
// throw new ExceptionConverter(se);
//}
catch (Exception se)
{
throw new ExceptionConverter(se);
}
}

JPV
worthless (3) [Avatar] Offline
#4
Re: Provider for javax.xml.parsers.SAXParserFactory cannot be found
asdfafadsfasdf