Author webpentest
Recipients webpentest
Date 2018-06-21.00:11:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I am developing an extension for a java program that embeds jython as a scripting environment. When trying to use xml parsing routines from inside the python script, I run into the following exception:

java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser

The issue is similar to

After some investigations (see the whole discussion in, I think I've found the root cause. Namely, SAX's XMLReaderFactory.createXMLReader does not honor the class loader inheritance and uses current thread's classloader. In my case this classloader does not contain jython's jar, so that createXMLReader cannot find both org.python.apache.xerces.parsers.SAXParser and org.apache.xerces.parsers.SAXParser classes. 

I have a workaround that employs switching current Thread's classloader to the classloader that has jython's jar. But maybe there is a way to fix this issue inside jython itself?
Date User Action Args
2018-06-21 00:11:50webpentestsetrecipients: + webpentest
2018-06-21 00:11:50webpentestsetmessageid: <>
2018-06-21 00:11:50webpentestlinkissue2693 messages
2018-06-21 00:11:48webpentestcreate