From: Derek H. <der...@pr...> - 2002-01-17 16:44:00
|
Hi, I'm havaing a problem with running some of my java classes which I created using jythonc. The only classes which seem to be affected are jython files that use the xml package. when I try to run them using java I get the following error Exception in thread "main" Traceback (innermost last): File "C:\Temp\jythonexample\t.py", line 0, in main File "C:\jython-2.1\Lib\xml\sax\sax2exts.py", line 0, in make_parser File "C:\jython-2.1\Lib\xml\sax\saxexts.py", line 0, in make_parser SAXReaderNotAvailable: No parsers found for example with the file t.py I run the following command > jythonc -a -j test.jar t.py and then try to run the class t with java from my newly created jar file > set CLASSPATH=test.jar > java t and I get the above error. Should the xml package be in test.jar because I used the -a option in jythonc or am I missing something? Here is the jython file "t.py" that is causing the trouble ################### import StringIO from xml import sax class MySaxHandler(sax.handler.ContentHandler): def startElementNS(self, name, qname, attrs): print qname def startElement(self, name, attrs): print name Parser = MySaxHandler() p = sax.make_parser(['xml.sax.drivers.drv_']) p.setContentHandler(Parser) string = StringIO.StringIO("<Element/>") p.parse(string) ################## Any help would be appreciated Derek. --- Experience is something you don't get until just after you need it ============================= Derek Higgins derek.higgins at propylon.com ============================= |