JPython1.1 jpythonc2 applet problems

Douglas du Boulay ddb at crystal.uwa.edu.au
Thu Mar 22 04:57:59 CET 2001


Hi, 
I built a java applet using the jpythonc2 compiler and it 
runs perfectly well as a stand alone application. 

Unfortunately when I put it on a web server I get web browser 
security   member access violations as follows:

netscape.security.AppletSecurityException: security.member access
  at
netscape.security.AppletSecurity.checkMemberAccess(AppletSecurity.java:1158)
  at
netscape.security.AppletSecurity.checkMemberAccess(AppletSecurity.java:1146)
  at java.lang.Class.checkMemberAccess(Class.java:698)
  at java.lang.Class.getDeclaredConstructors(Class.java:575)
  at org.python.compiler.ProxyMaker.addConstructors(ProxyMaker.java:500)
  at org.python.compiler.ProxyMaker.build(ProxyMaker.java:614)
  at org.python.compiler.JavaMaker.build(JavaMaker.java:134)
  at org.python.core.MakeProxies.makeProxy(MakeProxies.java:77)
  at org.python.core.PyClass.init(PyClass.java:84)
  at org.python.core.Py.makeClass(Py.java:1306)
  at jstar.main$66(jstar.java:916)
  at jstar$_PyInner.call_function(jstar.java:313)



The original python code in question is:
# file: jstar.py
from star import VStar  # where star is a java package and
			# VStar is a java class in the package
class JSParse(VStar):



and this is translated into  the following java:
//file: jstar.java
903 private static PyObject main$66(PyFrame frame) {  
 ...
915     frame.setglobal("VStar",
imp.load("star").__getattr__("VStar"));   
916     frame.setglobal("JSParse", Py.makeClass("JSParse", new
PyObject[] {
                            frame.getglobal("VStar")}, c$47_JSParse,
null));


The question: Is is possible that this is an artifact of the "star" java 
package being imported via the wrong route (sys.path and not python.path
or something?), and is  there a way that jpythonc2 can actually create
the 
relevant proxy classes at compile time rather than at run time in the 
web browser which requires java reflection class introspection and its
associated security monitoring? 

Thanks 
Doug



More information about the Python-list mailing list