From: Steven M. C. <sca...@sa...> - 2001-10-08 17:47:39
|
I seem to be having a strange problem when I call a jythonc-compiled jython program from a cgi. The program will run correctly if i "su - nobody" (the server runs as nobody) and execute it by hand, but when I try to call it from a cgi python script, I get the following error in the apache log: ValueError: insecure string pickle Java Traceback: at org.python.core.Py.ValueError(Py.java) at org.python.modules.cPickle$Unpickler.load_string(cPickle.java) at org.python.modules.cPickle$Unpickler.load(cPickle.java) at org.python.modules.cPickle.load(cPickle.java) at java.lang.reflect.Method.invoke(Native Method) at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java) at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java) at org.python.core.PyObject.__call__(PyObject.java) at org.python.core.PyObject.invoke(PyObject.java) at export_cog_data$_PyInner.load_python_data$2(export_cog_data.java:146) at export_cog_data$_PyInner.call_function(export_cog_data.java:80) at org.python.core.PyTableCode.call(PyTableCode.java) at org.python.core.PyTableCode.call(PyTableCode.java) at org.python.core.PyFunction.__call__(PyFunction.java) at export_cog_data$_PyInner.main$11(export_cog_data.java:454) at export_cog_data$_PyInner.call_function(export_cog_data.java:98) at org.python.core.PyTableCode.call(PyTableCode.java) at org.python.core.PyCode.call(PyCode.java) at org.python.core.imp.createFromCode(imp.java) at org.python.core.Py.runMain(Py.java) at export_cog_data.main(export_cog_data.java:491) Traceback (innermost last): File "export_cog_data.py", line 0, in main File "export_cog_data.py", line 0, in load_python_data ValueError: insecure string pickle Apache 1.3.20 (custom compiled) Python 1.5.2 Jython 2.1a3 Sun JDK 1.3.1_01 Redhat 7.1 Linux 2.4.7 (custom compiled) What I am essentially trying to do is this: 1) A Python/GTK program is used to generate, and then pickle data in the python format 2) A Jython program is then used to unpickle the data, convert to Java data, and export a Java serialized file 3) A Java Applet reads in the serialized file. I don't have a problem with any of this unless I'm running it on the web server. I am running jythonc-compiled files because the web host does not have jython installed. I am doing the conversion through CGI because both the applet and the PyGTK program are GPL, and I can't distribute jython.jar with GPL'd code, because I don't believe it's compatible with the GPL. I figure that I can code the PyGTK program to attach to the website and automate the conversion process remotely, and since I'm not distributing the jython.jar, everything is kosher. If anyone has any pointers offhand, please let me know. If posting some or all of the code would be helpful, just let me know. Thanks a lot guys. -Steve Castellotti St...@in... -- Steve Castellotti Systems Programmer School of Arts and Sciences, University of Pennsylvania |