Eclipse RCP和Jython

时间:2015-05-07 11:06:14

标签: eclipse pydev jython rcp

我正在编写一个eclipse RCP应用程序,并希望将Jython与它集成。 我已经能够使用Console视图启动pydev python控制台并选择PyDev - > Python控制台。 但是当尝试启动Jython时,我得到一系列例外: Launching Jython

Jython在我的Eclipse中工作,但在我的Eclipse应用程序中没有。

这就是我得到的:

!SESSION 2015-05-07 10:53:51.497 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.7.0_25
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments:  -product AvgPowerTool.product
Command-line arguments:  -product AvgPowerTool.product -data /nfs/iil/proj/dt/sdq06/dmhadar/avg-power-tool/dts_cct_e_explore-avgpowertool/../runtime-AvgPowerTool.product -dev file:/nfs/iil/proj/dt/sdq06/dmhadar/avg-power-tool/dts_cct_e_explore-avgpowertool/.metadata/.plugins/org.eclipse.pde.core/AvgPowerTool.product/dev.properties -os linux -ws gtk -arch x86_64 -consoleLog

!ENTRY org.eclipse.core.resources 2 10035 2015-05-07 10:53:53.939
!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.

!ENTRY org.python.pydev.shared_core 4 4 2015-05-07 10:54:19.664
!MESSAGE Unexpected error connecting to console.
!STACK 1
org.eclipse.core.runtime.CoreException: Unexpected error connecting to console.
    at org.python.pydev.debug.newconsole.PydevConsoleFactory.sayHello(PydevConsoleFactory.java:156)
    at org.python.pydev.debug.newconsole.PydevConsoleFactory.access$0(PydevConsoleFactory.java:136)
    at org.python.pydev.debug.newconsole.PydevConsoleFactory$1.run(PydevConsoleFactory.java:92)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
    Caused by: java.lang.Exception: Failed to recive suitable Hello response from pydevconsole. Last msg received: <type 'org.xml.sax.SAXException'>:org.xml.sax.SAXException: SAX2 driver class org.apache.xerces.parsers.SAXParser not found
java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser
Command Line used:  "Internal Jython process (no command line)"

Environment:
null
at org.python.pydev.debug.newconsole.PydevConsoleCommunication.hello(PydevConsoleCommunication.java:768)
    at org.python.pydev.debug.newconsole.PydevConsoleFactory.sayHello(PydevConsoleFactory.java:145)
... 3 more
!SUBENTRY 1 org.python.pydev.debug 4 4 2015-05-07 10:54:19.667
!MESSAGE Unexpected error connecting to console.
!STACK 0
java.lang.Exception: Failed to recive suitable Hello response from pydevconsole. Last msg received: <type 'org.xml.sax.SAXException'>:org.xml.sax.SAXException: SAX2 driver class org.apache.xerces.parsers.SAXParser not found
java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser
Command Line used:  "Internal Jython process (no command line)"

Environment:
null
    at org.python.pydev.debug.newconsole.PydevConsoleCommunication.hello(PydevConsoleCommunication.java:768)
    at org.python.pydev.debug.newconsole.PydevConsoleFactory.sayHello(PydevConsoleFactory.java:145)
    at org.python.pydev.debug.newconsole.PydevConsoleFactory.access$0(PydevConsoleFactory.java:136)
    at org.python.pydev.debug.newconsole.PydevConsoleFactory$1.run(PydevConsoleFactory.java:92)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

!ENTRY org.python.pydev.debug 4 4 2015-05-07 10:54:19.670
!MESSAGE Error initializing console.
!STACK 1
org.eclipse.core.runtime.CoreException: Unexpected error connecting to console.
    at org.python.pydev.debug.newconsole.PydevConsoleFactory.sayHello(PydevConsoleFactory.java:156)
    at org.python.pydev.debug.newconsole.PydevConsoleFactory.access$0(PydevConsoleFactory.java:136)
    at org.python.pydev.debug.newconsole.PydevConsoleFactory$1.run(PydevConsoleFactory.java:92)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.Exception: Failed to recive suitable Hello response from pydevconsole. Last msg received: <type 'org.xml.sax.SAXException'>:org.xml.sax.SAXException: SAX2 driver class org.apache.xerces.parsers.SAXParser not found
java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser
Command Line used:  "Internal Jython process (no command line)"

Environment:
null
    at org.python.pydev.debug.newconsole.PydevConsoleCommunication.hello(PydevConsoleCommunication.java:768)
    at org.python.pydev.debug.newconsole.PydevConsoleFactory.sayHello(PydevConsoleFactory.java:145)
    ... 3 more
!SUBENTRY 1 org.python.pydev.debug 4 4 2015-05-07 10:54:19.670
!MESSAGE Unexpected error connecting to console.
!STACK 0
java.lang.Exception: Failed to recive suitable Hello response from pydevconsole. Last msg received: <type 'org.xml.sax.SAXException'>:org.xml.sax.SAXException: SAX2 driver class org.apache.xerces.parsers.SAXParser not found
java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser
Command Line used:  "Internal Jython process (no command line)"

Environment:
null
    at org.python.pydev.debug.newconsole.PydevConsoleCommunication.hello(PydevConsoleCommunication.java:768)
    at org.python.pydev.debug.newconsole.PydevConsoleFactory.sayHello(PydevConsoleFactory.java:145)
    at org.python.pydev.debug.newconsole.PydevConsoleFactory.access$0(PydevConsoleFactory.java:136)
    at org.python.pydev.debug.newconsole.PydevConsoleFactory$1.run(PydevConsoleFactory.java:92)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

在我导入的软件包中,我有org.python.pydev.coreorg.python.pydev.debug.newconsole

非常感谢任何帮助。

1 个答案:

答案 0 :(得分:1)

您似乎错过了xerces库,请尝试将它们包含在您的类路径中