From: Robert K. <rob...@ya...> - 2001-04-05 14:27:46
|
hi, i am just now moving from jpython to jython and i am experiencing some errors by doing that. maybe somebody can help. here the context: i am writing some modules, that help to generate java-code from a togetherj-modell. so what i am doing in effect is calling a java-module from together which again calls thru the PythonInterpreter my python-modules. on switching to jython20 i have renamed my old jpython installation directory to jpython.old and installed jython. i renamed my new jython install-directory to jpython and renamed the jython.jar to jpython.jar. this was all done so that there be no need to change all the property-files for running my generator scripts. after switching to jython the os module can not be called anymore. i simply can not understand why this happens. if i run jython from the dos-prompt and import the os module it works as expected. here the first few lines of my main.py (the module excuting the java-source-code-generator) >>> import types import copy import string import traceback from feidlc2.builder.data import data_generator from feidlc2.builder.facade.roi import facade_generator ... >>> and here the traceback >>> Traceback (innermost last): File "<stdin>", line 4, in ? File "E:\tools\jpython\Lib\traceback.py", line 3, in ? File "E:\tools\jpython\Lib\linecache.py", line 9, in ? java.lang.ExceptionInInitializerError: java.lang.NullPointerException at org.python.modules.os.<clinit>(os.java:11) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:120) at org.python.core.SyspathJavaLoader.loadClass(SyspathJavaLoader.java:57) at java.lang.ClassLoader.loadClass(ClassLoader.java:253) at org.python.core.Py.findClassEx(Py.java:607) at org.python.core.imp.loadBuiltin(imp.java:198) at org.python.core.imp.load(imp.java:354) at org.python.core.imp.load(imp.java:376) at org.python.core.imp.importName(imp.java:447) at org.python.core.imp.importName(imp.java:509) at org.python.core.ImportFunction.load(__builtin__.java:967) at org.python.core.ImportFunction.__call__(__builtin__.java:961) at org.python.core.PyObject.__call__(PyObject.java:250) at org.python.core.__builtin__.__import__(__builtin__.java:921) at org.python.core.imp.importOne(imp.java:518) at linecache$py.f$0(E:\tools\jpython\Lib\linecache.py) at linecache$py.call_function(E:\tools\jpython\Lib\linecache.py) at org.python.core.PyTableCode.call(PyTableCode.java:155) at org.python.core.imp.createFromCode(imp.java:157) at org.python.core.imp.createFromPyClass(imp.java:74) at org.python.core.imp.loadFromPath(imp.java:310) at org.python.core.imp.loadFromPath(imp.java:252) at org.python.core.imp.load(imp.java:357) at org.python.core.imp.load(imp.java:376) at org.python.core.imp.importName(imp.java:447) at org.python.core.imp.importName(imp.java:509) at org.python.core.ImportFunction.load(__builtin__.java:967) at org.python.core.ImportFunction.__call__(__builtin__.java:961) at org.python.core.PyObject.__call__(PyObject.java:250) at org.python.core.__builtin__.__import__(__builtin__.java:921) at org.python.core.imp.importOne(imp.java:518) at traceback$py.f$0(E:\tools\jpython\Lib\traceback.py) at traceback$py.call_function(E:\tools\jpython\Lib\traceback.py) at org.python.core.PyTableCode.call(PyTableCode.java:155) at org.python.core.imp.createFromCode(imp.java:157) at org.python.core.imp.createFromPyClass(imp.java:74) at org.python.core.imp.loadFromPath(imp.java:310) at org.python.core.imp.loadFromPath(imp.java:252) at org.python.core.imp.load(imp.java:357) at org.python.core.imp.load(imp.java:376) at org.python.core.imp.importName(imp.java:447) at org.python.core.imp.importName(imp.java:509) at org.python.core.ImportFunction.load(__builtin__.java:967) at org.python.core.ImportFunction.__call__(__builtin__.java:961) at org.python.core.PyObject.__call__(PyObject.java:250) at org.python.core.__builtin__.__import__(__builtin__.java:921) at org.python.core.imp.importOne(imp.java:518) at org.python.pycode._pyx0.f$0(<stdin>) at org.python.pycode._pyx0.call_function(<stdin>) at org.python.core.PyTableCode.call(PyTableCode.java:155) at org.python.core.Py.runCode(Py.java:1055) at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:164) at com.togethersoft.modules.fe.GeneratorStart.run(GeneratorStart.java:29) at zaqb.invokeScript([DashoPro-V1.2-120198]) at zbn0.b([DashoPro-V1.2-120198]) at zaqh.execute([DashoPro-V1.2-120198]) at com.togethersoft.component.query.DefaultContext.execute(DefaultContext.java:26) at zb48.actionPerformed([DashoPro-V1.2-120198]) at zclp.execute([DashoPro-V1.2-120198]) at zagw.run([DashoPro-V1.2-120198]) java.lang.ExceptionInInitializerError: java.lang.ExceptionInInitializerError >>> ===== itemj http://www.itemj.com Robert Kuzelj mobil 0177 5302230 Ramonvillestr.6 tel 06039 930223 61184 Karben fax 06039 2224 __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ |