Message5423

Author kwatford
Recipients kwatford
Date 2010-01-11.20:37:24
SpamBayes Score 0.000126711
Marked as misclassified No
Message-id <1263242245.59.0.298093311564.issue1537@psf.upfronthosting.co.za>
In-reply-to
Content
I'm using jython2.5.1 in MATLAB's JVM. Upon trying to parse an XML file with ElementTree, XMLParser.__init__ tries to get XMLReaderFactory to find "org.python.apache.xerces.parsers.SAXParser". Probably due to limitations in MATLAB's stupid classloader, this does not work (throws a SAXException/ClassNotFoundException)

The only relevant comment on why this weird name is used is expat.py line 51: "Name mangled by jarjar?". 

Manually setting expat._xerces_parser to "org.apache.xerces.parsers.SAXParser" resolves the issue.

Perhaps a try block around the XMLReaderFactory call?
History
Date User Action Args
2010-01-11 20:37:25kwatfordsetrecipients: + kwatford
2010-01-11 20:37:25kwatfordsetmessageid: <1263242245.59.0.298093311564.issue1537@psf.upfronthosting.co.za>
2010-01-11 20:37:25kwatfordlinkissue1537 messages
2010-01-11 20:37:24kwatfordcreate