Message6518

Author reljicb
Recipients reljicb
Date 2011-04-27.11:04:20
SpamBayes Score 5.0847675e-08
Marked as misclassified No
Message-id <1303902261.54.0.769260129936.issue1744@psf.upfronthosting.co.za>
In-reply-to
Content
I use Jython as a java ScriptEngine, and I load scripts longer then 100000 characters, which throws IOException:

javax.script.ScriptException: java.io.IOException: java.io.IOException: Mark invalid
        at org.python.jsr223.PyScriptEngine.scriptException(PyScriptEngine.java:196)
        at org.python.jsr223.PyScriptEngine.compileScript(PyScriptEngine.java:75)
        at org.python.jsr223.PyScriptEngine.eval(PyScriptEngine.java:31)
        at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:247)
        at testjython.Main.run(Main.java:36)
        at testjython.Main.main(Main.java:56)
Caused by: java.io.IOException: Mark invalid

java.io.IOException: java.io.IOException: Mark invalid

        at org.python.core.PyException.fillInStackTrace(PyException.java:70)
        at java.lang.Throwable.<init>(Throwable.java:181)
        at java.lang.Exception.<init>(Exception.java:29)
        at java.lang.RuntimeException.<init>(RuntimeException.java:32)
        at org.python.core.PyException.<init>(PyException.java:46)
        at org.python.core.PyException.<init>(PyException.java:43)
        at org.python.core.Py.JavaError(Py.java:481)
        at org.python.core.ParserFacade.fixParseError(ParserFacade.java:104)
        at org.python.core.ParserFacade.parseExpressionOrModule(ParserFacade.java:130)


Test ended.
        at org.python.util.PythonInterpreter.compile(PythonInterpreter.java:259)
        at org.python.util.PythonInterpreter.compile(PythonInterpreter.java:256)
        at org.python.util.PythonInterpreter.compile(PythonInterpreter.java:250)
        at org.python.jsr223.PyScriptEngine.compileScript(PyScriptEngine.java:70)
        ... 4 more
Caused by: java.io.IOException: Mark invalid
        at java.io.BufferedReader.reset(BufferedReader.java:485)
        at org.python.core.ParserFacade.parseExpressionOrModule(ParserFacade.java:127)
        ... 8 more


I am not saying this is a bug, but it is certainly a behavior which limits me from executing not that big python scripts.

Is there a way to increase this limit?

Cheers,
Bojan

PS. See attached java file to reproduce the problem.
History
Date User Action Args
2011-04-27 11:04:21reljicbsetrecipients: + reljicb
2011-04-27 11:04:21reljicbsetmessageid: <1303902261.54.0.769260129936.issue1744@psf.upfronthosting.co.za>
2011-04-27 11:04:21reljicblinkissue1744 messages
2011-04-27 11:04:20reljicbcreate