jython / jython3

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

Error faced while interpreting a python file in java #34

Closed sourabhvarshney111 closed 3 years ago

sourabhvarshney111 commented 6 years ago
java.lang.NoClassDefFoundError: org.python.antlr.NoCloseReaderStream
                                                                                         at org.python.core.ParserFacade.parse(ParserFacade.java:112)
                                                                                         at org.python.core.Py.compile_flags(Py.java:1669)
                                                                                         at org.python.core.__builtin__.execfile_flags(__builtin__.java:570)
                                                                                         at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:145)
                                                                                         at com.example.android.home_automation.Text_processing.str(Text_processing.java:113)
                                                                                         at com.example.android.home_automation.MainActivity.onActivityResult(MainActivity.java:75)
                                                                                         at android.app.Activity.dispatchActivityResult(Activity.java:6508)
                                                                                         at android.app.ActivityThread.deliverResults(ActivityThread.java:3734)
                                                                                         at android.app.ActivityThread.handleSendResult(ActivityThread.java:3781)
                                                                                         at android.app.ActivityThread.access$1500(ActivityThread.java:153)
                                                                                         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1424)
                                                                                         at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                                         at android.os.Looper.loop(Looper.java:154)
                                                                                         at android.app.ActivityThread.main(ActivityThread.java:5523)
                                                                                         at java.lang.reflect.Method.invoke(Native Method)
                                                                                         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
                                                                                         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)

                                                                                     java.lang.NoClassDefFoundError: java.lang.NoClassDefFoundError: org.python.antlr.NoCloseReaderStream

                                                                                         at android.app.ActivityThread.deliverResults(ActivityThread.java:3738)
                                                                                         at android.app.ActivityThread.handleSendResult(ActivityThread.java:3781)
                                                                                         at android.app.ActivityThread.access$1500(ActivityThread.java:153)
                                                                                         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1424)
                                                                                         at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                                         at android.os.Looper.loop(Looper.java:154)
                                                                                         at android.app.ActivityThread.main(ActivityThread.java:5523)
                                                                                         at java.lang.reflect.Method.invoke(Native Method)
                                                                                         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
                                                                                         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)
                                                                                      Caused by: Traceback (most recent call last):
                                                                                       (no code object) at line 0
                                                                                     java.lang.NoClassDefFoundError: org.python.antlr.NoCloseReaderStream
                                                                                         at org.python.core.ParserFacade.parse(ParserFacade.java:112)
                                                                                         at org.python.core.Py.compile_flags(Py.java:1669)
                                                                                         at org.python.core.__builtin__.execfile_flags(__builtin__.java:570)
                                                                                         at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:145)
                                                                                         at com.example.android.home_automation.Text_processing.str(Text_processing.java:113)
                                                                                         at com.example.android.home_automation.MainActivity.onActivityResult(MainActivity.java:75)
                                                                                         at android.app.Activity.dispatchActivityResult(Activity.java:6508)
                                                                                         at android.app.ActivityThread.deliverResults(ActivityThread.java:3734)
                                                                                         at android.app.ActivityThread.handleSendResult(ActivityThread.java:3781)
                                                                                         at android.app.ActivityThread.access$1500(ActivityThread.java:153)
                                                                                         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1424)
                                                                                         at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                                         at android.os.Looper.loop(Looper.java:154)
                                                                                         at android.app.ActivityThread.main(ActivityThread.java:5523)
                                                                                         at java.lang.reflect.Method.invoke(Native Method)
                                                                                         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
                                                                                         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)

                                                                                     java.lang.NoClassDefFoundError: java.lang.NoClassDefFoundError: org.python.antlr.NoCloseReaderStream

                                                                                     Caused by: java.lang.NoClassDefFoundError: org.python.antlr.NoCloseReaderStream
                                                                                         at org.python.core.ParserFacade.parse(ParserFacade.java:112)
                                                                                         at org.python.core.Py.compile_flags(Py.java:1669)
                                                                                         at org.python.core.__builtin__.execfile_flags(__builtin__.java:570)
                                                                                        at org.python.util.PythonInterpreter.execfile(Pyt
01-13 12:39:34.748 27424-27424/com.example.android.home_automation E/MQSEventManagerDelegate: failed to get MQSService.
jeff5 commented 6 years ago

Seems most likely related to the class path. If you're still looking for help, was this launched?

Jython 3 is just a sandbox at the moment, so if you're trying to build an application, we'd direct you to 2.7.1.