jython / jython3

A sandboxed attempt at v3 (not maintained)
Other
299 stars 59 forks source link

errors while trying to run jython3 #26

Closed sohail288 closed 7 years ago

sohail288 commented 8 years ago

Here's what I'm getting

$ ./dist/bin/jython -vvv
initializer: 'META-INF/services/org.python.core.JythonInitializer' not found on sun.misc.Launcher$AppClassLoader@42a57993
initializer: 'META-INF/services/org.python.core.JythonInitializer' not found on sun.misc.Launcher$AppClassLoader@42a57993
Exception in thread "main" 
Exception: org.python.core.PyException thrown from the UncaughtExceptionHandler in thread "main"

Here is a stacktrace from jdb:

  [1] org.python.core.PyException.printStackTrace (PyException.java:110)
  [2] org.python.core.PyException.toString (PyException.java:127)
  [3] org.python.core.Py.importSiteIfSelected (Py.java:1,764)
  [4] org.python.util.PythonInterpreter.<init> (PythonInterpreter.java:113)
  [5] org.python.util.PythonInterpreter.<init> (PythonInterpreter.java:91)
  [6] org.python.util.InteractiveInterpreter.<init> (InteractiveInterpreter.java:39)
  [7] org.python.util.InteractiveInterpreter.<init> (InteractiveInterpreter.java:28)
  [8] org.python.util.InteractiveConsole.<init> (InteractiveConsole.java:68)
  [9] org.python.util.InteractiveConsole.<init> (InteractiveConsole.java:54)
  [10] org.python.util.InteractiveConsole.<init> (InteractiveConsole.java:34)
  [11] org.python.util.jython.run (jython.java:276)
  [12] org.python.util.jython.main (jython.java:142)

I compiled it successfully after the following modifications

@@ -501,6 +510,9 @@
         <exclude name="**/handler/InformixDataHandler.java" unless="informix.present" />
         <exclude name="**/handler/OracleDataHandler.java" unless="oracle.present" />
         <classpath refid="main.classpath" />
+          <classpath>
+            <pathelement path="/Users/Sohail/.m2/repository/com/jcraft/jzlib/1.1.3/jzlib-1.1.3.jar" />
+          </classpath>
       </javac>

Anyone know what's going on? Or how to go about debugging it?

My machine.

Intel Core I5 2.5 GHZ, 16 GB Memory, running on OS X 10.9.5

sohail288 commented 8 years ago

Tried to debug it and narrowed it down to line 1747 in Py.Java

                imp.load("site");

Here is the manual exception message that I print in the try-catch block of that load call.

running load with arg: __builtin__
got obj
IMPORTSITE: true
running load with arg: site
IMP LOAD EXCEPTION
Exception in thread "main" java.lang.NullPointerException
        at org.python.core.imp.load(imp.java:622)
        at org.python.core.Py.importSiteIfSelected(Py.java:1747)
        at org.python.util.PythonInterpreter.<init>(PythonInterpreter.java:113)
        at org.python.util.PythonInterpreter.<init>(PythonInterpreter.java:91)
        at org.python.util.InteractiveInterpreter.<init>(InteractiveInterpreter.java:39)
        at org.python.util.InteractiveInterpreter.<init>(InteractiveInterpreter.java:28)
        at org.python.util.InteractiveConsole.<init>(InteractiveConsole.java:68)
        at org.python.util.InteractiveConsole.<init>(InteractiveConsole.java:54)
        at org.python.util.InteractiveConsole.<init>(InteractiveConsole.java:34)
        at org.python.util.jython.run(jython.java:279)
        at org.python.util.jython.main(jython.java:145)
isaiah commented 8 years ago

@sohail288 Thanks for reporting, I'll try on my OSX machine.

jeff5 commented 7 years ago

I believe this is fixed here: https://github.com/jython/jython3/commit/0d924492ec58c8c1706d73dbeef5064c585c1239