The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

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