NPE configuring Jython

raichea
2007-06-15
2013-03-15
  • raichea

    raichea - 2007-06-15

    I'm new to pretty much the whole environment (java, python, jython, eclipse), but have successfully installed Eclipse 3.2 and PyDev and can run and debug the "hello world" tutorial in the docs. However, I'm unable to successfully configure the Jython environment in PyDev. As soon as I set the preferences to point to jython.jar, I get a dialogue that says, "Some error happened while getting info on the interpreter". It suggests that either the interpreter is invalid (a link rather than the actual interpreter) or that the path to the Eclipse install has spaces in it. Neither of these applies. It also gives a link to a bug report that appears to be invalid.

    Checking the error log reveals the text at the bottom of this post. I've tried this with Jython 2.2b2, 2.2b1 and 2.1 with the same results for all.

    Thanks.

    eclipse.buildId=M20070212-1330
    java.fullversion=J2RE 1.5.0 IBM J9 2.3 Windows XP x86-32 j9vmwi3223ifx-20070323 (JIT enabled)
    J9VM - 20070322_12058_lHdSMR
    JIT  - 20070109_1805ifx3_r8
    GC   - WASIFIX_2007
    BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_GB
    Command-line arguments:  -os win32 -ws win32 -arch x86

    Info
    Fri Jun 15 17:45:06 BST 2007
    Information about process of adding new interpreter:- Opening dialog to request executable (or jar).
    - Chosen interpreter file:'C:\jython-2.1\jython.jar
    - Ok, file is non-null. Getting info on:C:\jython-2.1\jython.jar
    - Beggining task:Getting libs totalWork:100
    Exception detected: java.lang.RuntimeException: java.lang.NullPointerException
    - Some error happened while getting info on the interpreter:
    java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NullPointerException
    at org.python.pydev.ui.interpreters.AbstractInterpreterManager.getInterpreterInfo(AbstractInterpreterManager.java:227)
    at org.python.pydev.ui.interpreters.AbstractInterpreterManager.addInterpreter(AbstractInterpreterManager.java:265)
    at org.python.pydev.ui.pythonpathconf.AbstractInterpreterEditor$Operation.run(AbstractInterpreterEditor.java:713)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
    Caused by: java.lang.RuntimeException: java.lang.NullPointerException
    at org.python.pydev.runners.SimpleJythonRunner.runAndGetOutputWithJar(SimpleJythonRunner.java:39)
    at org.python.pydev.ui.interpreters.JythonInterpreterManager.doCreateInterpreterInfo(JythonInterpreterManager.java:68)
    at org.python.pydev.ui.interpreters.JythonInterpreterManager.createInterpreterInfo(JythonInterpreterManager.java:44)
    at org.python.pydev.ui.interpreters.AbstractInterpreterManager.getInterpreterInfo(AbstractInterpreterManager.java:218)
    ... 3 more
    Caused by: java.lang.NullPointerException
    at org.python.pydev.runners.SimpleJythonRunner.runAndGetOutputWithJar(SimpleJythonRunner.java:26)
    ... 6 more

     
    • Fabio Zadrozny

      Fabio Zadrozny - 2007-06-17

      Ok, the problem is actually that you don't have a java executable configured (you should configure it at java > installed jres).

      I'll change that to give a much more descriptive error message ;-)

      Cheers,

      Fabio

       
    • raichea

      raichea - 2007-06-18

      Thanks for the reply.

      I checked, and I do have a JRE configured according to the dialogue (jclDesktop Win32 x86) - it is flagged as a J9 VM. I think it is correctly configured as I can write and run a simple Java app within the Eclipse environiment. Could there be a problem with the JRE that is configured? Or are there other reasons I might be getting the error while configuring Jython?

      Steve.

       
      • Fabio Zadrozny

        Fabio Zadrozny - 2007-06-18

        Yeap, seen the code again... that can be the problem. The current version looks for java, java.exe, javaw and javaw.exe as executables and is not covering j9.

        I'll fix this for the next version.

        So, you can wait for the release (I hope to release it this week... probably tomorrow or after tomorrow), or you can try configuring a different vm.

        Cheers,

        Fabio

         
        • raichea

          raichea - 2007-06-18

          That was it - configured a standard JVM and the PyDev Jython setup completes OK. I'll update to PyDev with J9 support when it's available.

          Thanks, Steve.

           

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks