Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

I am trying to use Batik and FOP together but Batik does not work and fails on the org.w3c.xxx packages. What is happening?

batik fails FOP happening Packages
0
Posted

I am trying to use Batik and FOP together but Batik does not work and fails on the org.w3c.xxx packages. What is happening?

0

Both FOP and Batik use the org.w3c.xxx packages. Depending on the version of FOP and Batik, Batik has been using a version of these packages which is more recent than the one in the w3c.jar file FOP uses. However, if the w3c.jar, file which comes with the FOP distribution is loaded before the Batik jar files, then, the version coming with FOP takes precedence (i.e., that is the version the Java Virtual Machine loads). Because that version is incompatible with Batik, you get a failure. The solution is to either repackage the w3c.jar file with the classes in the Batik distribution (you will need the Batik source distrib to do that), or you will need to make sure the Batik jars are loaded before the w3c.jar, for example by putting them before the w3c.jar file in your classpath. If you are copying your jar files to ..jre/lib/ext, you can simply remove the FOP w3c.jar file from that directory.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123