Hi again,

while trying to narrow down the utf-8 problem I described in another post, I tried to open a file containing non-ascii characters (linux, tomcat, jython, pyservlet).

However, I've been unable to do something as simple as

f = open('words.txt')

I've put the file in the same folder of the pylet and also on /home/tomcat. I also tried to use full path but nothing works.

I'm getting a long backtrace but no really useful information as to the source of the issue.

javax.servlet.ServletException: Servlet execution threw an exception

java.lang.NoClassDefFoundError: org/python/core/PyFile$Closer
	org.python.core.PyFile.file___init__(PyFile.java:151)
	org.python.core.PyFile$exposed___new__.createOfType(Unknown Source)
	org.python.core.PyOverridableNew.new_impl(PyOverridableNew.java:12)
	org.python.core.PyType.invokeNew(PyType.java:466)
	org.python.core.PyType.type___call__(PyType.java:1558)
	org.python.core.PyType.__call__(PyType.java:1548)
	org.python.core.OpenFunction.__call__(__builtin__.java:1564)
	org.python.core.PyObject.__call__(PyObject.java:387)
	org.python.core.PyObject.__call__(PyObject.java:391)
	org.python.pycode._pyx27.doPost$3(/work//tomcat/webapps/jythondemo/JythonServlet1.py:34)
	org.python.pycode._pyx27.call_function(/work/tomcat/webapps/jythondemo/JythonServlet1.py)

I also tried to put the statement within a try/except to track the error, but again a long backtrace. All I can see legible but not really understandable for me is:

javax.servlet.ServletException: java.lang.NoClassDefFoundError: org/python/antlr/PythonParser$try_stmt_return
java.lang.NoClassDefFoundError: java.lang.NoClassDefFoundError: org/python/antlr/PythonParser$try_stmt_return

Why can't I open a file??

Regards,
Fernando