Didn't want to clutter the email in case nobody could help :)
Also tried to 'build' the grammar with no luck!
Thanks,
Here it goes:
Traceback (most recent call last):
File "src/xsparqler.py", line 106, in <module>
sys.exit(main())
File "src/xsparqler.py", line 98, in main
output = xsparql.grammar.rewrite(query)
File "/Users/nl/work/deri/xsparql/src/xsparql/grammar.py", line
2245, in rewrite
parser = get_parser()
File "/Users/nl/work/deri/xsparql/src/xsparql/grammar.py", line
2245, in rewrite
parser = get_parser()
File "/Users/nl/work/deri/xsparql/src/xsparql/grammar.py", line
2227, in get_parser
return yacc.yacc(debug = 0, tabmodule = 'xsparql.parsetab',
write_tables = 0)
File "/Users/nl/jython2.5b2/Lib/site-packages/ply/yacc.py", line
2805, in yacc
if not lr_read_tables(tabmodule):
File "/Users/nl/jython2.5b2/Lib/site-packages/ply/yacc.py", line
2613, in lr_read_tables
exec "import %s as parsetab" % module
File "/Users/nl/jython2.5b2/Lib/site-packages/ply/yacc.py", line
2613, in lr_read_tables
exec "import %s as parsetab" % module
File "<string>", line 1, in <module>
java.lang.ClassFormatError: Invalid method Code length 1068688 in
class file xsparql/parsetab$py
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
at org.python.core.BytecodeLoader
$Loader.loadClassFromBytes(BytecodeLoader.java:116)
at org.python.core.BytecodeLoader.makeClass(BytecodeLoader.java:35)
at org.python.core.BytecodeLoader.makeCode(BytecodeLoader.java:65)
at org.python.core.imp.createFromSource(imp.java:258)
at org.python.core.imp.loadFromSource(imp.java:475)
at org.python.core.imp.find_module(imp.java:381)
at org.python.core.PyModule.impAttr(PyModule.java:109)
at org.python.core.imp.import_next(imp.java:581)
at org.python.core.imp.import_logic(imp.java:638)
at org.python.core.imp.import_name(imp.java:694)
at org.python.core.imp.importName(imp.java:739)
at org.python.core.ImportFunction.__call__(__builtin__.java:1265)
at org.python.core.PyObject.__call__(PyObject.java:337)
at org.python.core.__builtin__.__import__(__builtin__.java:1236)
at org.python.core.__builtin__.__import__(__builtin__.java:1219)
at org.python.core.imp.importOneAs(imp.java:760)
at org.python.pycode._pyx6.f$0(<string>:1)
at org.python.pycode._pyx6.call_function(<string>)
at org.python.core.PyTableCode.call(PyTableCode.java:166)
at org.python.core.PyCode.call(PyCode.java:14)
at org.python.core.Py.runCode(Py.java:1206)
at org.python.core.Py.exec(Py.java:1237)
at ply.yacc$py.lr_read_tables$69(/Users/nl/jython2.5b2/Lib/site-
packages/ply/yacc.py:2625)
at ply.yacc$py.call_function(/Users/nl/jython2.5b2/Lib/site-packages/
ply/yacc.py)
at org.python.core.PyTableCode.call(PyTableCode.java:166)
at org.python.core.PyBaseCode.call(PyBaseCode.java:303)
at org.python.core.PyBaseCode.call(PyBaseCode.java:148)
at org.python.core.PyFunction.__call__(PyFunction.java:307)
at ply.yacc$py.yacc$70(/Users/nl/jython2.5b2/Lib/site-packages/ply/
yacc.py:2872)
at ply.yacc$py.call_function(/Users/nl/jython2.5b2/Lib/site-packages/
ply/yacc.py)
at org.python.core.PyTableCode.call(PyTableCode.java:166)
at org.python.core.PyBaseCode.call(PyBaseCode.java:303)
at org.python.core.PyFunction.function___call__(PyFunction.java:328)
at org.python.core.PyFunction.__call__(PyFunction.java:323)
at xsparql.grammar$py.get_parser$262(/Users/nl/work/deri/xsparql/src/
xsparql/grammar.py:2227)
at xsparql.grammar$py.call_function(/Users/nl/work/deri/xsparql/src/
xsparql/grammar.py)
at org.python.core.PyTableCode.call(PyTableCode.java:166)
at org.python.core.PyBaseCode.call(PyBaseCode.java:141)
at org.python.core.PyFunction.__call__(PyFunction.java:302)
at xsparql.grammar$py.rewrite$263(/Users/nl/work/deri/xsparql/src/
xsparql/grammar.py:2261)
at xsparql.grammar$py.call_function(/Users/nl/work/deri/xsparql/src/
xsparql/grammar.py)
at org.python.core.PyTableCode.call(PyTableCode.java:166)
at org.python.core.PyBaseCode.call(PyBaseCode.java:155)
at org.python.core.PyFunction.__call__(PyFunction.java:307)
at org.python.pycode._pyx0.main$4(src/xsparqler.py:102)
at org.python.pycode._pyx0.call_function(src/xsparqler.py)
at org.python.core.PyTableCode.call(PyTableCode.java:166)
at org.python.core.PyBaseCode.call(PyBaseCode.java:303)
at org.python.core.PyBaseCode.call(PyBaseCode.java:135)
at org.python.core.PyFunction.__call__(PyFunction.java:302)
at org.python.pycode._pyx0.f$0(src/xsparqler.py:106)
at org.python.pycode._pyx0.call_function(src/xsparqler.py)
at org.python.core.PyTableCode.call(PyTableCode.java:166)
at org.python.core.PyCode.call(PyCode.java:14)
at org.python.core.Py.runCode(Py.java:1206)
at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:
152)
at org.python.util.jython.run(jython.java:226)
at org.python.util.jython.main(jython.java:114)
java.lang.ClassFormatError: java.lang.ClassFormatError: Invalid method
Code length 1068688 in class file xsparql/parsetab$py
--
Nuno Lopes
On 11 Mar 2009, at 16:42, David Beazley wrote:
> Yes, a traceback would be useful.
>
> Cheers,
> Dave
>
> On Mar 11, 2009, at 10:18 AM, Nuno Lopes wrote:
>
>>
>> Hi,
>>
>> Is anybody using ply with jython? We need to integrate our code with
>> a java application so I was looking into jython. jython finds the
>> ply
>> module but fails to run the code.
>>
>> Using ply 2.5 and python 2.5 on MacOS.
>>
>> Can send traceback/java errors if helpful.
>>
>> Thanks
>> --
>> Nuno Lopes
>>
>> >>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"ply-hack" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/ply-hack?hl=en
-~----------~----~----~----~------~----~------~--~---