Hi all,

I started using Pentaho XSLT transformtion job entry recently. As most, I run into NoClassDefFoundError and had to add saxon8.jar to my project. I don't use Saxon so it was quite a nuisance for me.

I raised a question on our local JUG group. After much heated discussion we found why Saxon is required even when not used!

Turns out the problem is in this piece of code:
Code:
factory = new net.sf.saxon.TransformerFactoryImpl();
During load bytecode check is done to see if this assignment is correct. This causes saxon class to be loaded.

The solution is to add case in here:
Code:
factory = (TransformerFactory) new net.sf.saxon.TransformerFactoryImpl();
I suggest to change this asap, this will save a lot of people some headache.

PS. Credit goes to Dawid Weiss, I am just a messenger.