|
Re: java.lang.NoClassDefFoundError: org/python/parser/ast/VisitorBase: msg#00082lang.jython.user
You're right the parser/ast isn't being packaged, which would explain the problem. It suggest (to me) that Jythonc isn't picking this up correctly. I've tried specifying this using the '-A' command with jythonc jythonc -all -A org.python.parser.ast ....... I've also tried org.python.parser.* and org.python.parser.ast.* - although I admit, I'm just hacking around and hoping for the best! Searching through the generated Java the line the bombs out is in jythonGui.java, built from jythonGui.py: Py.runMain(jythonGui._PyInner.class, newargs, jythonGui.jpy$packages, jythonGui.jpy$mainProperties, "", new String[] {"string", "random", "traceback", "sre_compile", "atexit", "warnings", "popen2", "getopt", "sre", "sre_constants", "StringIO", "jythonGui", "javaos", "repr", "copy_reg", "re", "linecache", "javapath", "UserDict", "copy", "threading", "stat", "javashell", "sre_parse"}); The odd thing is a very similar application built by jythonc I have produces almost identical code - here Gui.java built from Gui.py: Py.runMain(Gui._PyInner.class, newargs, Gui.jpy$packages, Gui.jpy$mainProperties, "", new String[] {"string", "random", "traceback", "sre_compile", "atexit", "warnings", "popen2", "getopt", "sre", "sre_constants", "StringIO", "javaos", "repr", "copy_reg", "re", "linecache", "javapath", "UserDict", "copy", "threading", "stat", "Gui", "javashell", "sre_parse"}); This other jar doesn't contain any referances to parser/ast either - in fact both only include referances to org.python.core and org.python.modules. Yet one works and one doesn't. The only discernable diferance is the order of the String array. 'jythonGui' appears earlier than 'Gui' in the second array - these are then names of my main classes in the respective applications. Of course the programs arn't identical so this could all be hearsay. But they use the same menu classes I wrote and only differ in the Swing components put onto their respective GUIs. I guess the way forward (unless anyone has any better solutions), is to manually compile parser/ast from the source included in jython and manually add it to the final package. Does anyone know if this is striaghtforward to do? I'm all ears if anyone has a better suggestions! Thanks for all the pointers so far, Phil. Oti wrote: What org.python.* packages are inside of myjar.jar ? If parser/ast is ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: java.lang.NoClassDefFoundError: org/python/parser/ast/VisitorBase, Oti |
|---|---|
| Next by Date: | Can't seem to post to mailing lists, Walter Chang |
| Previous by Thread: | Re: java.lang.NoClassDefFoundError: org/python/parser/ast/VisitorBase, Oti |
| Next by Thread: | Re: java.lang.NoClassDefFoundError: org/python/parser/ast/VisitorBase, Frank Wierzbicki |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |