I have a .NET application that is using Apache FOP (I used IKVM to make the DLLs being referenced) and I have been able to create PDFs using code similar to the code provided here. The code works fine on my machine and on a development server.
Now when someone else is trying to run the code on their machine they are getting a TransformerFactoryConfigurationError
. The full error is Provider com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl not found.
The error is occurring at this line:
TransformerFactory factory = TransformerFactory.newInstance();
There is nothing configured differently between our machines and I cannot figure out why the program continues to work fine on my machine but not on this person's machine.
Any ideas on how to fix this error or what to check?
I am not exactly sure why this was not working in the first place, but I found a way to make this work on both of our machines.
First, add this using statement to the file:
using com.sun.org.apache.xalan.@internal.xsltc.trax;
Then change this:
TransformerFactory factory = TransformerFactory.newInstance();
to this:
TransformerFactory factory = new TransformerFactoryImpl();